Sie sind auf Seite 1von 10

THIS DOCUMENT IS ABOUT SYSTEM COPY FROM PRODUCTION

SERVER TO QULAITY SERVER

SYSTEM DETAILS
DETAILS
IP
HOST
SID
DBSID
SYSTEM NUMBER
ORACLE VERSION
SERVER DETAILS
DATABASE SIZE

SOURCE SYSTEM
TARGET SYSTEM
192.168.0.5
192.168.0.6
PDS05
PDS06
P05
P06
P05
P06
00
00
10 G
10 G
WINDOWS 2003 SP1 WINDOWS 2003 SP1
90 GB
84 GB

SYSTEM A = P05

Scenario

SYSTEM B = P06

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/mirrorA

D: /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 <schema name>.<table
name>;

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
dbs_ora_schema

VALUE
SAPSR3-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

Das könnte Ihnen auch gefallen