create controlfile for new SID
如果SID更換或者ORACLE_HOME,ORACLE_BASE,
目錄手動更換名稱等,舊的controlfile不能識別現DB檔案的實際位置,
可以透過以下命令,重新建立Contriolfile.
1.進入sqlplus
alter database backup controlfile to trace;
進入db的udump資料夾。檢視最近的tracefile,檢視檔案。
2. 具體script參考tracefile中的指令碼。
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "E4MESMO" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 200
MAXINSTANCES 8
MAXLOGHISTORY 2336
LOGFILE
GROUP 1 '/oracle/E4MESMO/data01/RedoLogs/redo01.log' SIZE 200M,
GROUP 2 '/oracle/E4MESMO/data01/RedoLogs/redo02.log' SIZE 200M,
GROUP 3 '/oracle/E4MESMO/data01/RedoLogs/redo03.log' SIZE 200M,
GROUP 4 '/oracle/E4MESMO/data01/RedoLogs/redo04.log' SIZE 200M,
GROUP 5 '/oracle/E4MESMO/data01/RedoLogs/redo05.log' SIZE 200M,
GROUP 6 '/oracle/E4MESMO/data01/RedoLogs/redo06.log' SIZE 200M
-- STANDBY LOGFILE
DATAFILE
'/oracle/E4MESMO/data01/SYSTEM/system01.dbf',
'/oracle/E4MESMO/data01/UNDO/undo01.dbf',
'/oracle/E4MESMO/data01/UNDO/undo02.dbf',
'/oracle/E4MESMO/data01/SYSAUX/sysaux01.dbf',
'/oracle/E4MESMO/data01/USERS/users01.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t02.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t01.bdf',
'/oracle/E4MESMO/data01/DEFT_I/deft_i02.bdf',
'/oracle/E4MESMO/data01/DEFT_I/deft_i01.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t03.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t04.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t05.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t06.dbf',
'/oracle/E4MESMO/data01/REAL_T/real_t01.bdf',
'/oracle/E4MESMO/data01/HIST_T/hist_t01.bdf',
'/oracle/E4MESMO/data01/HIST_I/hist_i01.bdf',
'/oracle/E4MESMO/data01/CONF_T/conf_t01.bdf',
'/oracle/E4MESMO/data01/CONF_I/conf_i01.bdf',
'/oracle/E4MESMO/data01/REAL_I/real_i01.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t07.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t08.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t09.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t10.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t11.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t12.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t13.dbf',
'/oracle/E4MESMO/data01/HIST_I/hist_i02.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t14.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t15.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t16.dbf',
'/oracle/E4MESMO/data02/REAL_I/real_i02.bdf',
'/oracle/E4MESMO/data02/HIST_I/hist_i03.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t17.dbf',
'/oracle/E4MESMO/data02/HIST_T/hist_t02.bdf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t18.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t19.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t20.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t21.dbf',
'/oracle/E4MESMO/data02/HIST_I/hist_i04.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t22.dbf',
'/oracle/E4MESMO/data02/UNDO/undo03.dbf',
'/oracle/E4MESMO/data02/UNDO/undo04.dbf',
'/oracle/E4MESMO/data02/DEFT_I/deft_i03.bdf',
'/oracle/E4MESMO/data02/HIST_T/hist_t03.bdf',
'/oracle/E4MESMO/data02/HIST_I/hist_i05.dbf',
'/oracle/E4MESMO/data02/DMS900_T/dms900_t01.bdf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t23.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t24.dbf'
CHARACTER SET AL32UTF8
;
-- 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 '/oracle/E4MESMO/oraarch/1_1_710003234.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/oracle/E4MESMO/oraarch/1_1_894099023.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 TEMP ADD TEMPFILE '/oracle/E4MESMO/data02/TEMP/temp04.dbf'
SIZE 2048M REUSE AUTOEXTEND ON NEXT 134217728 MAXSIZE 32767M;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp03.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp02.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp01.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
3.重建完的DB沒有temp tablespace;
再建立temp tablespace;即可。
目錄手動更換名稱等,舊的controlfile不能識別現DB檔案的實際位置,
可以透過以下命令,重新建立Contriolfile.
1.進入sqlplus
alter database backup controlfile to trace;
進入db的udump資料夾。檢視最近的tracefile,檢視檔案。
2. 具體script參考tracefile中的指令碼。
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "E4MESMO" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 200
MAXINSTANCES 8
MAXLOGHISTORY 2336
LOGFILE
GROUP 1 '/oracle/E4MESMO/data01/RedoLogs/redo01.log' SIZE 200M,
GROUP 2 '/oracle/E4MESMO/data01/RedoLogs/redo02.log' SIZE 200M,
GROUP 3 '/oracle/E4MESMO/data01/RedoLogs/redo03.log' SIZE 200M,
GROUP 4 '/oracle/E4MESMO/data01/RedoLogs/redo04.log' SIZE 200M,
GROUP 5 '/oracle/E4MESMO/data01/RedoLogs/redo05.log' SIZE 200M,
GROUP 6 '/oracle/E4MESMO/data01/RedoLogs/redo06.log' SIZE 200M
-- STANDBY LOGFILE
DATAFILE
'/oracle/E4MESMO/data01/SYSTEM/system01.dbf',
'/oracle/E4MESMO/data01/UNDO/undo01.dbf',
'/oracle/E4MESMO/data01/UNDO/undo02.dbf',
'/oracle/E4MESMO/data01/SYSAUX/sysaux01.dbf',
'/oracle/E4MESMO/data01/USERS/users01.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t02.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t01.bdf',
'/oracle/E4MESMO/data01/DEFT_I/deft_i02.bdf',
'/oracle/E4MESMO/data01/DEFT_I/deft_i01.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t03.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t04.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t05.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t06.dbf',
'/oracle/E4MESMO/data01/REAL_T/real_t01.bdf',
'/oracle/E4MESMO/data01/HIST_T/hist_t01.bdf',
'/oracle/E4MESMO/data01/HIST_I/hist_i01.bdf',
'/oracle/E4MESMO/data01/CONF_T/conf_t01.bdf',
'/oracle/E4MESMO/data01/CONF_I/conf_i01.bdf',
'/oracle/E4MESMO/data01/REAL_I/real_i01.bdf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t07.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t08.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t09.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t10.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t11.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t12.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t13.dbf',
'/oracle/E4MESMO/data01/HIST_I/hist_i02.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t14.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t15.dbf',
'/oracle/E4MESMO/data01/DEFT_T/deft_t16.dbf',
'/oracle/E4MESMO/data02/REAL_I/real_i02.bdf',
'/oracle/E4MESMO/data02/HIST_I/hist_i03.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t17.dbf',
'/oracle/E4MESMO/data02/HIST_T/hist_t02.bdf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t18.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t19.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t20.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t21.dbf',
'/oracle/E4MESMO/data02/HIST_I/hist_i04.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t22.dbf',
'/oracle/E4MESMO/data02/UNDO/undo03.dbf',
'/oracle/E4MESMO/data02/UNDO/undo04.dbf',
'/oracle/E4MESMO/data02/DEFT_I/deft_i03.bdf',
'/oracle/E4MESMO/data02/HIST_T/hist_t03.bdf',
'/oracle/E4MESMO/data02/HIST_I/hist_i05.dbf',
'/oracle/E4MESMO/data02/DMS900_T/dms900_t01.bdf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t23.dbf',
'/oracle/E4MESMO/data02/DEFT_T/deft_t24.dbf'
CHARACTER SET AL32UTF8
;
-- 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 '/oracle/E4MESMO/oraarch/1_1_710003234.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/oracle/E4MESMO/oraarch/1_1_894099023.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 TEMP ADD TEMPFILE '/oracle/E4MESMO/data02/TEMP/temp04.dbf'
SIZE 2048M REUSE AUTOEXTEND ON NEXT 134217728 MAXSIZE 32767M;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp03.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp02.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/E4MESMO/data01/TEMP/temp01.dbf'
SIZE 2000M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
3.重建完的DB沒有temp tablespace;
再建立temp tablespace;即可。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29551564/viewspace-1823066/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle create a new database using backup controlfile to traceOracleDatabase
- Create schemas for new prod
- Create a New Parameter ID
- solaris vm create new lv
- Object.create(..)和new(..)的內部實現Object
- no- valid devices were found on which to create new file systemsdev
- MM-step to create a new material type/valuation cloass//account category referenceGo
- ERROR 1135 (HY000): Can't create a new threadErrorthread
- 救命啊java.lang.OutOfMemoryError: unable to create new native threadJavaErrorthread
- java.lang.OutOfMemoryError- unable to create new native thread 問題排查JavaErrorthread
- java.lang.OutOfMemoryError: unable to create new native thread如何解決JavaErrorthread
- Recreating Controlfile With New Database Name Fails ORA-01503_ 109502.1DatabaseAI
- SharePoint 2007 User Re-created in AD with new SID issue on MySite
- oracle create controlfile報 ORA-01503 ORA-01565 ORA-27037Oracle
- MySQL案例-不同尋常的[ERROR]Can't create a new thread (errno 11)MySqlErrorthread
- ERROR 1135 (HY000): Can't create a new thread (errno 11)Errorthread
- oracle sidOracle
- oracle_sid與netmgr listener的sidOracle
- Restore standby database controlfile in ASM (refreshing standby controlfile)RESTDatabaseASM
- 菜鳥調錯(一)——Maven專案部署到Jboss出現:Failed to create a new SAX parserMavenAI
- oracle controlfile理解Oracle
- oracle controlfile template;Oracle
- restore controlfile from autobackREST
- Linux -controlfile -scriptLinux
- New start new hope!
- 有關oracle SIDOracle
- new self()與new static()
- new Child();new Child(1);
- spark大批量讀取Hbase時出現java.lang.OutOfMemoryError: unable to create new native threadSparkJavaErrorthread
- Oracle 控制檔案(CONTROLFILE)Oracle
- oracle重建controlfile指令碼Oracle指令碼
- Oracle SID VS Service NameOracle
- Oracle SID & SERVICE_NAMEOracle
- New
- 課程:A New History for a New China, 1700-2000: New Data and New Methods, Part 1
- Create DatabaseDatabase
- Oracle 控制檔案(CONTROLFILE) -- <2>Oracle
- Oracle 控制檔案(CONTROLFILE)- <1>Oracle