cancel
Showing results for 
Search instead for 
Did you mean: 

restoring archivelog

Former Member
0 Kudos

Hi.

Can anybody help me with restoration of archivelogs? I have SID1 instance and i want to create a copy and name it SID2. i created an online backup of SID1 using db13. Then, I restored this backup using the 'brrestore u2013b <encoded_timestamp> u2013m all ' command.

1. Will it restore the corresponding archivelogs automatically?

As I was trying to recover my database, I noticed that the archivelogs were not restored in their corresponding directory so I wonder if Im gonna have to restore it manually.

So far, here are the steps I already did:

1. restore using 'brrestore u2013b <encoded_timestamp> u2013m all

2. run the CONTROL.SQL created from ora_br_copy.sh command

3. recover database using backup controlfile;

then it suggests an archivelog which I cannot find.

Hoping for immediate help please.

We are using Oracle10g on ECC6 on AIX machines.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I am assuming you are going to change the SID on this copy?

Is all your backups done with brtools or a third party vendor ?

######

If your using a third party vendor E.G. data protector.

rstore all datafiles to the new server e.g /oracle/Vnew SID>/sadata<nr>

In the source system : Use the alter database backup controlfile to trace.

Copy the trace file over to the new system

Vi the trace file and tidy it up because you will have two sets.

Do a global change to the new SID.

SQL> Run the script

SQL> recover database using backup controlfile until cancel;

Apply the latest couple of offline redo logs from source system then cancel.

SQL> alter database open resetlogs;

Remember to follow Homogenous system copy guide for post changes.

E.G BDLS SE06.

Mark

Former Member
0 Kudos

Hi Mark,

Yes, Im going to change the SID for this copy. I used db13 on my backup ( I assume this is the same as using brtools). Thanks for the inputs

Former Member
0 Kudos

Hi,

Yes, scheduling backup through the TA DB13 in turn uses brbackup and the same can be restored using BRRESTORE.

As u r planning to restore the backup to a system with different SID u need to recreate the control file and then rename the archives logs to reflect the second SID and then recover the logs to open the DB.

-Varadhu...

Former Member
0 Kudos

Hi All,

Thanks very many to all inputs. They were of great help and I was able to apply the archive logs. Also, I was able to start my database manually by doing the following:

1. login ar ora<SID>

2. sqlplus /nolog

3. connect / as sysdba

4. startup

However, if I try starting my instance using startsap, Im having the error below:

/usr/sap/EDR/SYS/exe/run/startdb: Terminating with error code 12

DB startup failed.

I run R3trans -x and it returned:

This is R3trans version 6.14 (release 700 - 18.09.06 - 09:35:00)

unicode enabled version

2EETW169 no connect possible: "DBMS = ORACLE --- dbs_ora_tnsname = 'EDR'

R3trans finished (0012)

I know this is no longer related to the archive logs as stated in the title of my message but can anybody help me just to complete my activity?

Thanks very many!

Former Member
0 Kudos

hi

paste the trans.log from R3trans -x you just ran. It should be in the same location you ran it...

Mark

Former Member
0 Kudos

Hi,

I reviewed the trans.log and I notice the error is username/password related. Startsap is attempting to open the database using owners/passwords using the new SID but the database possesses that of the old SID. This is again another issue that I need to research a bit further but as far as this message is concerned, my problem is already solved.

Thus, Im thanking you all for the patience and support provided. I will mark this thread as answered and will just open another thread if I will have another problem with the user/password issue.

Regards

Former Member
0 Kudos

Thanks Mark.

I am about to mark this thread but thanks for accomodating. Anyway, please see below:

4 ETW000 R3trans version 6.14 (release 700 - 18.09.06 - 09:35:00).

4 ETW000 unicode enabled version

4 ETW000 ===============================================

4 ETW000

4 ETW000 date&time : 11.10.2010 - 17:44:19

4 ETW000 control file: <no ctrlfile>

4 ETW000 R3trans was called as follows: R3trans -x

4 ETW000 trace at level 2 opened for a given file pointer

4 ETW000 [dev trc ,00000] Mon Oct 11 17:44:19 2010 68 0.000068

4 ETW000 [dev trc ,00000] db_con_init called 19 0.000087

