Oracle startup shutdown command

Source: Internet
Author: User
Tags import database

Write basic! It is good for you.

 

Shutdown has four parameters: Normal, transactional, immediate, and abort. The default value is normal if no parameter is included.

 

I:

Shutdown normal:

Connected users constantly,Prevents any user from establishing new connections, including administrators. Connected users can continue their current work, such as submitting new update transactions until they disconnect themselves. this takes a long time to wait. You can check the connected users and notify them to disconnect them.

All users are disconnected before the database is closed, that is, the database is shut down, the database is detached, and the routine is terminated.In this case, the shut-down database will not be faulty after it is restarted.No instance recovery is required at startup.

 

II:

Shutdown transactional

Blocks any user from establishing new connections. Wait until all the unsubmitted active transactions of the current connected user are committed, and then disconnect the user immediately. If all users are disconnected, the database is immediately closed, and operations such as shutting down the database, detaching the database, and terminating the process are performed. In this way, you may be calculating and making complex reports! Once a database operation is complete, it will be disconnected after a database operation is performed, which will have a certain impact on the user.No instance recovery is required at startup.

 

III:

Shutdown immediate

Blocks any new user connections and limits the current connected user to start new transactions. If the connected user has unfinished transactions, the database system will not wait for them to complete, but directly roll back the uncommitted transactions. The database system no longer waits for the user to take the initiative to disconnect the connection. After the uncommitted transaction is rolled back successfully, the system will directly shut down, uninstall the database, and terminate the database process.No instance recovery is required at startup.

 

IV:

Shutdown abort

If the database fails, you may not be able to close the database in the preceding three methods.Force the SQL statement being executed to end; no uncommitted transactions will be rolled back! This method basically does not cause damage to the control file or parameter file. This is better than forced shutdown (when the database cannot be shut down normally ).The instance is automatically restored at startup.

 

For normal, transactional, immediate, DB buffer cache content is written into a data file, uncommitted transactions are rolled back, all resources are released, and the database is "clean.
For abort, the content of the DB buffer cache is not written into the data file, and transactions that are not committed are not rolled back. The database is not dismount or closed, and the data files are not closed. When the database starts, you need to restore data through the redo log, roll back the transaction through the rollback segment, and release the resource.

 

The following problems were found during the test (using sysdba to log on)

ORA-00106: Unable to connect to schedulingProgramStart/Close the database

 

Solution

Test =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = rushlight) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
(Server = dedicated)
)
)

 

The red part needs to be added! Add and test again (self-test passed)

 

 

 

Startup command

 

I:

Startup nomount: only through the initialization file, allocate the SGA area, start the database background process, did not open the control file and data file. You cannot access any database.
II:
Startup mount: mount the database. only DBA is allowed to manage the database. Only the control file of the current instance is opened and the data file is not opened. In this mode, you can perform the following operations:

 

Rename a data file
Add cancel or rename redo log file
Allow and disable redo log archiving options
Complete database recovery

III:
Startup open: the default parameter of startup is open. Open the database and allow access to the database. All files described in the control file of the current instance have been opened.

IV:

Startup pfile = filename: Start the database with filename as the initialization file, instead of using the default initialization file.

V:
Startup force: Stop the running of the current database and restart the database.

Sat.
Startup restrict: only users with restricted session permission can access the database.

In this mode, the login can:

Export or import database data
SQL * loader for Data Loading
Temporarily stop normal users from using data
During a certain porting and Upgrading Process

After a restricted session is logged on, you can use the alter System statement to disable the restricted session feature.
Alter system disable restricted session;
If you open a database in unrestricted mode and find that you need to restrict access, you can use the alter System statement with the Enable restricted session clause.
7:
Startup RECOVER: starts the database and starts media recovery.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.