oracle create a new database using backup controlfile to trace

maojinyu發表於2011-08-02

1 atler database backup controlfile to trace

2 modify pfile (create pfile='/tmp/init.ora' from spfile);

"db_name" to the new string;


3 export ORACLE_SID="NEW DATABASE NAME"

startup nomount pfile='/tmp/init.ora'

CREATE CONTROLFILE set DATABASE "jerry" RESETLOGS ARCHIVELOG

alter database mount;

alter database open;

[@more@]CREATE CONTROLFILE set DATABASE "jerry" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'D:ORACLEPRODUCT10.2.0ORADATATESTREDO01.LOG' SIZE 50M,
GROUP 2 'D:ORACLEPRODUCT10.2.0ORADATATESTREDO02.LOG' SIZE 50M,
GROUP 3 'D:ORACLEPRODUCT10.2.0ORADATATESTREDO03.LOG' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'D:BACKUPDATA_D-TEST_I-2053925071_TS-SYSTEM_FNO-1_04MHB1P8.DBF',
'D:BACKUPDATA_D-TEST_I-2053925071_TS-UNDOTBS1_FNO-2_07MHB1RC.DBF',
'D:BACKUPDATA_D-TEST_I-2053925071_TS-SYSAUX_FNO-3_05MHB1QB.DBF',
'D:BACKUPDATA_D-TEST_I-2053925071_TS-USERS_FNO-4_03MHB1FM.DBF',
'D:BACKUPDATA_D-TEST_I-2053925071_TS-TEST_FNO-5_06MHB1R5.DBF',
'D:BACKUPDATA_D-TEST_I-2053925071_TS-USERS_FNO-6_08MHB1RJ.DBF'
CHARACTER SET ZHS16GBK

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9907339/viewspace-1053334/,如需轉載,請註明出處,否則將追究法律責任。

相關文章