4 ETW000 [dev trc ,00000] create_con (con_name=R/3) 36 0.000123

4 ETW000 [dev trc ,00000] Loading DB library '/usr/sap/EDR/SYS/exe/run/dboraslib.o' ...

4 ETW000 46 0.000169

4 ETW000 [dev trc ,00000] load shared library (/usr/sap/EDR/SYS/exe/run/dboraslib.o), hdl 0

4 ETW000 4519 0.004688

4 ETW000 [dev trc ,00000] Library '/usr/sap/EDR/SYS/exe/run/dboraslib.o' loaded

4 ETW000 29 0.004717

4 ETW000 [dev trc ,00000] function DbSlExpFuns loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 33 0.004750

4 ETW000 [dev trc ,00000] Version of '/usr/sap/EDR/SYS/exe/run/dboraslib.o' is "700.08", patchlevel (0.73)

4 ETW000 139 0.004889

4 ETW000 [dev trc ,00000] function dsql_db_init loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 31 0.004920

4 ETW000 [dev trc ,00000] function dbdd_exp_funs loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 49 0.004969

4 ETW000 [dev trc ,00000] New connection 0 created 24 0.004993

4 ETW000 [dev trc ,00000] 0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO

4 ETW000 36 0.005029

4 ETW000 [dev trc ,00000] db_con_connect (con_name=R/3) 27 0.005056

4 ETW000 [dev trc ,00000] find_con_by_name found the following connection for reuse:

4 ETW000 29 0.005085

4 ETW000 [dev trc ,00000] 0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO

4 ETW000 33 0.005118

4 ETW000 [dev trc ,00000] Got LIBPATH=/usr/lib:/lib:/usr/sap/EDR/SYS/exe/run:/oracle/client/10x_64/instantclient from environment

4 ETW000 288 0.005406

4 ETW000 [dev trc ,00000] Oracle Client Version: '10.2.0.2.0' 45 0.005451

4 ETW000 [dev trc ,00000] -->oci_initialize (con_hdl=0) 20 0.005471

4 ETW000 [dev trc ,00000] Client NLS settings: AMERICAN_AMERICA.UTF8 4416 0.009887

4 ETW000 [dev trc ,00000] Logon as OPS$-user to get SAPSR3's password 28 0.009915

4 ETW000 [dev trc ,00000] Connecting as /@EDR on connection 0 (nls_hdl 0) ... (dbsl 700 110706)

4 ETW000 30 0.009945

4 ETW000 [dev trc ,00000] Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

4 ETW000 32 0.009977

4 ETW000 [dev trc ,00000] 0 UTF8 1 0x110f8a580 0x110fa29f8 0x110fa22a8

4 ETW000 41 0.010018

4 ETW000 [dev trc ,00000] Allocating service context handle for con_hdl=0 27 0.010045

4 ETW000 [dev trc ,00000] Allocating server context handle 21 0.010066

4 ETW000 [dev trc ,00000] Attaching to DB Server EDR (con_hdl=0,svchp=0x110f92f58,svrhp=0x110fa4d18)

4 ETW000 59 0.010125

4 ETW000 [dev trc ,00000] Assigning server context 0x110fa4d18 to service context 0x110f92f58

4 ETW000 32057 0.042182

4 ETW000 [dev trc ,00000] Allocating user session handle 36 0.042218

4 ETW000 [dev trc ,00000] Starting user session (con_hdl=0,svchp=0x110f92f58,srvhp=0x110fa4d18,usrhp=0x110f92360)

4 ETW000 38 0.042256

4 ETW000 [dboci.c ,00000] *** ERROR => OCI-call 'OCISessionBegin' failed: rc = 1017

4 ETW000 6174 0.048430

4 ETW000 [dbsloci. ,00000] *** ERROR => CONNECT failed with sql error '1017'

4 ETW000 32 0.048462

4 ETW000 [dev trc ,00000] Try to connect with default password 65 0.048527

4 ETW000 [dev trc ,00000] Connecting as SAPSR3/<pwd>@EDR on connection 0 (nls_hdl 0) ... (dbsl 700 110706)

4 ETW000 31 0.048558

4 ETW000 [dev trc ,00000] Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

4 ETW000 32 0.048590

