Quantcast
Channel: SCN : Blog List - SAP Enterprise Portal
Viewing all articles
Browse latest Browse all 334

Homogeneous System Copy with Offline Backup

$
0
0

Homogeneous System Copy is a procedure to copy the contents of database from source system to target SAP system. Target SAP system is required to be installed on the same operating system and the same database system as the source SAP system with no patch and version difference. Homogeneous system copy with offline backup of source system is an optimum procedure to perform system copy with minimal downtime.

 

 

Why we need System Copy

It is recommended to make a system copy in order to set up a test, demo, training or standby system in enterprise landascape. Upgrade should be performed in a test system first. This will help to identify customer-specific problems which might result from modifications.

 

Procedure

Use below mentioned procedure to perform Offline Homogeneous System Copy.


1. Usage of “brbackup” command

  • Generate Control file using sql alter database query
  • alter database backup controlfile to trace;
  • As a result of this command, it generates an .trc file under user trace directory under /Oracle/<SSID>/saptrace/usertrace/. Copy the file to another location and rename it to control.sql.
  • Remove all the comments from the control file and replace the statement as: CREATE CONTROLFILE REUSE SET DATABASE “<target SID>” RESETLOGS ARCHIVELOG
  • Replace source SID with target SID, and change the file system locations according to the target system.
  • Generate backup files
  • brbackup -b -c -d disk -m all -t offline -u system/********
  • Backup files will be generated under /Oracle/<SSID>/sapbackup/.

 

2. Usage of “brrestore” command

  • Clear all the files from /Oracle/<subfolders>/
  • Copy the backup folder contents in to target systems backup folder.
  • Copy the control file generated from source system to the following location in target system. /Oracle/<TSID>/sapreorg/
  • Restore from backup       brrestore -c -d disk -m all -u system/********

 

3. Connect to sql plus, and use the flowing:

  • sqlplus /nolog
  • connect / as sysdba
  • @control.sql
  • shutdown
  • startup
  • alter database open resetlogs
  • shutdown
  • startup

 

4. Create r3trans.log using “r3trans -d”

  • Path: C:\Documents and Settings\<SID>adm\

 

5. Create Users

  • create user “OPS$<SERVER NAME>\SAPSERVICE<SID>” default tablespace system temporary tablespace psaptemp identified externally;
  • Note: Keep all the table and usernames in caps letters:

 

6. Grant all PRIVILEGES TO BOTH USERS

  • Grant all privileges to “OPS$<SERVER NAME>\SAPSERVICE<SID>”;   or
  • GRANT SELECT, UPDATE ON SAPUSER TO “OPS$<SERVER NAME>\SAPSERVICE<SID>”;
  • SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = ‘OPS$<SERVER NAME>\<SID>ADM’;
  • SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = ‘OPS$<SERVER NAME>\SAPSERVICE<SID>’;

         

          Eg. grant connect to “OPS$<SERVER NAME>\<SID>ADM”;

               grant sapdba to “OPS$<SERVER NAME>\<SID>ADM”;

               grant resource to “OPS$<SERVER NAME>\<SID>ADM”;

 

7.  Create database table as follows or refer SAP Note 0000400241

  • create table “OPS$<SERVER NAME>\<SID>ADM”.SAPUSER as select * from “OPS$SERVER17\ER1ADM”.SAPUSER;

 

8. Look Synonym table for “SAPSERVICE<SID>” user

  • SELECT OWNER, TABLE_OWNER, TABLE_NAME FROM DBA_SYNONYMS WHERE SYNONYM_NAME=’SAPUSER’;

 

9. Create Synonym table for “SAPSERVICE<SID>” user

  • CREATE SYNONYM “OPS$<SERVERNAME>\SAPSERVICE<SID>”.SAPUSER FOR ” OPS$<SERVER NAME>\<SID>ADM”.SAPUSER;

 

10. Check for the user account status:

  • select username, account_status from dba_users;

 

11. To Unlock user account

  • alter user SAPSR3 account unlock;

 

12. Check/Verify logon attempt limit

  • SELECT LIMIT FROM DBA_PROFILES WHERE PROFILE = ‘DEFAULT’ AND RESOURCE_NAME = ‘FAILED_LOGIN_ATTEMPTS’;

 

13. Change the profile type to unlimited:

  • ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;

 

14. Configure SAP ECC

  • Apply license in new system created on target system.
  • Logon to SAP R/3, go to tcode: se06 and select “Database copy or migration” and execute “Post installation processing”. [Note: Change all the source system objects to target system objects as asked]
  • Delete old TMS configuration and make new configuration for TMS via tcode: STMS.

 

 

Troubleshooting


Look for ABAP work processes as dev_w0, dev_w1 etc at D:\usr\sap\<SID>\DVEBMGS05\work


Additional commands for reference


* select username, account_status from dba_users;

#sqlplus / as sysdba;

SQL> CREATE USER OPS$<SID>ADM IDENTIFIED BY <NEW_PASS> ;

SQL> GRANT CONNECT, RESOURCE TO OPS$<SID>ADM;

SQL> DROP TABLE OPS$<SID>ADM.SAPUSER;

SQL> CREATE TABLE OPS$<SID>ADM.SAPUSER (USERID VARCHAR2(256), PASSWD VARCHAR2(256));

SQL> INSERT INTO OPS$<SID>ADM.SAPUSER VALUES (‘SAPR3′, ‘NEW_PASSWORD’);

SQL> ALTER USER SAPR3 IDENTIFIED BY <NEW_PASSWORD>;

SQL> ALTER DATABASE RENAME GLOBAL_NAME TO <TSID>;


Viewing all articles
Browse latest Browse all 334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>