Four modes of Oracle opening and closing

Four modes of Oracle opening and closing

>1 Start the database

In the cmd command window, directly enter "sqlplus" to enter the Oracle management interface. After entering the user name and password, start the database. There are three steps to start the database: start the instance, load the database, and open the database.

Command format:

startup [nomount|mount|open|force][restrict][pfile=filename]

nomount: indicates that the database will not be loaded when the instance is started

mount: starts the instance, loads the database, and keeps the database closed

open: means starting the instance, loading and opening the database. This is the default option

force: means to terminate the instance and restart the database

restrict: Used to specify that the database be started in restricted session mode

pfile: used to specify the text parameter file used when starting the instance, filename is the file name

  1.1 nomount mode

It only creates the instance (various memory structures and service processes of the Oracle instance), does not load the database, and does not open any data files;

startup nomount

Note: Users must log in as sysdba to have the permission to shut down and start data instances.

1.2 Mount Mode

This mode will start the instance, load the database, and leave the database closed.

startup mount

1.3 Open Mode

This mode will start the instance, load and open the database. This is the normal startup mode. If the user wants to perform multiple operations on the database, the database instance must be started in open mode.

startup

If the startup command is not followed by any parameters, it means starting the database instance in open mode.

1.4 Force Mode

This mode will terminate the instance and restart the database. This startup mode is mandatory. For example, when other startup modes fail, you can try using this startup mode

2 Close the database

Similar to starting a database instance, shutting down a database instance also has three steps: shutting down the database, uninstalling the database, and shutting down the instance.

Syntax format:

shutdown [normal|transactional|immediate|abort]

normal: means closing the database in a normal way

Transactional: means closing the database after all currently active transactions are committed

Immediate: means to close the database immediately in the shortest possible time

abort: means to close the database in termination mode

2.1 Normal method

This method is called the normal shutdown method. If there is no limit on the time to close the database, this method is usually used to close the database:

shutdown normal

After executing the above code, Oracle will do the following:

Prevent any user from establishing new connections

Wait for all currently connected users to actively disconnect

When all users have disconnected, the database will be closed immediately

2.2 Transactional Method

This method is called transaction closing mode. Its primary task is to ensure that all currently active transactions can be committed and close the database in the shortest possible time:

shutdown transactional

After executing the above code, Oracle will do the following:

Prevent users from establishing new connections and starting new transactions

Wait for all active transactions to be committed before disconnecting the user

When all active transactions are committed and all users are disconnected, the database will be closed.

2.3 immediate method

This is the immediate shutdown method, which can shut down the database in the shortest possible time:

shutdown immediate Wuxi Gynecology Hospital http://www.wxbhnkyy39.com/

In this shutdown mode, Oracle will not only immediately disconnect the current user's connection, but also forcibly terminate the user's current active transactions and roll back unfinished transactions. When closing the database in an immediate shutdown mode, Oracle will perform the following operations:

Prevent users from establishing new connections and starting new transactions

Roll back uncommitted active transactions

Close the database

2.4 Abort Method

This method is called the termination closing method, which is mandatory and destructive to a certain extent. Using this method will forcefully interrupt any database operations, which may result in the loss of some data information and affect the integrity of the database:

shutdown abort

After executing the above code, Oracle will do the following:

Prevent users from establishing new connections and starting new transactions

Cancel uncommitted active transactions instead of rolling them back

Immediately terminate any SQL statement being executed

Close the database immediately

Summarize

The above are the four modes of opening and closing Oracle that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Summary of Oracle11g RAC startup and shutdown and archiving settings
  • In-depth analysis of which services must be enabled in Oracle 11g
  • Detailed explanation of how to start and shut down the Oracle database program in Linux system
  • How to start, shut down, and obtain installation information for Oracle Cloud Control 12c
  • DBA_Oracle Startup / Shutdown startup and shutdown process detailed explanation (concept) (perform various maintenance operations on the database)
  • How to start and shut down the Oracle database
  • How to close and open archive log in oracle
  • How to set up automatic startup and shutdown of ORACLE11g with RHEL5 system
  • Oracle service startup and shutdown scripts (under Windows system)

<<:  Add a startup method to Linux (service/script)

>>:  Vue.$set failure pitfall discovery and solution

Recommend

20 CSS coding tips to make you more efficient (sorted)

In this article, we would like to share with you ...

MySQL study notes on handling duplicate data

MySQL handles duplicate data Some MySQL tables ma...

Improving the effect of hyperlinks in web design and production

Hyperlinks enable people to jump instantly from pa...

Using JS to determine the existence of elements in an array in ten minutes

Preface In front-end development, you often need ...

How to use MySQL common functions to process JSON

Official documentation: JSON Functions Name Descr...

Beginners learn some HTML tags (2)

Related article: Beginners learn some HTML tags (1...

A brief discussion on the role of the docker --privileged=true parameter

Around version 0.6, privileged was introduced to ...

How to rename the table in MySQL and what to pay attention to

Table of contents 1. Rename table method 2. Notes...

Example code for implementing raindrop animation effect with CSS

Glass Windows What we are going to achieve today ...

Basic usage examples of Vue named slots

Preface Named slots are bound to elements using t...

CSS Back to Top Code Example

Most websites nowadays have long pages, some are ...

Docker Data Storage Volumes Detailed Explanation

By default, the reading and writing of container ...