The host SHUTDOWN experiment fails to be shut down normally due to host commands.

Source: Internet
Author: User

The host SHUTDOWN experiment fails to be shut down normally due to host commands.

SHUTDOWN has the following parameters:

SHUTDOWN NORMAL: NORMAL is also the default clause, and the execution condition is

No new connections are allowed after the statement is issued.

Before the database is shut down, the database waits for all currently connectedusers to disconnect from the database.

No instance recovery process is required at the next startup.

SHUTDOWN IMMEDIATE: The execution scenario is

To initiate an automatic and unattended backup.

When a power shutdown is going to occur soon.

When the database or one of its applications is functioning irregularly and youcannot contact users to ask them to log off or they are unable to log off.

The execution condition is:

No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.

Any uncommitted transactions are rolled back. (If long uncommitted transactionsexist, this method of shutdown might not complete quickly, despite its name .)

Oracle Database does not wait for users currently connected to the database todisconnect. The database implicitly rolls back active transactions and disconnectsall connected users.

Similarly, no instance recovery process is required at the next startup.

SHUTDOWN TRANSACTIONAL: The execution scenario is that you need to stop a regular instance, but permit the completion of transactions for all activities first. The execution condition is:

No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.

After all transactions have completed, any client still connected to the instance isdisconnected.

At this point, the instance shuts down just as it wocould when a SHUTDOWNIMMEDIATE statement is submitted.

No instance recovery process is required at the next startup.

This close operation does not cause the client to lose the task and does not require all users to exit.

SHUTDOWN ABORT: The execution scenario is

You need to shut down the database instantaneously (for example, if you know apower shutdown is going to occur in one minute ).

You experience problems when starting a database instance.

The execution condition is:

No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.

Current client SQL statements being processed by Oracle Database areimmediately terminated.

Uncommitted transactions are not rolled back.

Oracle Database does not wait for users currently connected to the database todisconnect. The database implicitly disconnects all connected users.

The instance recovery process is required at the next startup.


It can be seen that ABORT is a type of brute force shutdown and does not roll back transactions implicitly. Because there are still dirty blocks, instance recovery is required at next startup.


Lab:

1. Run the shutdown normal command to close the database.

SQL> shutdown normal

Found promptSHUTDOWN: waiting for logins to complete.

From the above introduction, we can use the shutdown normal method to shut down the database and do not allow new connections. At the same time, all connected clients must be disconnected before they can continue to shut down normally. It is suspected that there may be a connection that has not been disconnected.

Kill-9 7255 still does not work.


2. Run the shutdown immediate command to close the database.

Press CTRL + C to stop shutdown normal, and then use the shutdown immediate command to close the database.

SQL> shutdown immediate


PromptSHUTDOWN: Active processes prevent shutdown operation

An article (416658.1) on MOS specifically introduced the problem of immediate reporting. The reason is:

"If the DB Control repository is running on the database target against which shutdown immediate was attempted then an incorrect order of events seems used. you shoshould stop DB Control first to get rid of all connections between DB Control and the repository database and then shutdown the database with 'shutdown immediate '."

This means that some events may be being executed in the DB Control database. You need to stop the DB Control to avoid the connection between all DB Control and the database before executing shutdown immediate to close the database, but here I have no such operation, it should be the case that no common user has not performed exit, think about it,Previously, after using SYS to log on, I used host to switch to OS, but did not switch back and quit. Therefore, due to this problem, shutdown immediate may cause hang..


3. Run the shutdown abort command to close the database.

According to MOS

SQL> shutdown abort close directly

SQL> startup restrict allows users with the restrict session permission to log on. In other words, the user cannot be properly shut down after login.

SQL> shutdown normal execution normal close


Now everything is quiet.


Summary:

1. Do not use ABORT unless you have to. Who knows what will happen.

2. Before closing the command, we recommend that you disconnect all sessions that use SYS connections, especially those that use host to switch OS connections, which may not be noticed. This is a lesson.

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.