4 ETW000 [dev trc ,00000] 0 UTF8 1 0x110f8a580 0x110fa29f8 0x110fa22a8

4 ETW000 32 0.048622

4 ETW000 [dev trc ,00000] Assigning username to user session 0x110f92360 20 0.048642

4 ETW000 [dev trc ,00000] Assigning password to user session 0x110f92360 24 0.048666

4 ETW000 [dev trc ,00000] Starting user session (con_hdl=0,svchp=0x110f92f58,srvhp=0x110fa4d18,usrhp=0x110f92360)

4 ETW000 33 0.048699

4 ETW000 [dboci.c ,00000] *** ERROR => OCI-call 'OCISessionBegin' failed: rc = 1017

4 ETW000 1865 0.050564

4 ETW000 [dbsloci. ,00000] *** ERROR => CONNECT failed with sql error '1017'

4 ETW000 31 0.050595

4 ETW000 [dblink ,00431] ***LOG BY2=>sql error 1017 performing CON [dblink#3 @ 431]

4 ETW000 107 0.050702

4 ETW000 [dblink ,00431] ***LOG BY0=>ORA-01017: invalid username/password; logon denied [dblink#3 @ 431]

4 ETW000 30 0.050732

2EETW169 no connect possible: "DBMS = ORACLE --- dbs_ora_tnsname = 'EDR'"

Former Member
0 Kudos

Mark,

Sorry but the trans.log became garbled when I send my update.

Former Member
0 Kudos

Hi,

I guess u have not carried out the post system copy activities. Try to execute the command as follows in the SQL prompt,

brconnect -u system/<password> -c -f chpass -o <SCHEMA_OWNER> -p "*sap*"

Also have a look at the [SAP Note 400241|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=400241] and take the necessary steps to recreate the OPS$ mechanism.

Hope this solves ur issue.

Regards,

Varadharajan M

Former Member
0 Kudos

Hi,

This is what I have conducted so far:

1. brconnect -u system/<e6padm1n> -f chpass -o SAPSR3 -p <edradm1n>

2 create user OPS$EDRADM default tablespace PSAPSR3USR temporary tablespace PSAPTEMP identified externally;

3. grant connect, resource to OPS$EDRADM;

4. CREATE TABLE "OPS$EDRADM".SAPUSER (USERID VARCHAR2(256), PASSWD VARCHAR2(256));

5.INSERT INTO "OPS$EDRADM".SAPUSER VALUES ('<sapowner>', '<password>');

6. COMMIT;

After which, I started my instance using startsap but I still get error. Below is the new trans.log file

4 ETW000 R3trans version 6.14 (release 700 - 18.09.06 - 09:35:00).

4 ETW000 unicode enabled version

4 ETW000 ===============================================

4 ETW000

4 ETW000 date&time : 11.10.2010 - 18:40:47

4 ETW000 control file: <no ctrlfile>

4 ETW000 R3trans was called as follows: R3trans -x

4 ETW000 trace at level 2 opened for a given file pointer

4 ETW000 [dev trc ,00000] Mon Oct 11 18:40:47 2010 71 0.000071

4 ETW000 [dev trc ,00000] db_con_init called 19 0.000090

4 ETW000 [dev trc ,00000] create_con (con_name=R/3) 35 0.000125

4 ETW000 [dev trc ,00000] Loading DB library '/usr/sap/EDR/SYS/exe/run/dboraslib.o' ...

4 ETW000 46 0.000171

4 ETW000 [dev trc ,00000] load shared library (/usr/sap/EDR/SYS/exe/run/dboraslib.o), hdl 0

4 ETW000 4508 0.004679

4 ETW000 [dev trc ,00000] Library '/usr/sap/EDR/SYS/exe/run/dboraslib.o' loaded

4 ETW000 29 0.004708

4 ETW000 [dev trc ,00000] function DbSlExpFuns loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 32 0.004740

4 ETW000 [dev trc ,00000] Version of '/usr/sap/EDR/SYS/exe/run/dboraslib.o' is "700.08", patchlevel (0.73)

4 ETW000 142 0.004882

4 ETW000 [dev trc ,00000] function dsql_db_init loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 31 0.004913

4 ETW000 [dev trc ,00000] function dbdd_exp_funs loaded from library /usr/sap/EDR/SYS/exe/run/dboraslib.o

4 ETW000 49 0.004962

4 ETW000 [dev trc ,00000] New connection 0 created 24 0.004986

4 ETW000 [dev trc ,00000] 0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO

4 ETW000 36 0.005022

4 ETW000 [dev trc ,00000] db_con_connect (con_name=R/3) 27 0.005049

4 ETW000 [dev trc ,00000] find_con_by_name found the following connection for reuse:

4 ETW000 30 0.005079

4 ETW000 [dev trc ,00000] 0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO

4 ETW000 32 0.005111

4 ETW000 [dev trc ,00000] Got LIBPATH=/usr/lib:/lib:/usr/sap/EDR/SYS/exe/run:/oracle/client/10x_64/instantclient from environment

4 ETW000 289 0.005400

4 ETW000 [dev trc ,00000] Oracle Client Version: '10.2.0.2.0' 46 0.005446

4 ETW000 [dev trc ,00000] -->oci_initialize (con_hdl=0) 20 0.005466

4 ETW000 [dev trc ,00000] Client NLS settings: AMERICAN_AMERICA.UTF8 4414 0.009880

4 ETW000 [dev trc ,00000] Logon as OPS$-user to get SAPSR3's password 28 0.009908

4 ETW000 [dev trc ,00000] Connecting as /@EDR on connection 0 (nls_hdl 0) ... (dbsl 700 110706)

4 ETW000 30 0.009938

4 ETW000 [dev trc ,00000] Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

4 ETW000 32 0.009970

4 ETW000 [dev trc ,00000] 0 UTF8 1 0x110f8a580 0x110fa29f8 0x110fa22a8

4 ETW000 41 0.010011

4 ETW000 [dev trc ,00000] Allocating service context handle for con_hdl=0 27 0.010038

4 ETW000 [dev trc ,00000] Allocating server context handle 21 0.010059

4 ETW000 [dev trc ,00000] Attaching to DB Server EDR (con_hdl=0,svchp=0x110f92f58,svrhp=0x110fa4d18)

4 ETW000 59 0.010118

4 ETW000 [dev trc ,00000] Assigning server context 0x110fa4d18 to service context 0x110f92f58

4 ETW000 31622 0.041740

4 ETW000 [dev trc ,00000] Allocating user session handle 36 0.041776

4 ETW000 [dev trc ,00000] Starting user session (con_hdl=0,svchp=0x110f92f58,srvhp=0x110fa4d18,usrhp=0x110f92360)

4 ETW000 39 0.041815

4 ETW000 [dev trc ,00000] Assigning user session 0x110f92360 to service context 0x110f92f58

4 ETW000 7915 0.049730

4 ETW000 [dev trc ,00000] BEGIN DBMS_APPLICATION_INFO.SET_MODULE (:A0, :A1); END;

4 ETW000 49 0.049779

4 ETW000 [dev trc ,00000] BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO (:A0); END;

4 ETW000 85 0.049864

4 ETW000 [dev trc ,00000] Now '/@EDR' is connected (con_hdl 0, nls_hdl 0).

4 ETW000 669 0.050533

4 ETW000 [dev trc ,00000] ALTER SESSION SET NLS_SORT = BINARY

4 ETW000 38 0.050571

4 ETW000 [dev trc ,00000] SELECT USERID, PASSWD FROM SAPUSER WHERE USERID IN (:A0, :A1)

4 ETW000 315 0.050886

4 ETW000 [dbsloci. ,00000] *** ERROR => ORA-1403 when accessing table SAPUSER

4 ETW000 387 0.051273

4 ETW000 [dev trc ,00000] Disconnecting from connection 0 ... 95 0.051368

4 ETW000 [dev trc ,00000] Rolling back transaction ... 28 0.051396

4 ETW000 [dev trc ,00000] Closing user session (con_hdl=0,svchp=0x110f92f58,usrhp=0x110f92360)

4 ETW000 130 0.051526

4 ETW000 [dev trc ,00000] Now I'm disconnected from ORACLE 346 0.051872

4 ETW000 [dev trc ,00000] Try to connect with default password 23 0.051895

4 ETW000 [dev trc ,00000] Connecting as SAPSR3/<pwd>@EDR on connection 0 (nls_hdl 0) ... (dbsl 700 110706)

4 ETW000 30 0.051925

4 ETW000 [dev trc ,00000] Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

4 ETW000 32 0.051957

4 ETW000 [dev trc ,00000] 0 UTF8 1 0x110f8a580 0x110fa29f8 0x110fa22a8

4 ETW000 32 0.051989

4 ETW000 [dev trc ,00000] Assigning username to user session 0x110f92360 20 0.052009

4 ETW000 [dev trc ,00000] Assigning password to user session 0x110f92360 24 0.052033

4 ETW000 [dev trc ,00000] Starting user session (con_hdl=0,svchp=0x110f92f58,srvhp=0x110fa4d18,usrhp=0x110f92360)

4 ETW000 43 0.052076

4 ETW000 [dboci.c ,00000] *** ERROR => OCI-call 'OCISessionBegin' failed: rc = 1017

4 ETW000 1851 0.053927

4 ETW000 [dbsloci. ,00000] *** ERROR => CONNECT failed with sql error '1017'

4 ETW000 31 0.053958

4 ETW000 [dblink ,00431] ***LOG BY2=>sql error 1017 performing CON [dblink#3 @ 431]

4 ETW000 106 0.054064

4 ETW000 [dblink ,00431] ***LOG BY0=>ORA-01017: invalid username/password; logon denied [dblink#3 @ 431]

4 ETW000 30 0.054094

2EETW169 no connect possible: "DBMS = ORACLE --- dbs_ora_tnsname = 'EDR'"

Former Member
0 Kudos

Hi,

Read SAP Note 400241

Clear it all out and then use sap note 50088 to create ops$<user>

Mark

Former Member
0 Kudos

Hi all,

My problem is now solved. The problem was caused by an erroneous entry in the SAPUSER table. Originally, I did the following:

INSERT INTO "OPS$UATADM".SAPUSER VALUES ('ORAEDR', '<password>');

ORAEDR is actually a unix owner.

I changed it to

INSERT INTO "OPS$UATADM".SAPUSER VALUES ('SAPSR3', '<password>');

and then, my problem was solved!

Thank you very much for the patience and assistance!

Former Member
0 Kudos

Hi,

You need to restore the archivelogs also from the backup. This is possible only if you have performed a online consistent backup. Else u can manually copy the files from the source system to the target system, rename the files to reflect the new SID (SID2 in ur case) and then u can recover the redo log files.

This [SAP's online Help link|http://help.sap.com/saphelp_crm40/helpdata/en/8c/09503e30a9d549e10000000a114084/content.htm] may help you.

Regards,

Varadharajan M

Former Member
0 Kudos

Hi Varadharajan,

Actually I tried using brtools but I got confused on the part where it asked me for the sequence numbers as I have no idea where to get them.

During recovery where it is suggesting some filename to apply, I did see this file on my backup file but the difference is, it has a .Z at the end of the file. It could have been compressed during backup process. Im attempting to uncompress the said file and copy it to my archive directory and try to apply it but the thing is, I dont know how to uncompress it.

Thanks

Former Member
0 Kudos

If it is UNIX then use unzip command

if windows then simply right click and unzip.

Former Member
0 Kudos

Hi,

Its good that u know the procedures except decompressing the files.

Here u go,

Login to the OS as <SID>adm

Execute UNCOMPRESS <filename>

Make sure that u have a copy of the files which u try to uncompress as the process of uncompressing will replace the original file.

Hope this helps.

Regards,

Varadharajan M

Former Member
0 Kudos

Which backup you restored into?

Only Online or Online+archivelog

It seems you have taken only the online backup and restored it into new server.

brrestore -b filename -m full

Command can restore full onlinearchivelogs into the server, Only if you have taken Onlinearchivelog

Regards,

Nick Loy

Former Member
0 Kudos

Hi Nick,

Thanks for the immediate reply. Just some clarification:

brrestore u2013b <encoded_timestamp> u2013m all -


> this restores online database only

brrestore u2013b <encoded_timestamp> u2013m full -


> this restores online database + archivelogs

Is this correct?

Thanks