Thursday 24 October 2013

SAP-Post DB refresh activities with Oracle database

There will be many doubts for the beginners of SAP BASIS, on how  to perform DB refresh activities with SAP.

Scenario:- Need to perform DB refresh with latest offline/Online backup taken from Production system to Quality system.

Here are the detailed steps to perform the same.

Pre-requsities/Primary steps to be performed in Quality server before starting DB refresh.

1) Take the backup of existing User Master records in Quality system using client copy export method.

Goto SCC8 T-code and perform client export with SAP_USER profile, target system and execute.



The client export will create 3 Transport requests.


2) Take the backup of existing RFC connections in Quality server (Optional)

Export the following tables

RFCATTRIB
RFCCAT
RFCCHECK
RFCDES
RFCDES_VIEW
RFCDOC
RFCLIST
RFCTRUST
RFCTYPE

Note:- Please refer the below link for learning how to export and import tables
http://sapbasisinfos.blogspot.in/2013/10/sap-export-and-import-tables-in-sap.html


3) Take the snapshot of stms_import history of transports to refer the transports performed to Quality server only.

4) Take Note of existing SAP License in Quality server.

5) Export background jobs running in Quality server (Optional)

BTCCl
BTCDELAY
BTCEVTJOB
BTCH1000
BTCH1010
TBTCO
TBTCP

Note:- Please refer the below link for learning how to export and import tables
http://sapbasisinfos.blogspot.in/2013/10/sap-export-and-import-tables-in-sap.html

6) Take note of Logical system naming conventions of existing clients in Quality server from BD54


Start Restoration in Quality server:-

Perform Restoration in Quality Server using BRTOOLS or using any third party backup utility.

Start Post restoration activities:-

Once restoration is completed proceed with post restoration activities

1) Create control trace from Production system and modify the SID and data files path accordingly and save the file as control.sql


 


Open control.trc file and modify the files as following

In the first line change the words from REUSE-->SET, SID--> Target DBSID, NORESETLOGS--> RESETLOGS, NOARCHIVELOG--> ARCHIVELOG

STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "<SID>" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE

Change all datafile locations with target SID, and remove all unwanted lines, there should not be any space in between any of the lines.

Then save the file as control.sql and paste it in the quality server.


2) Now remove the control files got restored from backup in the control file location in quality server.

3) Next login to sqlplus and new create control file for Quality server.

Sql> Startup nomount

Sql> @control.sql



Sql> recover database using backup controlfile until cancel
(use this option to recover DB with archive logs, if its an online backup)

Sql> alter database open resetlogs



Sql> shutdown immediate

Sql> Startup



4) Next drop the OPS$ users and create new users according to SAP Note 400241

Sql> select owner from dba_tables where table_name='SAPUSER';



Sql> select owner from dba_synonyms where synonoym_name='SAPUSER';

Sql> drop table "OPS$<SID>ADM"."SAPUSER";



Sql> drop synonym "OPS$SAPSERVICE<SID>."SAPUSER";



Sql> sqlplus /nolog @oradbusr.sql NT <SID> SAPSR3 <Domain>/<Hostname> <SID>



Reset the schema user password, so that the passwords will get updated in the OPS$ tables which we have created.







Once OPS$ users created & schema password reset, check the db connection with SAP from OS level, using the below command from command prompt or terminal.

cmd> R3trans -d

The command should return 0000 as return code, if not trouble shoot the same using SAP Note 400241.


5) Create temporary tablespace

create temporary tablespace using BRTools as below.






6) SAP license install



Note:- For digital signatured license please use "saplicense -pinstall" option, if that does not work, make the SAP up and apply license using SAP* user with T-code "SLICENSE".

6) You can start SAP at this stage and start performing post restoration activities from SAP level.

Note:- If there is a condition that no background job has to run during SAP startup, just make background workprocess parameter "rdisp/wp_no_btc" to zero and start SAP.

a) Suspend all existing background jobs by running report "BTCTRNS1" in SE38 T-code






b) Reconfigure TMS configuration in Quality server with production TMS as reference.

