quality database refresh

6
7/31/2019 Quality Database Refresh http://slidepdf.com/reader/full/quality-database-refresh 1/6

Upload: mvakharwala965

Post on 05-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 1/6

Page 2: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 2/6

Page 3: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 3/6

SVRMGR> alter database backup controlfile to trace;

SVRMGR> exit

As a result of this command, a trace file (e.g. ora_54764_hvd.trc ) will be created under

/oracle/<SSID>/saptace/usertrace directory.

Rename file name as CONTROL.SQL

Open file to edit using NOTEPAD (WIN).

Remove all lines before "STARTUP MOUNT" line. Delete all commented "#" lines. Also remove all lines after

CHARACTER SET WE8DEC;" line.

Change all Source SID's to Target SID via following commands.

WIN (NOTEPAD): CTRL+H

Change the line

CREATE CONTROLFILE REUSE DATABASE ‘SSID’ NORESETLOGS ARCHIVELOG; 

as follow

CREATE CONTROLFILE REUSE SET DATABASE ‘TSID’ RESETLOGS ARCHIVELOG; 

On Target System

After CONTROL.SQL script preparation, following commands must be run to create CONTRO L FILE of target

system:

# su – ora<targetsid>

# svrmgrl

SVRMGR> connect internal

SVRMGR> @/<path_to_file>/control.sql

You have to guarantee the successful completion of this command as follow:

SVRMGR> @control.sql

Statement processed.

SVRMGR>

Database will be in inconsistent status after creation of CONTROLFILE. This can be viewed by trying to open the

database.

Page 4: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 4/6

SVRMGR> alter database open;

alter database open

*

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SVRMGR> alter database open resetlogs;

alter database open resetlogs

*

ORA-01195: online backup of file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/oracle/<hedefSID>/sapdata1/system_1/system.data1'

Change Database to no archive mode

SQL> shutdown immediate

Database closed.

Database dismounted.

Starting ORACLE instance shut down.

SQL>startup mount

ORACLE instance started.

Total System Global Area 337594616 bytes

Fixed Size 727288 bytes

Variable Size 201326592 bytes

Database Buffers 134217728 bytes

Redo Buffers 1323008 bytes

Database mounted.

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Page 5: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 5/6

Archive destination /oracle/QAS/oraarch/QASarch

Oldest online log sequence 0

Next log sequence to archive 1

Current log sequence 1

SQL> alter database noarchivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;

Database log mode No Archive Mode

Automatic archival Enabled

Archive destination /oracle/QAS/oraarch/QASarch

Oldest online log sequence 0

Current log sequence 1

If your source system is running in NOARCHIVELOG mode, then you have to use the following command to

recover database.

SVRMGR> recover database using backup controlfile until cancel;

To open database, use the following command:

SVRMGR> alter database open resetlogs;

Statement processed.

SVRMGR>

To open SAP system, use the following commands.

On Windows systems, Oracle Listener is started as below:

ntscmgr start OracleOraHome817TNSListener

Logon to the SAP R/3 System and go to Tcode SE06. Select "Database Copy or Migration" and execute "Post

Installation Processing".

Page 6: Quality Database Refresh

7/31/2019 Quality Database Refresh

http://slidepdf.com/reader/full/quality-database-refresh 6/6

Change all of the Source System Objects to Target System Objects as asked.

Reset SAP* account

Login 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'

Apply SAP license accordingly

Use transaction code SLICENSE