system copy oracle windows
DESCRIPTION
system copy guide on Windows ServerTRANSCRIPT
THIS DOCUMENT IS ABOUT SYSTEM COPY FROM PRODUCTION SERVER TO QULAITY SERVER
SYSTEM DETAILS
DETAILSSOURCE SYSTEM TARGET SYSTEM
IP192.168.0.5192.168.0.6
HOSTPDS05PDS06
SIDP05P06
DBSIDP05P06
SYSTEM NUMBER0000
ORACLE VERSION10 G10 G
SERVER DETAILSWINDOWS 2003 SP1WINDOWS 2003 SP1
DATABASE SIZE90 GB84 GB
SYSTEM A = P05 SYSTEM B = P06
Scenario
copy database ( P05 ) which resides on System-A onto another system ( System-B ) with different database ID ( P06).
Prerequisites
1. Source and Target Operating Systems are same.
2. Target System have enough space for source database.
3. Source and Target Databases are same.
4. Oracle 8.1.7 or higher database.
PROCEDURE
At source system
Step 1.
Generate a script to create CONTROL FILE via SQLPLUS.
The trace file will be created at .
Rename the file p05_ora_3544.trc to control.sql
Step 2.
Stop database and copy the data files to target system.
Copy the following files to the target system
/oracle/P05/sapdata1/*>D:/oracle/P06/sapdata1/*
/oracle/P05/sapdata2/*>D:/oracle/P06/sapdata2/*
/oracle/P05/sapdata3/*>D:/oracle/P06/sapdata3/*
/oracle/P05/sapdata4/*>D:/oracle/P06/sapdata4/*
/oracle/P05/sapdata5/*>D:/oracle/P06/sapdata5/*
/oracle/P05/sapdata6/*>D:/oracle/P06/sapdata6/*
/oracle/P05/mirrorAD: /oracle/P06/mirror
Step 3
Copy the control file (control.sql) to the location D:\ of the Target system
AT Target system
Step 1
Delete contents above and including STARTUP NOMOUNT
Replace REUSE with SET
Replace and change the SID by find and replace NORESETLOGS with RESETLOGS
Delete contents below the just after the CHARACTER SET entry
control.sql so that it looks like ;
Step 2
Check the initP06.ora file
Edit and add 2 lines under ####ORACLE OPS PARAMETER
remote_os_authent=True
os_authent_prefix=ops$
Step 3
Login to oracle
Sqlplus /nolog
Step 4
Execute the new control file
Step 5
sql>recover database using backup control file until cancel
and then choose CANCEL...
Step 6
Execute Open Reset logs
Step 7
Shutdown the database and restart using profile file
Create spfile from pfile;
Step 8
Truncate the following tables
make a file named x.sql and paste the following truncate lines
and executesql>@d:\x.sql
***note in your case use you source schema id in the following truncate .lines eg. in our case source schema was sapsr3. The syntax for the truncate line in truncate table .;
truncate table sapsr3.ddlog;
truncate table sapsr3.sdbah;
truncate table sapsr3.sdbad;
truncate table sapsr3.pahi;
truncate table sapsr3.moni;
truncate table sapsr3.dbsnp;
truncate table sapsr3.alconseg;
truncate table sapsr3.alsystems;
truncate table sapsr3.csmsegm;
truncate table sapsr3.osmon;
truncate table sapsr3.sdbap;
truncate table sapsr3.sdbar;
truncate table sapsr3.tlock;
truncate table sapsr3.dbstathora ;
truncate table sapsr3.dbstatiora ;
truncate table sapsr3.dbstaihora ;
truncate table sapsr3.dbstattora;
Make sure 17 tables are truncated by counting the output (Table truncated lines).
Step 9
Obtain the files oradbusr.sql and sapdba_role.sql (search the system)
Put the file in D:\ drive and execute .
a) oradbusr.sql can be found in
C:\Program Files\sapinst_instdir\ERP\SYSTEM\ORA\CENTRAL\AS
b) sapdba_role.sql can be found in
D:\usr\sap\P03\DVEBMGS00\exe
Or
D:\usr\sap\P03\SYS\exe\uc\NTI386
1) First execute oradbusr.sql
Here also we use sapsr3 because our source schema id was SAPSR3
2)Secondly execute sapdba_role.sql
Here we used sr3 from schema name sapsr3.
Sql> @D:\sapdba_role.sql SR3 P06 NT
Step 10
Verify the environment variables
VARIBLE NAME VALUE
dbs_ora_schemaSAPSR3-ABAP Schema
Type the following in command prompt
#R3trans d
It should return (000)
Step 11
Start the SAP system
The environmental variable dbs_ora_schema needs to be adjusted on the tgthost for users oratgt and tgtadm.
I f sap mmc not up run brtools
8 additional functions
4 change password of database user
3 database owner
Enter name of db owner
Eg sapsr3 (here)
Post system copy activities
Delete and install license
Stop all batch jobs
Lock users
Lock printers
Execute tcode SICK
Configure STMS
Maintain RFC connections