STEP BY STEP PROCESS TO DUPLICATE AN ORACLE DATABASE & SIMPLE STEPS, EASY TO UNDERSTAND WITH SQL QUERIES :
1. connect to TEST database
2. create pfile from spfile
3. modify the pfile according the newdatabase and copy to location D:\app\admin\product\11.2.0\dbhome_1\database\INITTESTpilot.ORA
4. create database structure (adump,dpdump and flash recovery area)
5. optional "alter database backup controlfile to trace;"
6. shut down the TEST database
7. copy oradata file to new location and control
8. create services :
a. C:\> oradim -new -sid nps01
b. Make entries in listner.ora
c. Make entry in tnsnames.ora
9. sqlplus sys/USERPRO@nps01 as sysdba
a) Open the database in nomount
10.run this script on new database sql promopt>>
sqlplus>
CREATE CONTROLFILE REUSE set DATABASE "TEST2" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 'D:\app\USERPRO\oradata\TEST2\REDO01.LOG' size 50M ,
GROUP 2 'D:\app\USERPRO\oradata\TEST2\REDO02.LOG' size 50M ,
GROUP 3 'D:\app\USERPRO\oradata\TEST2\REDO03.LOG' size 50M ,
-- STANDBY LOGFILE
DATAFILE
'D:\app\USERPRO\oradata\TEST2\SYSTEM01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\SYSAUX01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\UNDOTBS01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\USERS01.DBF'
CHARACTER SET WE8MSWIN1252;
11. startup pfile='D:\app\Admin\product\11.2.0\dbhome_1\database\initNPS01.ora';
12. ALTER DATABASE OPEN RESETLOGS;
13. ALTER TABLESPACE temp ADD TEMPFILE 'D:\app\USERPRO\oradata\TEST2\temp01.dbf' REUSE;
14. Shut down and startup again.
15. run command to chage data_pump_dir path-sqlplus> create or replace directory data_pump_dir as 'D:\app\USERPRO\admin\TEST2\dpdump';
1. connect to TEST database
2. create pfile from spfile
3. modify the pfile according the newdatabase and copy to location D:\app\admin\product\11.2.0\dbhome_1\database\INITTESTpilot.ORA
4. create database structure (adump,dpdump and flash recovery area)
5. optional "alter database backup controlfile to trace;"
6. shut down the TEST database
7. copy oradata file to new location and control
8. create services :
a. C:\> oradim -new -sid nps01
b. Make entries in listner.ora
c. Make entry in tnsnames.ora
9. sqlplus sys/USERPRO@nps01 as sysdba
a) Open the database in nomount
10.run this script on new database sql promopt>>
sqlplus>
CREATE CONTROLFILE REUSE set DATABASE "TEST2" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 'D:\app\USERPRO\oradata\TEST2\REDO01.LOG' size 50M ,
GROUP 2 'D:\app\USERPRO\oradata\TEST2\REDO02.LOG' size 50M ,
GROUP 3 'D:\app\USERPRO\oradata\TEST2\REDO03.LOG' size 50M ,
-- STANDBY LOGFILE
DATAFILE
'D:\app\USERPRO\oradata\TEST2\SYSTEM01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\SYSAUX01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\UNDOTBS01.DBF' ,
'D:\app\USERPRO\oradata\TEST2\USERS01.DBF'
CHARACTER SET WE8MSWIN1252;
11. startup pfile='D:\app\Admin\product\11.2.0\dbhome_1\database\initNPS01.ora';
12. ALTER DATABASE OPEN RESETLOGS;
13. ALTER TABLESPACE temp ADD TEMPFILE 'D:\app\USERPRO\oradata\TEST2\temp01.dbf' REUSE;
14. Shut down and startup again.
15. run command to chage data_pump_dir path-sqlplus> create or replace directory data_pump_dir as 'D:\app\USERPRO\admin\TEST2\dpdump';
No comments:
Post a Comment