您好,登錄后才能下訂單哦!
本篇文章為大家展示了Oracle中怎么重新創(chuàng)建控制文件,內(nèi)容簡(jiǎn)明扼要并且容易理解,絕對(duì)能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。
一、創(chuàng)建控制文件有2種方式
分別是 Resetlogs 和 Noresetlogs 方式,當(dāng)我們將控制文件備份到trace 文件時(shí),可以看到里面包含了2部分的重建語句,一個(gè)是使用resetlogs,另一個(gè)是使用noresetlogs。
Set #1. NORESETLOGS case
The followingcommands will create a new control file and use it to open the database. Dataused by Recovery Manager will be lost.
Additional logsmay be required for media recovery of offline.
Use this only ifthe current versions of all online logs are available.
--使用noresetlogs僅是當(dāng)前所有的online logs可用時(shí)。
Set #2. RESETLOGS case
The followingcommands will create a new control file and use it to open the database. Dataused by Recovery Manager will be lost.
The contents ofonline logs will be lost and all backups will be invalidated. Use this only ifonline logs are damaged.
--使用resetlogs,將導(dǎo)致online logs里的內(nèi)容丟失,并且所有的備份失效,僅當(dāng)online logs 隨壞的情況下,才使用resetlos模式。
二、獲取重建控制文件的腳本
alter database backup controlfile to trace;
獲取trace文件的SQL(Oracle 11g)
SELECT TRACEFILE
FROM V$PROCESS
WHERE ADDR IN
(SELECT PADDR
FROM V$SESSION
WHERE SID IN (SELECT SID FROM V$MYSTAT WHERE ROWNUM = 1))
三、測(cè)試環(huán)境獲取的trace文件內(nèi)容
Trace file /u01/app/oracle/diag/rdbms/primary_orcl/orcl/trace/orcl_ora_2260.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: test-db
Release: 2.6.32-279.el6.x86_64
Version: #1 SMP Wed Jun 13 18:24:36 EDT 2012
Machine: x86_64
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 19
Unix process pid: 2260, image: oracle@test-db (TNS V1-V3)
*** 2018-12-02 21:59:49.680
*** SESSION ID:(1.5) 2018-12-02 21:59:49.680
*** CLIENT ID:() 2018-12-02 21:59:49.680
*** SERVICE NAME:(SYS$USERS) 2018-12-02 21:59:49.680
*** MODULE NAME:(sqlplus@test-db (TNS V1-V3)) 2018-12-02 21:59:49.680
*** ACTION NAME:() 2018-12-02 21:59:49.680
kwqmnich: current time:: 13: 59: 48: 0
kwqmnich: instance no 0 repartition flag 1
kwqmnich: initialized job cache structure
*** 2018-12-02 21:59:50.422
kwqinfy: Call kwqrNondurSubInstTsk
*** 2018-12-02 22:48:05.484
-- 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="primary_orcl"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=4
-- ARCHIVE_LAG_TARGET=1800
-- STANDBY_FILE_MANAGEMENT=AUTO
-- STANDBY_ARCHIVE_DEST=?/dbs/arch
-- FAL_CLIENT=primary_orcl
-- FAL_SERVER=standby_orcl
--
-- LOG_ARCHIVE_DEST_2='SERVICE=standby_orcl'
-- LOG_ARCHIVE_DEST_2='OPTIONAL REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_2='LGWR NOAFFIRM NOEXPEDITE NOVERIFY ASYNC=61440'
-- LOG_ARCHIVE_DEST_2='REGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_2='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'
-- LOG_ARCHIVE_DEST_2='DB_UNIQUE_NAME=standby_orcl'
-- LOG_ARCHIVE_DEST_2='VALID_FOR=(STANDBY_LOGFILE,STANDBY_ROLE)'
-- LOG_ARCHIVE_DEST_STATE_2=DEFER
--
-- LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/oradata/orcl_arch'
-- LOG_ARCHIVE_DEST_1='OPTIONAL REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOEXPEDITE NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='REGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'
-- LOG_ARCHIVE_DEST_1='DB_UNIQUE_NAME=primary_orcl'
-- 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 "ORCL" NORESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/orcl_data/orcl/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl_data/orcl/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl_data/orcl/redo03.log' SIZE 50M BLOCKSIZE 512,
GROUP 4 '/u01/app/oracle/oradata/orcl_data/orcl/redo04.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl_data/orcl/system01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/sysaux01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/undotbs01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/users01.dbf'
CHARACTER SET ZHS16GBK
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON');
-- Configure RMAN configuration record 2
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE','DISK TO ''/backup/orcl_%F''');
-- 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/oradata/orcl_arch/1_1_762083164.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_901324477.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_920849936.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_925085090.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_974422417.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_974502550.dbf';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Block change tracking was enabled, so re-enable it now.
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
USING FILE '/u01/app/oracle/oradata/block_track/block_tracking.chg' REUSE;
-- All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Files in read-only tablespaces are now named.
ALTER DATABASE RENAME FILE 'MISSING00005'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test01.dbf
';
ALTER DATABASE RENAME FILE 'MISSING00006'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test_ts2.dbf';
-- Online the files in read-only tablespaces.
ALTER TABLESPACE "TEST" ONLINE;
ALTER TABLESPACE "TEST_TS" ONLINE;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/orcl_data/orcl/temp01.dbf'
SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
-- 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 "ORCL" RESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/orcl_data/orcl/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl_data/orcl/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl_data/orcl/redo03.log' SIZE 50M BLOCKSIZE 512,
GROUP 4 '/u01/app/oracle/oradata/orcl_data/orcl/redo04.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl_data/orcl/system01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/sysaux01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/undotbs01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/users01.dbf'
CHARACTER SET ZHS16GBK
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON');
-- Configure RMAN configuration record 2
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE','DISK TO ''/backup/orcl_%F''');
-- 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/oradata/orcl_arch/1_1_762083164.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_901324477.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_920849936.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_925085090.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_974422417.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/app/oracle/oradata/orcl_arch/1_1_974502550.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
-- Block change tracking was enabled, so re-enable it now.
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
USING FILE '/u01/app/oracle/oradata/block_track/block_tracking.chg' REUSE;
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Files in read-only tablespaces are now named.
ALTER DATABASE RENAME FILE 'MISSING00005'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test01.dbf
';
ALTER DATABASE RENAME FILE 'MISSING00006'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test_ts2.dbf';
-- Online the files in read-only tablespaces.
ALTER TABLESPACE "TEST" ONLINE;
ALTER TABLESPACE "TEST_TS" ONLINE;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/orcl_data/orcl/temp01.dbf'
SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
-- End of tempfile additions.
五、 重新創(chuàng)建控制文件
由于redo log file 是完整的,所以采用 NORESETLOGS方式重建控制文件。
刪除控制文件并重啟啟動(dòng)數(shù)據(jù)庫后報(bào)錯(cuò),信息提示如下:
ALTER DATABASE MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl_data/orcl/control02.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl_data/orcl/control01.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
執(zhí)行創(chuàng)建控制文件SQL的信息
Total System Global Area 784998400 bytes
Fixed Size 2232472 bytes
Variable Size 591400808 bytes
Database Buffers 188743680 bytes
Redo Buffers 2621440 bytes
SYS@orcl> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Control file created.
SYS@orcl> SYS@orcl> SYS@orcl>
PL/SQL procedure successfully completed.
SYS@orcl> SYS@orcl> SYS@orcl>
PL/SQL procedure successfully completed.
SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
SYS@orcl> SYS@orcl> 2
Database altered.
SYS@orcl> SYS@orcl>
System altered.
SYS@orcl> SYS@orcl>
Database altered.
SYS@orcl> SYS@orcl> 2 3
Database altered.
SYS@orcl> 2
Database altered.
SYS@orcl> SYS@orcl>
Tablespace altered.
SYS@orcl>
Tablespace altered.
SYS@orcl> SYS@orcl> SYS@orcl> SYS@orcl> 2
Tablespace altered.
SYS@orcl>
數(shù)據(jù)庫日志信息:
Sun Dec 02 22:57:32 2018
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options.
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: test-db
Release: 2.6.32-279.el6.x86_64
Version: #1 SMP Wed Jun 13 18:24:36 EDT 2012
Machine: x86_64
Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora
System parameters with non-default values:
processes = 150
memory_target = 752M
control_files = "/u01/app/oracle/oradata/orcl_data/orcl/control01.ctl"
control_files = "/u01/app/oracle/oradata/orcl_data/orcl/control02.ctl"
db_block_size = 8192
compatible = "11.2.0.0.0"
log_archive_dest_1 = "location=/u01/app/oracle/oradata/orcl_arch valid_for=(all_logfiles,all_roles) db_unique_name=primary_orcl"
log_archive_dest_2 = "service=standby_orcl LGWR ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=standby_orcl"
log_archive_dest_state_1 = "enable"
log_archive_dest_state_2 = "defer"
fal_client = "primary_orcl"
fal_server = "standby_orcl"
log_archive_config = ""
log_archive_format = "%t_%s_%r.dbf"
archive_lag_target = 1800
standby_file_management = "AUTO"
_allow_resetlogs_corruption= TRUE
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=orclXDB)"
local_listener = "my_orcl"
audit_file_dest = "/u01/app/oracle/admin/orcl/adump"
audit_trail = "DB"
db_name = "orcl"
db_unique_name = "primary_orcl"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
Sun Dec 02 22:57:33 2018
PMON started with pid=2, OS id=2996
Sun Dec 02 22:57:33 2018
PSP0 started with pid=3, OS id=3000
Sun Dec 02 22:57:34 2018
VKTM started with pid=4, OS id=3004 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Sun Dec 02 22:57:34 2018
GEN0 started with pid=5, OS id=3010
Sun Dec 02 22:57:34 2018
DIAG started with pid=6, OS id=3014
Sun Dec 02 22:57:34 2018
DBRM started with pid=7, OS id=3018
Sun Dec 02 22:57:34 2018
DIA0 started with pid=8, OS id=3022
Sun Dec 02 22:57:34 2018
MMAN started with pid=9, OS id=3026
Sun Dec 02 22:57:34 2018
DBW0 started with pid=10, OS id=3030
Sun Dec 02 22:57:34 2018
LGWR started with pid=11, OS id=3034
Sun Dec 02 22:57:34 2018
CKPT started with pid=12, OS id=3038
Sun Dec 02 22:57:34 2018
SMON started with pid=13, OS id=3042
Sun Dec 02 22:57:34 2018
RECO started with pid=14, OS id=3046
Sun Dec 02 22:57:34 2018
MMON started with pid=15, OS id=3050
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Sun Dec 02 22:57:34 2018
MMNL started with pid=16, OS id=3054
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
Sun Dec 02 22:57:34 2018
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/orcl_data/orcl/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl_data/orcl/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl_data/orcl/redo03.log' SIZE 50M BLOCKSIZE 512,
GROUP 4 '/u01/app/oracle/oradata/orcl_data/orcl/redo04.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl_data/orcl/system01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/sysaux01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/undotbs01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/users01.dbf'
CHARACTER SET ZHS16GBK
WARNING: Default Temporary Tablespace not specified in CREATE DATABASE command
Default Temporary Tablespace will be necessary for a locally managed database in future release
Successful mount of redo thread 1, with mount id 1521687390
Completed: CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/orcl_data/orcl/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl_data/orcl/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl_data/orcl/redo03.log' SIZE 50M BLOCKSIZE 512,
GROUP 4 '/u01/app/oracle/oradata/orcl_data/orcl/redo04.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl_data/orcl/system01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/sysaux01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/undotbs01.dbf',
'/u01/app/oracle/oradata/orcl_data/orcl/users01.dbf'
CHARACTER SET ZHS16GBK
ALTER DATABASE RECOVER DATABASE
Media Recovery Start
Serial Media Recovery started
Media Recovery failed with error 264
ORA-283 signalled during: ALTER DATABASE RECOVER DATABASE ...
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
USING FILE '/u01/app/oracle/oradata/block_track/block_tracking.chg' REUSE
Block change tracking file is current.
Completed: ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
USING FILE '/u01/app/oracle/oradata/block_track/block_tracking.chg' REUSE
Archived Log entry 1 added for thread 1 sequence 99 ID 0x598b1587 dest 1:
Archived Log entry 2 added for thread 1 sequence 100 ID 0x598b1587 dest 1:
Archived Log entry 3 added for thread 1 sequence 101 ID 0x598b1587 dest 1:
ALTER DATABASE OPEN
Block change tracking file is current.
LGWR: STARTING ARCH PROCESSES
Sun Dec 02 22:57:38 2018
ARC0 started with pid=20, OS id=3120
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Sun Dec 02 22:57:39 2018
ARC1 started with pid=21, OS id=3124
Sun Dec 02 22:57:39 2018
ARC2 started with pid=22, OS id=3128
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC2: Becoming the heartbeat ARCH
Sun Dec 02 22:57:39 2018
ARC3 started with pid=23, OS id=3132
Thread 1 advanced to log sequence 103 (thread open)
Thread 1 opened at log sequence 103
Current log# 3 seq# 103 mem# 0: /u01/app/oracle/oradata/orcl_data/orcl/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Starting background process CTWR
Archived Log entry 4 added for thread 1 sequence 102 ID 0x598b1587 dest 1:
Sun Dec 02 22:57:39 2018
CTWR started with pid=24, OS id=3136
Block change tracking service is active.
SMON: enabling cache recovery
[3067] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:2892964 end:2892994 diff:30 (0 seconds)
Dictionary check beginning
Tablespace 'TEMP' #3 found in data dictionary,
but not in the controlfile. Adding to controlfile.
Tablespace 'TEST' #6 found in data dictionary,
but not in the controlfile. Adding to controlfile.
Tablespace 'TEST_TS' #7 found in data dictionary,
but not in the controlfile. Adding to controlfile.
File #5 found in data dictionary but not in controlfile.
Creating OFFLINE file 'MISSING00005' in the controlfile.
File #6 found in data dictionary but not in controlfile.
Creating OFFLINE file 'MISSING00006' in the controlfile.
Dictionary check complete
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
*********************************************************************
WARNING: The following temporary tablespaces contain no files.
This condition can occur when a backup controlfile has
been restored. It may be necessary to add files to these
tablespaces. That can be done using the SQL statement:
ALTER TABLESPACE <tablespace_name> ADD TEMPFILE
Alternatively, if these temporary tablespaces are no longer
needed, then they can be dropped.
Empty temporary tablespace: TEMP
*********************************************************************
Database Characterset is ZHS16GBK
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Sun Dec 02 22:57:39 2018
QMNC started with pid=25, OS id=3140
LOGSTDBY: Validating controlfile with logical metadata
LOGSTDBY: Validation complete
Completed: ALTER DATABASE OPEN
ALTER DATABASE RENAME FILE 'MISSING00005'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test01.dbf
'
Completed: ALTER DATABASE RENAME FILE 'MISSING00005'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test01.dbf
'
ALTER DATABASE RENAME FILE 'MISSING00006'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test_ts2.dbf'
Completed: ALTER DATABASE RENAME FILE 'MISSING00006'
TO '/u01/app/oracle/oradata/orcl_data/orcl/test_ts2.dbf'
ALTER TABLESPACE "TEST" ONLINE
Completed: ALTER TABLESPACE "TEST" ONLINE
ALTER TABLESPACE "TEST_TS" ONLINE
Completed: ALTER TABLESPACE "TEST_TS" ONLINE
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Starting background process CJQ0
Sun Dec 02 22:57:40 2018
CJQ0 started with pid=27, OS id=3164
Setting Resource Manager plan SCHEDULER[0x318F]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Starting background process VKRM
Sun Dec 02 22:57:43 2018
VKRM started with pid=26, OS id=3168
Sun Dec 02 22:57:52 2018
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/orcl_data/orcl/temp01.dbf'
SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M
Completed: ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/orcl_data/orcl/temp01.dbf'
SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M
上述內(nèi)容就是Oracle中怎么重新創(chuàng)建控制文件,你們學(xué)到知識(shí)或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識(shí)儲(chǔ)備,歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。