控制檔案修復
一、部分控制檔案損壞或丟失情況,資料庫的修復
--檢視資料庫當前啟動狀態及控制檔案資訊
SQL> select instance_name,status,host_name from v$instance;
INSTANCE_NAME STATUS HOST_NAME
---------------- ------------ ----------------------------------------------------------------
PROD OPEN gc1
SQL> select name from v$controlfile;
NAME
----------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/PROD/disk1/control01.ctl
/u01/app/oracle/oradata/PROD/disk2/control01.ctl
/u01/app/oracle/oradata/PROD/disk3/control01.ctl
/u01/app/oracle/oradata/PROD/disk4/control01.ctl
--控制檔案手動破壞性操作(即手動刪除其中任一一個控制檔案),關庫後再啟庫
[oracle@gc1 dbs]$ rm /u01/app/oracle/oradata/PROD/disk2/control01.ctl
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219760 bytes
Variable Size 121635664 bytes
Database Buffers 293601280 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info
--檢視告警日誌資訊,紅色字型部分詳細顯示出錯資訊(即哪個控制檔案有問題)如下:
starting up 3 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=12, OS id=6939
Thu Apr 3 22:03:32 2014
starting up 10 shared server(s) ...
Thu Apr 3 22:03:34 2014
ALTER DATABASE MOUNT
Thu Apr 3 22:03:37 2014
ORA-00202: control file: '/u01/app/oracle/oradata/PROD/disk2/control01.ctl'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Thu Apr 3 22:03:37 2014
ORA-205 signalled during: ALTER DATABASE MOUNT...
通過以上資訊提示,可知缺少 '/u01/app/oracle/oradata/PROD/disk2/control01.ctl'控制檔案,複製一份其它的控制檔案即可。
--恢復損壞的控制檔案,啟庫
SQL> select instance_name,status,host_name from v$instance;
INSTANCE_NAME STATUS HOST_NAME
---------------- ------------ ----------------------------------------------------------------
PROD STARTED gc1
--當前資料庫為nomount狀態,可進行控制檔案的copy操作
[oracle@gc1 dbs]$ cp /u01/app/oracle/oradata/PROD/disk1/control01.ctl /u01/app/oracle/oradata/PROD/disk2/control01.ctl
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
二、控制檔案都損壞,通過control file trace資訊,重建控制檔案修復資料庫
--先對控制檔案做trace和備份
SQL> alter database backup controlfile to trace;
Database altered.
trace後,控制檔案資訊轉儲存放在udump下
SQL> alter database backup controlfile to '/home/oracle/control.bak';
Database altered.
2.1 利用controlfile trace方式,重建控制檔案
--udump目錄下,檢視剛剛trace的控制檔案資訊
[oracle@gc1 dbs]$ cd /u01/app/oracle/oradata/PROD/udump
[oracle@gc1 udump]$ ls -lt | grep prod_ora
-rw-r----- 1 oracle oinstall 6622 Apr 3 22:20 prod_ora_6966.trc
-rw-r----- 1 oracle oinstall 599 Apr 3 22:03 prod_ora_6917.trc
-rw-r----- 1 oracle oinstall 2512 Apr 3 22:00 prod_ora_6145.trc
-rw-r----- 1 oracle oinstall 656 Apr 3 18:11 prod_ora_6144.trc
-rw-r----- 1 oracle oinstall 599 Apr 3 18:11 prod_ora_6095.trc
-rw-r----- 1 oracle oinstall 784 Apr 3 18:07 prod_ora_6071.trc
…………
[oracle@gc1 udump]$ more prod_ora_6966.trc
/u01/app/oracle/oradata/PROD/udump/prod_ora_6966.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1
System name: Linux
Node name: gc1
Release: 2.6.18-164.el5
Version: #1 SMP Tue Aug 18 15:51:54 EDT 2009
Machine: i686
Instance name: PROD
Redo thread mounted by this instance: 0
Oracle process number: 26
Unix process pid: 6966, image: oracle@gc1 (TNS V1-V3)
*** 2014-04-03 22:12:26.393
*** SERVICE NAME:() 2014-04-03 22:12:26.393
*** SESSION ID:(289.1) 2014-04-03 22:12:26.393
kccsga_update_ckpt: num_1 = 1, num_2 = 0, num_3 = 0, lbn_2 = 0, lbn_3 = 0
*** 2014-04-03 22:12:47.395
ktsmgtur(): TUR was not tuned for 555 secs
*** 2014-04-03 22:20:54.291
-- The following are current System-scope REDO Log Archival related
-- parameters and can be included in the database initialization file.
--
-- LOG_ARCHIVE_DEST=''
-- LOG_ARCHIVE_DUPLEX_DEST=''
--
-- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf
--
-- DB_UNIQUE_NAME="PROD"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=2
-- STANDBY_FILE_MANAGEMENT=MANUAL
-- STANDBY_ARCHIVE_DEST=?/dbs/arch
-- FAL_CLIENT=''
-- FAL_SERVER=''
--
-- LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/product/10.2.0/db_1/dbs/arch'
-- LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM EXPEDITE NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='NOREGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'
-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
-- LOG_ARCHIVE_DEST_STATE_1=ENABLE
--
-- Below are two sets of SQL statements, each of which creates a new
-- control file and uses it to open the database. The first set opens
-- the database with the NORESETLOGS option and should be used only if
-- the current versions of all online logs are available. The second
-- set opens the database with the RESETLOGS option and should be used
-- if online logs are unavailable.
-- The appropriate set of statements can be copied from the trace into
-- a script file, edited as necessary, and executed when there is a
-- need to re-create the control file.
--
-- Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/u01/app/oracle/oradata/PROD/disk1/redo01.log',
'/u01/app/oracle/oradata/PROD/disk2/redo01.log'
) SIZE 100M,
GROUP 2 (
'/u01/app/oracle/oradata/PROD/disk1/redo02.log',
'/u01/app/oracle/oradata/PROD/disk2/redo02.log'
) SIZE 100M,
GROUP 3 (
'/u01/app/oracle/oradata/PROD/disk1/redo03.log',
'/u01/app/oracle/oradata/PROD/disk2/redo03.log'
) SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
'/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
CHARACTER SET ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_1_794420273.dbf';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMPTS ADD TEMPFILE '/u01/app/oracle/oradata/PROD/disk5/temp01.dbf'
SIZE 20971520 REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "PROD" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/u01/app/oracle/oradata/PROD/disk1/redo01.log',
'/u01/app/oracle/oradata/PROD/disk2/redo01.log'
) SIZE 100M,
GROUP 2 (
'/u01/app/oracle/oradata/PROD/disk1/redo02.log',
'/u01/app/oracle/oradata/PROD/disk2/redo02.log'
) SIZE 100M,
GROUP 3 (
'/u01/app/oracle/oradata/PROD/disk1/redo03.log',
'/u01/app/oracle/oradata/PROD/disk2/redo03.log'
) SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
'/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
CHARACTER SET ZHS16GBK
;
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_1_794420273.dbf';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMPTS ADD TEMPFILE '/u01/app/oracle/oradata/PROD/disk5/temp01.dbf'
SIZE 20971520 REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
注意:以上資訊中,二個CREATE CONTROLFILE REUSE DATABASE語句,是用來重建控制檔案的,主要區別在於是否重建日誌檔案,
正常關庫情況,會生成全域性檢查點,重建控制檔案採用NORESETLOGS方式即可,否則採用RESETLOGS。
--刪除所有控制檔案,關庫再啟庫
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk1/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk2/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk3/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk4/control01.ctl
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219760 bytes
Variable Size 121635664 bytes
Database Buffers 293601280 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info
也報之前那個錯,這次因四個控制檔案都被刪除,無法採用第一種方式進行控制檔案的修復,可採用trace控制檔案中的重建控制檔案語句,進行控制檔案重建。
--重建控制檔案
SQL> CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 2
4 MAXDATAFILES 30
5 MAXINSTANCES 1
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 (
9 '/u01/app/oracle/oradata/PROD/disk1/redo01.log',
10 '/u01/app/oracle/oradata/PROD/disk2/redo01.log'
11 ) SIZE 100M,
12 GROUP 2 (
13 '/u01/app/oracle/oradata/PROD/disk1/redo02.log',
14 '/u01/app/oracle/oradata/PROD/disk2/redo02.log'
15 ) SIZE 100M,
16 GROUP 3 (
17 '/u01/app/oracle/oradata/PROD/disk1/redo03.log',
18 '/u01/app/oracle/oradata/PROD/disk2/redo03.log'
19 ) SIZE 100M
20 -- STANDBY LOGFILE
21 DATAFILE
22 '/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
23 '/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
24 '/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
25 '/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
26 CHARACTER SET ZHS16GBK
27 ;
Control file created.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
PROD MOUNTED
SQL> alter database open;
Database altered.
三、控制檔案都損壞,通過控制檔案舊備份修復資料庫
原理:首先利用控制檔案舊備份啟庫至mount狀態,然後再做controlfile trace,進而獲取重建控制檔案語句(回到上一種情況解決了)
--刪除所有控制檔案
[oracle@gc1 ~]$ rm /u01/app/oracle/oradata/PROD/disk1/control01.ctl
[oracle@gc1 ~]$ rm /u01/app/oracle/oradata/PROD/disk2/control01.ctl
[oracle@gc1 ~]$ rm /u01/app/oracle/oradata/PROD/disk3/control01.ctl
[oracle@gc1 ~]$ rm /u01/app/oracle/oradata/PROD/disk4/control01.ctl
SQL> shutdown immediate;
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/PROD/disk1/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219760 bytes
Variable Size 121635664 bytes
Database Buffers 293601280 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
PROD STARTED
--複製控制檔案舊備份,啟庫至mount狀態,執行trace操作
[oracle@gc1 ~]$ cp /home/oracle/control.bak /u01/app/oracle/oradata/PROD/disk1/control01.ctl
[oracle@gc1 ~]$ cp /home/oracle/control.bak /u01/app/oracle/oradata/PROD/disk2/control01.ctl
[oracle@gc1 ~]$ cp /home/oracle/control.bak /u01/app/oracle/oradata/PROD/disk3/control01.ctl
[oracle@gc1 ~]$ cp /home/oracle/control.bak /u01/app/oracle/oradata/PROD/disk4/control01.ctl
SQL> alter database mount;
Database altered.
SQL> alter database backup controlfile to trace;
Database altered.
--檢視trace資訊,獲取重建控制檔案語句
[oracle@gc1 bdump]$ cd /u01/app/oracle/oradata/PROD/udump
[oracle@gc1 udump]$ ls -lt
total 996
-rw-r----- 1 oracle oinstall 7031 Apr 4 22:11 prod_ora_8558.trc
-rw-r----- 1 oracle oinstall 599 Apr 4 22:06 prod_ora_8509.trc
-rw-r----- 1 oracle oinstall 75303 Apr 4 22:05 prod_ora_8294.trc
-rw-r----- 1 oracle oinstall 1737 Apr 4 19:23 prod_ora_7777.trc
-rw-r----- 1 oracle oinstall 599 Apr 4 18:51 prod_ora_7728.trc
-rw-r----- 1 oracle oinstall 784 Apr 4 18:08 prod_ora_7576.trc
-rw-r----- 1 oracle oinstall 599 Apr 3 22:37 prod_ora_7082.trc
-rw-r----- 1 oracle oinstall 6824 Apr 3 22:37 prod_ora_6966.trc
[oracle@gc1 udump]$ more prod_ora_8558.trc
……
CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/u01/app/oracle/oradata/PROD/disk1/redo01.log',
'/u01/app/oracle/oradata/PROD/disk2/redo01.log'
) SIZE 100M,
GROUP 2 (
'/u01/app/oracle/oradata/PROD/disk1/redo02.log',
'/u01/app/oracle/oradata/PROD/disk2/redo02.log'
) SIZE 100M,
GROUP 3 (
'/u01/app/oracle/oradata/PROD/disk1/redo03.log',
'/u01/app/oracle/oradata/PROD/disk2/redo03.log'
) SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
'/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
CHARACTER SET ZHS16GBK
;
……
CREATE CONTROLFILE REUSE DATABASE "PROD" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 (
'/u01/app/oracle/oradata/PROD/disk1/redo01.log',
'/u01/app/oracle/oradata/PROD/disk2/redo01.log'
) SIZE 100M,
GROUP 2 (
'/u01/app/oracle/oradata/PROD/disk1/redo02.log',
'/u01/app/oracle/oradata/PROD/disk2/redo02.log'
) SIZE 100M,
GROUP 3 (
'/u01/app/oracle/oradata/PROD/disk1/redo03.log',
'/u01/app/oracle/oradata/PROD/disk2/redo03.log'
) SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
'/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
'/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
CHARACTER SET ZHS16GBK
;
--刪除利用控制檔案舊備份生成的控制檔案,利用重建控制檔案語句,重新生成(注意因是利用舊備份檔案獲取的重建語句,需核對相應的logfile及datafile資訊,如果不一致,修改後再執行重建語句)。
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk1/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk2/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk3/control01.ctl
[oracle@gc1 udump]$ rm /u01/app/oracle/oradata/PROD/disk4/control01.ctl
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219760 bytes
Variable Size 121635664 bytes
Database Buffers 293601280 bytes
Redo Buffers 2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
PROD STARTED
SQL> CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 2
4 MAXDATAFILES 30
5 MAXINSTANCES 1
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 (
9 '/u01/app/oracle/oradata/PROD/disk1/redo01.log',
10 '/u01/app/oracle/oradata/PROD/disk2/redo01.log'
11 ) SIZE 100M,
12 GROUP 2 (
13 '/u01/app/oracle/oradata/PROD/disk1/redo02.log',
14 '/u01/app/oracle/oradata/PROD/disk2/redo02.log'
15 ) SIZE 100M,
16 GROUP 3 (
17 '/u01/app/oracle/oradata/PROD/disk1/redo03.log',
18 '/u01/app/oracle/oradata/PROD/disk2/redo03.log'
19 ) SIZE 100M
20 -- STANDBY LOGFILE
21 DATAFILE
22 '/u01/app/oracle/oradata/PROD/disk3/system01.dbf',
23 '/u01/app/oracle/oradata/PROD/disk4/undotbs01.dbf',
24 '/u01/app/oracle/oradata/PROD/disk4/sysaux01.dbf',
25 '/u01/app/oracle/oradata/PROD/disk3/users01.dbf'
26 CHARACTER SET ZHS16GBK
27 ;
Control file created.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
PROD MOUNTED
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/app/oracle/oradata/PROD/disk3/system01.dbf'
SQL> recover database;
Media recovery complete.
SQL> alter database open;
Database altered.
注意:以上open時出錯,採用了recover database方式,修復後才可open,要是這種方式還不行,可用下面這二種方式修復
recover database until cancel;
recover database until cancel using backup controlfile;
到些為止,資料庫基本已修改,但實際從重建控制檔案語句中你會發現,只記錄了日誌檔案、資料檔案、字符集,缺臨時表空間。
--修復臨時表空間
SQL> set autotrace traceonly
SQL> select * from scott.emp;
14 rows selected.
Execution Plan
----------------------------------------------------------
An uncaught error happened in fetching the records : ORA-25153: Temporary Tablespace is Empty
ORA-25153: Temporary Tablespace is Empty
Statistics
----------------------------------------------------------
455 recursive calls
0 db block gets
81 consistent gets
8 physical reads
0 redo size
1363 bytes sent via SQL*Net to client
381 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
6 sorts (memory)
0 sorts (disk)
14 rows processed
以上資訊可知,Temporary Tablespace表空間已損壞。
--重建Temporary Tablespace表空間,並設為預設臨時表空間
SQL> create temporary tablespace TEMPTS2 TEMPFILE '/u01/app/oracle/oradata/PROD/disk5/temp02.dbf' size 50m;
Tablespace created.
SQL> alter database default temporary tablespace tempts2;
Database altered.
SQL> select * from scott.emp;
14 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 3956160932
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 14 | 518 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 14 | 518 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
8 consistent gets
0 physical reads
0 redo size
1363 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
14 rows processed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21251711/viewspace-1139023/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQL Anywhere db檔案損壞修復 DB檔案修復 DB資料庫修復SQL資料庫
- 如何修復MySQL配置檔案?MySql
- win10系統dll檔案一鍵修復 缺少dll檔案修復方法Win10
- 任意檔案上傳漏洞修復
- win10系統檔案受損如何修復 win10系統檔案修復的方法Win10
- XFS檔案系統的備份、恢復、修復
- 與控制檔案有關的恢復
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- webstorm根據.eslintrc檔案自動修復WebORMEsLint
- system資料檔案頭損壞修復
- linux檔案系統損壞如何修復Linux
- 與控制檔案有關的恢復(二)
- 【/proc/檔案淺析】另類辦法恢復資料檔案和控制檔案
- Linux中XFS檔案系統的備份,恢復,修復Linux
- 檔案系統修復的一個過程
- TomcatAJP檔案包含漏洞及線上修復漏洞Tomcat
- [20201218]資料檔案OS頭的修復.txt
- Win10怎樣修復系統引導檔案_Win10修復系統引導檔案的步驟Win10
- RAC控制檔案恢復(三種不同情況)
- [20210225]控制檔案序列號滿的恢復.txt
- win10缺失dll檔案怎麼修復 win10一鍵修復dll缺失Win10
- 修復PG.conf檔案出現的問題
- 淺談被加殼ELF檔案的DUMP修復
- 網站漏洞修復之Metinfo 檔案上傳漏洞網站
- dedecms資料庫檔案出錯的修復方法資料庫
- InterBase資料庫檔案損壞的修復方法資料庫
- 雲伺服器xfs檔案系統修復方法伺服器
- rman恢復控制檔案的一個小錯誤
- 任意檔案讀取與下載的原理及修復
- EXCEL不可讀怎麼辦,修復EXCEL檔案不可讀Excel
- win10如何修復登錄檔 windows10登錄檔修復方法Win10Windows
- Oracle 控制檔案Oracle
- 修復損壞的gzip壓縮檔案之原理篇
- 在Linux中,如何建立、檢查和修復檔案系統?Linux
- vcode 儲存修復vue檔案的eslint語法錯誤VueEsLint
- 伺服器zfs檔案系統修復過程記錄伺服器
- Mac修復多個檔案錯誤許可權的方法?Mac
- 電腦丟失dll檔案一鍵修復 win10缺少dll檔案怎麼辦Win10
- 24:WEB漏洞-檔案上傳之WAF繞過及安全修復Web