Don't forget the steps to clone the Oracle Database
STEP 1:
SQL> create pfile from spfile;
SQL > alter database backup controlfile to trace;
Get the last trace file from udump and edit as below and save as control.ctl
Use the Second part
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "OLDLSQ" NORESETLOGS
NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 240
MAXINSTANCES 1
MAXLOGHISTORY 113
LOGFILE
GROUP 1 ('/u03/oradata/oldlsq/log1a.dbf',
'/u03/oradata/olslsq/log1b.dbf') SIZE 30M,
GROUP 2 ('/u04/oradata/oldlsq/log2a.dbf',
'/u04/oradata/oldlsq/log2b.dbf') SIZE 30M
DATAFILE
'/u01/oradata/oldlsq/system01.dbf',
'/u01/oradata/oldlsq/mydatabase.dbf'
;
CREATE CONTROLFILE REUSE DATABASE "OLDLSQ" NORESETLOGS
NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 240
MAXINSTANCES 1
MAXLOGHISTORY 113
LOGFILE
GROUP 1 ('/u03/oradata/oldlsq/log1a.dbf',
'/u03/oradata/olslsq/log1b.dbf') SIZE 30M,
GROUP 2 ('/u04/oradata/oldlsq/log2a.dbf',
'/u04/oradata/oldlsq/log2b.dbf') SIZE 30M
DATAFILE
'/u01/oradata/oldlsq/system01.dbf',
'/u01/oradata/oldlsq/mydatabase.dbf'
;
STEP 2: Shutdown the old database
STEP 3: copy datafiles, tempfiles,redo to new location, Also copy password file,initOra.file.
STEP 3: copy datafiles, tempfiles,redo to new location, Also copy password file,initOra.file.
STEP 4: Create the bdump, udump and cdump directories
STEP 5: Edit controlfile per new location and also change below term.
Old:
Old:
CREATE CONTROLFILE REUSE DATABASE "OLDLSQ" RESETLOGS
New:
CREATE CONTROLFILE SET DATABASE "NEWLSQ" RESETLOGS
STEP 6: Edit pfile as per new location.
STEP 7: follow below steps to start database.
Check $ORACLE_SID(new sid)
Delete spfileNewSID if exist.
SQL> startup nomount;
SQL> @control.ctl
SQL> alter database open resetlogs;
n Add temporary tablespace ( use traced controlfile to get the syntax)
SQL> create spfile from pfile;
SQL > startup force;
No comments:
Post a Comment