Goto SE06 T-code and select "Database copy or Database Migration", click "Perform post-Installation Actions"



Provide the SID of Production system and continue.





Old TMS configuration is  deleted and now reconfigure TMS by login to 000 client and goto STMS T-code & create the transport system with the existing domain controller.


After configuration the TMS configuration will show inconsistency in transport route, just goto transport route page



And adjust the transport route of quality server with domain controller.



The system will automatically configure the transport route by adjusting with domain controller.



 c) Import RFC destinations which you have exported earlier from quality server.

Note:- Please refer the below link for learning how to export and import tables
http://sapbasisinfos.blogspot.in/2013/10/sap-export-and-import-tables-in-sap.html

d) Import background jobs which you have exported earlier from quality server. (Optional)

Note:- Please refer the below link for learning how to export and import tables
http://sapbasisinfos.blogspot.in/2013/10/sap-export-and-import-tables-in-sap.html

e) Schedule standard background jobs from SM36 T-code




f) Perform client copy import with user master records, which you have exported earlier.

To perform goto STMS_IMPORT T-code and add the transport requests to tp buffer and start import to the respective client.

Once import is complete perform post import activities from SCC7 T-code.

g) Perform logical system name conversion for quality server using T-code BDLS

Provide the Production system logical name in "Old Logical System Name" and Quality server logical name in "New Logical System Name" and execute.



h) Reconfigure email from T-code SCOT

 

Double click on SMTP and provide your mail server IP address in "Mail Host" and port number.



i) Change the spool server for all the printers using T-code SPAD



Provide the quality server spool server name and press enter.



 j) Reconfigure operation modes from T-code RZ04

That's all need to perform for the completion of post activities, now you can release users and start using quality server.




 

27 comments:

  1. Hi Reader,

    If you have any doubts on this please feel free to ask me, suggestions or additions are also welcomed.

    Thanks,
    Giridharan

    ReplyDelete
    Replies
    1. Hi Giri,
      Your given post activities in db refresh can you please send me prerequisites and procedure.. Thanks in advance

      Delete
    2. Pre-steps has no difference with post, here i have mentioned in places what needs to be prepared for the post step, thats all 'required if you can think reversely. Hope this helps :-)

      Delete
    3. Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download Now

      >>>>> Download Full

      Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download LINK

      >>>>> Download Now

      Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download Full

      >>>>> Download LINK Av

      Delete
  2. Hello
    in se06 steps , ,Could you pls give details about choosing yes or no ? all of it is yes?

    ReplyDelete
  3. This blog is very useful which is related to my searches. posted best topics and I have also Sap OS DB MIGRATION professional. we provide SAP OS DB MIGRATION ONLINE TRAINING.To execute an OS/DB migration specially certified for OS/DB migrations, executes the migration
    locally, irrespective of whether you are migrating a development system, a test system or a
    productive system. This ensures that the required "know-how" is available to deal with the
    complexity of the situation. SAP OS DB MIGRATION ONLINE TRAINING check for the operating system or the database to migrate production systems.
    SAP OS DBMIGRATION ONLINE TRAINING

    ReplyDelete
  4. Good Post. The practical problem in SAP BASIS Support is clearly defined.

    ReplyDelete
  5. I work for SAP Education and came across this blog the other day. Many thanks for highlighting SAP Learning Hub in such a positive manner!The SAP OS DB MIGRATION ONLINE TRAINING is mandatory if you are going to migrate a productive system. The service delivery then includes all the systems in that system landscape.

    SAP OS DB MIGRATION ONLINE TRAINING

    ReplyDelete
    Replies
    1. SAP-Post DB refresh activities with Oracle database good.

      Delete
  6. can you please explain more on bdls : how all sid get changed? from source to target, we need to run any report or just same as above?

    ReplyDelete
  7. Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download Now

    >>>>> Download Full

    Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download LINK

    >>>>> Download Now

    Sap Basis Support - Issues And Solutions: Sap-Post Db Refresh Activities With Oracle Database >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete

Pages