qas refresh

44
FNP Db12 -> overview of database backups To restore FNP backup into QAS :- 1. Maxis uses standard SAP brbackup & brrestore 2. Db12. To make sure the backup is successful with RC0. For this case, it’s an offline backup to tape on 22 March 2009 3. Double click to check the details of backup log 4. Tape name FNPD7 to be mounted to QAS tape drive 1. Copy back<SID>.log and dbxxxxx.aft (aft file for offline backup) @/oracle/QAS/sapbackup to QAS server accordingly. Use SFTP.

Upload: bineet-lal

Post on 07-Apr-2015

824 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: QAS Refresh

FNPDb12 -> overview of database backups

To restore FNP backup into QAS :-1. Maxis uses standard SAP brbackup & brrestore2. Db12. To make sure the backup is successful with RC0. For this case, it’s an

offline backup to tape on 22 March 2009

3. Double click to check the details of backup log 4. Tape name FNPD7 to be mounted to QAS tape drive

1. Copy back<SID>.log and dbxxxxx.aft (aft file for offline backup) @/oracle/QAS/sapbackup to QAS server accordingly. Use SFTP.

a. Rename backFNP.log as backQAS.logb. Amend the backup log file dbxxxx.aft accordingly by replacing FNP value to

QAS. Keep PSAPFNPXX as it is.

Page 2: QAS Refresh

c. Cross check if QAS has the similar filesystem setup as FNP and available storage

d. stopsape. Remove all sapdata folders and datafiles. Keep control files

f. Issue command “brrestore –b beaejijn.aft “ in /oracle/QAS/sapbackup folder 2. Prepare the script. Run below command in your FNP database sqlplus

a. Alter database backup controlfile to trace;b. Locate the trace file at

/oracle/<SID>/saptrace/usertrace/<SID>_ora_<PID>.trc

Modify the script according to attach file

Note : 3 datafiles added into FNP, therefore the script has to be changed accordingly.

3. Step by step execute controlfile scripts

Remark: Logon as ora<SID> to run the scripts.

Sqlplus /nologConnect /as sysdbaStartup nomount

Page 3: QAS Refresh
Page 4: QAS Refresh

This error was cause by previous log was not reset. This command was included in the control file script.

Note : PSAPTEMP will not be restored, it will be manually added.

Turn off Oracle Archive

SQL> shutdown immediateDatabase closed.Database dismounted.Starting ORACLE instance shut down.SQL>startup mountORACLE instance started.

Total System Global Area 337594616 bytesFixed Size 727288 bytesVariable Size 201326592 bytesDatabase Buffers 134217728 bytesRedo Buffers 1323008 bytesDatabase mounted.

SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /oracle/QAS/oraarch/QASarchOldest online log sequence 0Next log sequence to archive 1Current log sequence 1

SQL> alter database noarchivelog;

Database altered.

Page 5: QAS Refresh

SQL> alter database open;

Database altered.

SQL> archive log list;

Database log mode No Archive ModeAutomatic archival EnabledArchive destination /oracle/QAS/oraarch/QASarchOldest online log sequence 0Current log sequence 1

Start Oracle manually.

Execute command "env"

For testing run the command below Login as qasadmqasadm>setenv dbs_ora_schema SAPFNPqasadm>startsap

You should be able to start SAP now after manually set the environment.

4. Adapt the environment permenantly.

Page 6: QAS Refresh

Login as qasadm and oraqas and modify the file entries as below. (Replace the "HOST" as bina67.). Change all occurrences from FNP to QAS with exception to dbs_ora_schema. Logout and relogin again.

/.dbenv_<HOST>.csh/.dbenv_<HOST>.sh

5. Optional - Reset SAP* accountLogin as oraqas and start sqlplus. Execute below sql command.

select * from sapfnp.usr02 where BNAME = 'SAP*' and MANDT='000'delete from sapfnp.usr02 where BNAME = 'SAP*' and MANDT='000'

6. Apply SAPlicense accordinglyUse transaction code SLICENSE

Change this value to SAPFNP in QAS system.

Page 7: QAS Refresh

7. Configure transport route Login to primary Domain and re-configure your transport route.

Login in to DEV, client 000, ddic Stms. Apply below.

Login in to QAS, client 000, ddic Stms. Save config.

Click on Adjust with controller.

Page 8: QAS Refresh

8. Test SAP - Oracle connection Login as qasadm R3trans –d (test the connectivity from SAP application to DB)

Remark: If the return code not equal to ZERO, it means some problems with OPS$ setting or DBA access were not grant properly; proceed the following:

SQL> alter user SAPQAS identified by sap;SQL> grant dba, connect, resource to user SAPQAS;

9. Delete FNP profile in RZ10.

Page 9: QAS Refresh
Page 10: QAS Refresh

Click No.

Remark: You can achieve the same result by deleting the table contents.

Page 11: QAS Refresh

Rz10 -> utilities -> import profiles -> active servers

10. Turn off SCOT services

Page 12: QAS Refresh
Page 13: QAS Refresh

RFC maint – delete gateway pointing to FNP11. Adapt RFC configuration for QAS environment.Sm59SAPFAX Connection

Page 14: QAS Refresh
Page 15: QAS Refresh
Page 16: QAS Refresh

BW Connection

Page 17: QAS Refresh
Page 18: QAS Refresh

Change targe host to bina68 – QAS. Verify logon/security -> logon should be ALEREMOTE.

Page 19: QAS Refresh

IXOS connection

Smlg – delete logon group

