Document Type | Technical Information
Category | Backup/Recovery
Document Number | TBATI029
Overview
This document provides guidance on the shutdown and startup procedures including logs when the DB is abnormally shut down for a specific reason.
Method
1. Terminate All DB Connection Sessions
Disconnect all DB connection sessions due to WAS down, etc. (jdown, kill -9 [jeus pid])
2. Check Estimated Session Rollback Time
SQL> select sess_id, start_time, used_blk, EXP_RB_TIME from v$transaction;
SESS_ID START_TIME USED_BLK EXP_RB_TIME
---------- -------------------------------- ---------- -----------
33 2016-04-22 19:35:32 142690 970
1 row selected.
3. Force DB Shutdown
If the estimated rollback time is too long and you cannot wait for completion, perform a checkpoint and then forcibly shut down the DB.
-- Perform checkpoint SQL> ALTER SYSTEM CHECKPOINT;
4. tbdown abort
5. Perform Recovery
Recovery is performed during the next tbboot.
[cache recovery in progress] [ACF][0] 01 tbsvr_mo:166 [0] acquires Instance Recovery lock(MOUNT mode) [ACF][0] 01 tbsvr_mo:230 [0] holding Instance Recovery locks(RECOVERY mode) [CLC][0] 01 tc_recov:1761 [0] TC RECOVERY...PREPARE โฆ [CLC][0] 01 tc_recov:1249 THREAD#0 logfile scanned. flushed=[582.4194386/0000.02c5dd33]. [CLC][0] 01 tc_recov:1271 THREAD#0, Recovery start tsn progress.(0000.02c02bdc => 0000.02c075d6) [CLC][0] 01 tc_recov:1400 THREAD#0 needs REPLAY, from 0000.02c075d6, (5786040 LOG_BLKs) [CLC][0] 01 tc_cf_df:2012 DATAFILES OPEN 0000.02c5dd34 [CLC][0] 01 tc_recov:1990 [0] TC RECOVERY...START. incar no 0 โฆ [CLC][0] 01 tc_rset.:1382 RSET inits claiming bufs 632142 [CLC][0] 01 tc_rset.:1451 no more free bh for recovery [CLC][0] 01 tc_rset.:1485 complete_ir=0 claiming bufs (reco: 204512/632142, cur: 427630, skip: 0) [CLC][0] 01 tc_recov:2065 [0] can perform Partial Instance Recovery [cache recovery 1st pass Done.] [CLC][0] 01 tc_recov:2073 [0] IR 1st Pass Done โฆ [cache recovery 2nd pass Done.] [CLC][0] 01 tc_recov:2018 [0] IR 2nd Pass Done โฆ [cache recovery complete] [CLC][0] 01 tc_recov:2090 [0] TC RECOVERY...DONE ... [Tx recovery in progress] [CT-][0] 01 tx_recov:1001 TX RECOVERY...PREPARE [CT-][0] 01 tx_recov:1094 TX RECOVERY...START (dead 34) โฆ [DB is open and Tx recovery continues on specific sessions.] [FRM][0] 01 tbsvr_ma:1496 Server is running at NORMAL mode (bootmode : NORMAL) โฆ [Tx recovery complete] [CT-][0] 01 tx_recov:696 TX RECOVERY...DONE
Note
If there was a transaction in progress when the session ended, sess_recovering will be performed.If the tbdown immediate command was used to shut down, the DB will wait until sess_recovering completes before shutting down, and you can confirm that sess_recovering is in progress through messages appearing every 30 seconds in the tracelog.tbsvr_er:063 THROW. ec=ERROR_SERVER_IN_SHUTDOWN(-12039) [ Server instance is shutting down. ] (csr_id:4294967295) [tbsvr_wthr.c:2145:wthr_get_new_cli_con] [Output every 30 seconds] tbsvr_sh:229 shutdown: waiting for releasing SESS lock (tid=38, thr_status=THR_STAT_WAITING, sess_status=SESS_RECOVERING) tbsvr_sh:229 shutdown: waiting for releasing SESS lock (tid=38, thr_status=THR_STAT_WAITING, sess_status=SESS_RECOVERING) โฆ
Caution
Cache recovery cannot be skipped without performing it.Also, if the instance is stopped and restarted during cache recovery, the process will start over from the beginning.