Online System Copy

Published on May 2016 | Categories: Documents | Downloads: 30 | Comments: 0 | Views: 137
of 3
Download PDF   Embed   Report

Comments

Content

SYSTEM COPY
System Copy of Online Database
1. Put tablespaces in backup mode on source system a. b. c. Go to transaction DB02 and click “Current Sizes” Copy list of tablespaces into notepad document Edit notepad document with command to put tablespaces in backup mode i. alter tablespace <TABLESPACE NAME> begin backup; d. e. Save the file as begin_backup.sql Log onto sqlplus and run the script i. sqlplus /nolog ii. connect / as sysdba iii. @begin_backup.sql 2. 3. Copy data files from source to target system Turn backup mode off a. b. c. Edit script from 1.d, change “begin” to “end” Save script as end_backup.sql Log onto sqlplus and run the script i. sqlplus /nolog ii. connect / as sysdba iii. @end_backup.sql 4. Perform log file switch i. ii. iii. iv. 5. sqlplus /nolog connect / as sysdba alter system archive log all; or alter system switch logfile;

Make backup of control file on source system i. Sqlplus /nolog ii. Connect / as sysdba iii. Alter database backup controlfile to trace as ‘c:\cntrl.sql’

6.

Copy remaining required files form source to target system i. Redo logs ii. Archive logs iii. cntrl.sql

7. 8.

Delete old control files on target system Edit the cntrl.sql file on target system a. Change “reuse” to “set”

b. c. d. 9.

Delete unnecessary lines Change <SID> from source to target system Save as cntrl_<SID>.sql

Rename archive logs with new SID

10. Recreate control file on target system a. b. c:\sqlplus /nolog SQL>@cntrl_<SID>.sql

11. Check the environment variable dbs_ora_schema. This variable should be set to the correct schema. In releases prior to 620, the schema will be SAPR3. In 620 and later systems, the schema will be named according to the original source system of the database (ie SAP<SID>). In 620 and later systems, you can check this by entering the following commands. C:\sqlplus /nolog SQL>connect / as sysdba SQL>select tablespace_name from dba_tablespaces; The SID for the schema will be the same as that found in the tablespace names, PSAP<SID>*. 12. Check to make sure the rollback segments are configured identically on the source and target systems. If not, edit the init<SID>.ora file on the target system so that the rollback segment names are the same as on the source system. MAKE SUREYOU DO THIS BEFORE RECOVERING THE DATABASE!!! 13. Recover database on target system a. b. c. SQL>connect / as sysdba SQL>set autorecovery on Enter command to recover database i. Recover to a point in time SQL>recover database until time ‘YYYY-MM-DD:HH:MM:SS’ using backup controlfile; ii. Recover specific logfiles SQL>recover database using backup controlfile until cancel; Then press <RET> until all relevent logfiles have been applied then enter CANCEL, or enter AUTO to apply all available logfiles. d. e. SQL>alter database open resetlogs; SQL>exit

14. Setup OPS$ user on target system a. Log into sqlplus i. sqlplus /nolog ii. connect as sysdba b. Drop old OPS$ users

i. SQL>select owner from dba_tables where table_name = ‘SAPUSER’; ii. Make note of the owners returned from the above command iii. SQL>drop table “<owner>”.SAPUSER; c. Run script to create new user i. sqlplus /nolog @ORADBUSR.SQL SAP<SID> NT <hostname or domain name> <SID> ii. If you receive error messages about not being able to set the default tablespace, you must edit the script accordingly. Either change the default tablespace to SYSTEM or hard code the SchemaID variable to the original schema owner in the statement that sets the default tablespace. In 620 systems, the schema can be found by checking the environment variable dbs_ora_schema. Set password for Schema ID (the standard password is “sap”) SQL> alter user <SCHEMA_ID> identified by <password>; SQL> commit; e. Insert Schema ID/Password into the SAPUSER table SQL> insert into “OPS$<HOSTNAME or DOMAIN>\<SID>ADM”.SAPUSER values (‘<SCHEMA_ID’,’<password>’); SQL> commit; 15. Since the database schema on the target system is still the original source system schema, you must reset the schema environment variable to the old source SID (ie SAP<source system SID>).

d.

.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close