12. Delete Background jobSe38. Run report RSBTCDEL or delete tables below.TBTCO - Job status overview table Delete scheduled user jobs (SM37)TBTCP - Batch job step overview Delete scheduled user jobs (SM37)TBTCS - Batch schedule table Delete scheduled user jobs (SM37)

Page 20: QAS Refresh

Inlcuding status scheduled & delete with forced mode.13. Reschedule Basis jobs with transaction code SM36

Please schedule jobs with Basis account in SAP

Page 21: QAS Refresh

Click on the default scheduling.

Page 22: QAS Refresh

14. Delete the table entries

Some of the data are safe to be removing as it's belonging to FNP instance. Follow below list. Repeat below step for all tables Table Contents Action

BTCEVTJOB - List of jobs waiting for events Delete scheduled user jobs (SM37)DBSNP - Database snapshots Delete all entries (SE14)DDLOG - Buffer synchronization Delete all entries (no SAP transaction);use TRUNCATE/DELETE

Page 23: QAS Refresh

MONI - Monitor table MONI Delete all entries (SE14)

Page 24: QAS Refresh

OSMON - Operating system monitoring data Delete all entries (SE14)PAHI - History of system, DB, and SAP parameter Delete all entries (SE14)RZLLITAB - Assignments of logon/server groups to instances Delete all entries (SMLG)SDBAD - Detail table for DBA logs Delete all entries (SE14)SDBAH - Header table for DBA logs Delete all entries (SE14)SDBAP - DBA planning table Delete all entries (SE14)SDBAR - DBA resource table Delete all entries (SE14)TLOCK - Change and Transport System: lock table Configure Workbench Organizer (SE06)TPFET - Table of profile parameters Delete all entries (RZ10)TPFHT - Profile header, administration data for profiles in DB Delete all entries (RZ10)TSPLOMS - Logical Output Management Systems for access Change OMS configuration for Dazelmethod “E” (SPAD)TSPROMS - Real Output Management Systems for access Change OMS configuration for Dazelmethod “E” (SPAD)

Deleting tables below will wipe off all output devices input.TSP03C - Spool: device description extension Update print server (SPAD)TSP03D - Spool: device description (new format) Update print server (SPAD)

Page 25: QAS Refresh

Remove data via transaction code SE14

Select this check box and press the "Active and adjust database" button.

Page 26: QAS Refresh

15. Reschedule DB02 job.

Page 27: QAS Refresh

16. Execute housekeeping job.

RSBTCDEL - Deletes finished and canceled jobs

RSBDCREO - Deletes batch input logs

Page 28: QAS Refresh

RSSNAPDL - Deletes ABAP short dumps

Page 29: QAS Refresh

RSBPSTDE - Reorganizes job statistics

Page 30: QAS Refresh

RSPO1043 - Checks and cleans TEMSE (SP12)

Page 31: QAS Refresh
Page 32: QAS Refresh

RSPO0041 - Deletes all old spool jobs

Page 33: QAS Refresh

17. Resetting oracle user OPS$<SID>ADM

SAP application uses OPS$<SID>ADM to call certain database services. After DB refresh you need to recreate the OPS$ user. First login as oraqas and connect to sqlplus. Execute command below.

Download the oradbusr.sql file from note 50088. Run command below as oraqas.

sqlplus /NOLOG @/oracle/QAS/920_64/oradbusr.sql SAPFNP UNIX QAS x

Page 34: QAS Refresh

18. Remove any additional Server group.

SM36 or SM37 with entry <SAP_DEFAULT_BTC> found under Exec. Target (server)

Page 35: QAS Refresh

To remove the entries previously configure in FNP system. Go to transaction code SM61

When you plan to schedule a job via SM36 it you see SAP_DEFAULT_BTC

Page 36: QAS Refresh

Click on the modify button and proceed to delete any unnecessary entries.

Page 37: QAS Refresh

Click the server group

Page 38: QAS Refresh

Delete this entry.

Page 39: QAS Refresh
Page 40: QAS Refresh

Error encounter after DB refresh.

1. When schedule DB job in DB13 error show as below

BR0301E SQL error -1031 at location BrInitOraCreate-2ORA-01031: insufficient privileges

Login to OS as oraqassqlplus /nolog @sapdba_role FNP

Remark: Do remember that the Schema is FNP schema.

Page 41: QAS Refresh

ORA-27046: file size is not a multiple of logicalblock

Refer to OSS notes "600513 - ORA-25153 after recovery due to missing tempfiles"

PSAPTEMP datafile not attach. From DB02 when double click on PSAPTEMP it show no file found.

Login to oraqasSqlplus /nologSQL>Connect /as sysdbaSQL>alter tablespace PSAPTEMP add tempfile '/oracle/QAS/sapdata3/temp_1/temp.data1' reuse;

Page 42: QAS Refresh

2. STMS import process hang.After you had delete the server group from SM61 and the problem still exist. Proceed with below step.

Check the RDDIMPDP job status.a. Go to transaction code SM37 and search for job RDDIMPDP. Make sure it's running.

(Key word "RDD*"). If this job was not active or delete recreate it. b. Login to Client 000 as DDIC.c. Go to SE38 --> RDDNEWPP --> Select Highest Priority d. Now back to SM37 and monitor the job when you trigger import process again.

Perform this step even after you attempt to re-create new RDDIMPDP jobs. a. Kill all running TP processes on OS levelb. Go to stms --> import overview --> goto --> import monitor , and execute monitor -->

'Delete old entries'c. Delete if there are any entries found in below table. Check for any entries via tcode

SE16. For deletion please use tcode SE14. <refer page:14> TPSTAT TRJOB TRBAT

d. If there are no more entries found in import monitor or table TPSTAT, delete tables TMSTLOCKR and TMSTLOCKP.