Online System
Online System
Online System
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
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.