Today in the SOA several database restart operation, one of the database in the shutdown process has been in hang state, more than 10 minutes without any progress, the following procedures:
One: The scene at that time
sql> shutdown Immediate
--No return results
Second: Problem locating process
1. Query related processes only Oracle's critical processes exist
ps-ef |grep Ora_
SOADB 4487 1 0 22:57:05? 0:00 Ora_Reco_soadbprd
SOADB 4485 1 5 22:57:05? 0:00 Ora_Smon_soadbprd
SOADB 4526 1 0 22:57:15? 0:00 Ora_arc0_soadbprd
SOADB 4479 1 0 22:57:04? 0:00 Ora_DBW1_soadbprd
SOADB 4483 1 0 22:57:04? 0:01 Ora_ckpt_soadbprd
SOADB 4468 1 0 22:57:02? 0:02 Ora_Pmon_soadbprd
2. View the Alter log, which appears as follows:
Shutting down Instance:further logons disabled
Thu Nov 14 22:04:24 2013
Stopping background process CJQ0
Thu Nov 14 22:04:24 2013
Stopping background process QMNC
Thu Nov 14 22:04:26 2013
Stopping background process MMNL
Thu Nov 14 22:04:27 2013
Stopping background process Mmon
Thu Nov 14 22:04:27 2013
Shutting down instance (immediate)
License High water mark = 152
Thu Nov 14 22:04:27 2013
Stopping Job queue slave processes, flags = 7
Thu Nov 14 22:04:27 2013
Job Queue Slave processes stopped
Waiting for dispatcher ' D000 ' to shutdown
All dispatchers and shared servers shutdown
Thu Nov 14 22:04:30 2013
ALTER DATABASE CLOSE NORMAL
Thu Nov 14 22:09:34 2013
waiting for Smon to disable TX recovery.
Thu Nov 14 22:23:46 2013
MMNL absent for 1201 secs; Foregrounds taking over
3. For tips on red fonts, check the official website,ID 1076161.6
The official description is as follows:
During shutdown The Smon process is cleaning up extents and updating the data
Dictionary tables with the marked free extents. As the extents is marked as
Freed, they is removed from the table for used extents, uet$ and placed on the
Table for free extents, fet$.
The official description is due to the fact that the Smon process is stuck in the database when the temporal tablespace data block is cleared and the data dictionary is updated, the principle is clear, there is a link, one is to tell this situation may be a bug, another link teaches us to diagnose the database hang the specific reason. But now the problem is, if it has been waiting, it may take a few hours, the change database restart only half an hour, it is impossible to stay, how to do?
4. Try canceling the shutdown immediate command
Ctral + C does not have any effect, create a new link to execute a query or other operation, will report a mistake, the specific information is as follows:
ora-01089:immediate shutdown in progress-no operations is permitted
Can see, at this time nothing allowed operation, then want to find from the operating system found shutdown immediate process kill off, later carefully think, this operation may be more dangerous than shutdown abort, it is likely to cause the database can not start, found the relevant resources on the Internet, Did not find a way, at this time suddenly think of just learn Oracle database start and stop when there is a command is
Startup force: Aborts the running of the current database and begins a normal startup of the database
Startup force = Shutdown Abort +startup This is the only time you can use it.
5. Force stop shutdown Immediate
New Open a Sqlplus/as sysdba
sql> Startup force
ORACLE instance started.
total System Global area 3206836224 bytes
fixed size 2180024 bytes
variable size 1778388040 bytes
database buffers 1409286144 bytes
redo buffers 16982016 bytes
database mounted.
database opened.
At this time shutdown Immediate window stopped, the database back to operational state, at this time I again with the shutdown immediate command again normal stop database, still can't stop, no way to execute startup force to get control of the database, Select the Shutdown abort method to stop the database. Reboot, luckily, the boot was successful! ( Note that this operation has a certain risk, careful operation )
Ext.: http://blog.sina.com.cn/s/blog_61cd89f60102eeg1.html
ORA-01089 database does not shut down properly