cancel
Showing results for 
Search instead for 
Did you mean: 

Generate the control files on production as per OraBRCopy Java tool

Former Member
0 Kudos

Dear All,

I want to make a copy of production database to our test system.

For this purpose i am using a one month old Offline backup.

Now I want to generate the control files on production as per OraBRCopy Java tool

as per doc it is mention before running the OraBRCopy tool I have to Make sure that all redo log groups are archived by this what they mean how to do this and the command

Only valid for: Windows

n Log on as <sapsid>adm.

n Enter the following commands:

ora_br_copy.bat u2013generateFiles u2013forceLogSwitches u2014targetSid <TARGET_DBSID>

u2014password <systemu2019s password> u2014listenerPort <listener port>

Is there any caution I have to take before running this to prd server.

generate the control file which will consist of data till today ( number of data files may be differ from actual restored and mentioned in script ), however i want the control files which generate control files till my offline backup (ie 1 month old).

Please suggest how to do and step by step process for using OraBRCopy tool for system

Regards,

Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I want to add upon the following to resolve the following OraBRCopy error which you were receiving at the beginning of the post.

Incorrect application options:
At least one from 'generateFiles' or 'forceLogSwitches' options is required

.

Please go through the following link which suggests how to resolve the above error generated during the generation of control.sql in the source system using ora_br_copy.bat.

regards,

Subhajit.

Former Member
0 Kudos

Dear Debdeep,

As you suggested the dir structures should be same in test and RD in my case it is not there have find one sap doc in that it says that you can make change is control.sql and the init<DBSID>.ora.

Can you Please tell me when you run the BRRESTORE command that time which file it use and what changes in file control.sql & init<DBSID>.ora.

Eg there the source L:\ORACLE\PRD\SAPDATA3\PRD_1\PRD.DATA1

But in test it is in D drive .So I have to make changes in the drive letters.

Second thing before this I have to copy the in the

Copy this detailed backup log file beasycwj.afd into \oracle\TDE\sapbackup directory so there also I have to make the changes of drive letters.

regards,

former_member475159
Participant
0 Kudos

Hi Kumarmoh,

Please find where you can upload document in SDN and then post the link (document that says restoration can be done with different file structure.

Also confirm me one thing, you have the producion backup stored in which server.

Thanks

Debdeep

Former Member
0 Kudos

Hi Debdeep,

I will check and the data of prd is stored in another server and drive is map in test server.

i am getting error when running brrestore

C:\usr\sap\TAT\SYS\exe\run>brrestore -m full -b beasycwj.afd -c

BR0401I BRRESTORE 6.40 (50)

BR0405I Start of file restore: rebberjk.rsb 2009-07-20 15.21.36

BR0484I BRRESTORE log file: E:\oracle\TAT\sapbackup\rebderjk.rsb

BR0454W Values of oracle_sid are different: current 'TAT', backup beasycwj.afd '

PRD'

BR0455W Value 'TAT' of oracle_sid will be used for restore

BR0454W Values of sapdata_home are different: current 'E:\oracle\TAT', backup be

asycwj.afd 'I:\oracle\PRD'

BR0455W Value 'E:\oracle\TAT' of sapdata_home will be used for restore

BR0454E Values of backup_dev_type/-d are different: current 'tape', backup beasy

cwj.afd 'disk'

BR0121E Processing of log file E:\oracle\TAT\sapbackup\beasycwj.afd failed

BR0406I End of file restore: rebberjk.rsb 2009-07-20 15.21.36

BR0280I BRRESTORE time stamp: 2009-07-20 15.21.36

BR0404I BRRESTORE terminated with errors

Regards,

Kumar

Edited by: kumarmoh on Jul 20, 2009 12:56 PM

former_member204746
Active Contributor
0 Kudos

adapt backup_dev_type in file initTAT.sap to proper value, as suggested in your brrestore log.

Former Member
0 Kudos

Hi,

Now the error is resolve by changing the initTAT.sap the value tape to disk but now stuck in the drive for restore it is asking which is not there at os level.

BR0252E Function _mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD_33' at location
 BrDirCreate-1
BR0253E errno 2: No such file or directory
BR0252E Function _mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD_32' at location

TO solve the above problem i have created ad network drive for this but once all the restore will be completed than how i can i move the data form network drive to on drvie.

Please suggest

Regards,

Kumar

Edited by: kumarmoh on Jul 21, 2009 9:00 AM

former_member204746
Active Contributor
0 Kudos

you created a network drive and mapped it to M: ?

go read the homogeneous system copy guide again. it tells you that directory and drive structure should be the same.

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

You can use exisiting offline backup but you have to clean redo logs with forced log switches.

For more information, please check below lnik:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6945da7d-0c01-0010-1792-dd7b5d87...

Thanks

Sunny

Former Member
0 Kudos

Hi

Thanks , So before running this OraBRCopy Java tool generate the control file in production server what cation or precaution do i have to take .and what is is the difference in the sql command alter database backup controlfile to trace as 'd:\controfile_trace.txt';

Make sure that all redo log groups are archived is mention in doc by this than mean.

My main worried about running the OraBRCopy command in the prd server is there harm.

Is there any way to use that old offline backup control file for the test server in place generate the control file at preset form production server.

Please suggest can any one suggest the step by step process of OraBRCopy Java tool generate the control file in production server

Regards,

Kumar

Former Member
0 Kudos

check out the documents as attached below.

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d10bf27d-0c01-0010-6995-bbdcdf0118a1?overridelayout=true]

[http://www.uphantis.com/16591/How-to-System-Copy-ABAP-and-JAVA.pdf]

Former Member
0 Kudos

Dear all,

I am getting error when trying to Generate the control files on production server after stoping the sap and oracle up

command

E:\ora 14>ora_br_copy.bat -generateFiles -forceLogSwitches -targetSid DES -passw
ord ******* -listenerPort 1527

E:\ora 14>"C:\Program Files (x86)\Java\j2re1.4.2_11\bin\java.exe" -showversion -

cp ".\.;.\orabrcopy.jar;E:\oracle\ora92\jdbc\lib\classes12.jar" com.sap.inst.lib

.app.SecureStartup "" com.sap.inst.orabrcopy.OraBRCopy -oracleHome "E:\oracle\or

a92" -sourceSid "PRD" -generateFiles -forceLogSwitches -targetSid DES -password

              • -listenerPort 1527

java version "1.4.2_11"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)

Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)

Incorrect application options:

At least one from 'generateFiles' or 'forceLogSwitches' options is required.

Regards,

Kumar

Former Member
0 Kudos

Did you try command syntax from second link which I have provided earlier ? Try with higher version of JDK if there is a possibility.

Former Member
0 Kudos

Dear all,

I am going to Generate the control files on production form sql command can any one please step by step process.

As per my login to source system as ora sid and connect to sysdba

Alter database backup control file to trace;

exit;

But how to do in mount mode and any precation before and after.Please suggest

Regards,

former_member475159
Participant
0 Kudos

Hi ,

Sqlplus /nolog

Connect / as sysdba

alter database backup controlfile to trace resetlogs;

The database should be open state to execute the above sql. No other precaution is required.

The trace file will be generated in your source system Oracle/saptrace/usertrace

Thanks

Debdeep

Former Member
0 Kudos

Dear Debdeep,

The comd is

alter database backup controlfile to trace resetlogs; or

alter database backup controlfile to trace;

as per my doc it say upto trace.

before running this command i have to stop sap.

after the controlfile is genrate the orcle will up and running or we have to start it.

because we are uing win2003,orale 9i and have ms cluster .

so for stoping the sap i am stop it form the cluser ..

Please suggest

regards,

Kumar

former_member475159
Participant
0 Kudos

Hi Kumar,

You can give the command metioned in your document.

You do not required to stop SAP to run this command.

After giving the command both SAP and Oracle will be in running state.

Thanks

Debdeep

Former Member
0 Kudos

Hi Debdeep,

Thanks as you suggest I have created the control file .now I am having problem in starting the oracle error

ora-01034 oracle not available but as sysdba it is connect as ideas.

And in SAP Management Console strdbs.cmd databse could not be started showing in red. Please suggest

Regards,

former_member475159
Participant
0 Kudos

Hi Kumarmoh,

Sorry I am not getting you.

In which system Oracle is giving the error.For generating the trace file, I told you not

to stop SAP and oracle in source system.

Are you getting the error in the target system

Please clarify my doubt, and what you have performed in detail after generating the trace

file in source system

THanks

Debdeep

Former Member
0 Kudos

Hi Debdeep,

I have generating the trace file form the source system and now facing problem in target system

I have modified it for target system change the parameter value because in target system is have of half ram in compare to source and the drive path of data files in control file ,init ora and sever dir.

Than created the control file target system also am able to connect to database

AS sys dba

Connected to an idle instance.

Giving error

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

And in SAP Management Console strdbs.cmd databse could not be started showing in red. Please suggest

Regards,

former_member475159
Participant
0 Kudos

Hi Kumar,

I am getting confused little bit.

Have you restored the production offline database backup by BRRESTORE.

THanks

Debdeep

Former Member
0 Kudos

Hi Debdeep,

Let me tell you in details

1 I have restores the offlince database to test server from tape(Vediaus) and run the BRRESTORE because I am not copy the datafile form soure to target it already there.

2 Then in I have generating the trace file form the source system .

3 After the same process a above mention

Please sugget if any thing not right and can ben done

Regards,

former_member475159
Participant
0 Kudos

Hi Kumar,

sqlplus /nolog

SQL> connect / as sysdba

SQL> startup mount

SQL> recover database using backup controlfile until time '2007-07-25:18:00:00'

Give the time in above format. Your time should be one month back.Give anytime before

the starttime of the offline backup.

In one step, you can get this output "Specify log: {<RET>=suggested | filename | AUTO | CANCEL}"

Enter AUTO there.

After that you will get the below output if everything goes fine

"Verify recovery finished successfully"

After that do the following step

a)SQL> alter database open resetlogs;

b)SQL> alter system switch logfile; [execute 10 times]

c)SQL> Shutdown immediate;

Now you edit the control file that you copied from PRD. Edit as directed below

Save the file as control.sql

Edit the control.sql

Remove all the lines before 'Create control file' line

Change 'REUSE' to 'SET'

Replace all occurrences of 'PRD_SID' with u2018TARGET_SIDu2019

Remove the line 'alter database open'

Remove the line 'RECOVER DATABASE USING BACKUP CONTROLFILE'

Save the control.sql

Sqlplus /nolog

SQL>Connect / as sysdba

SQL>Startup nomount

SQL>@control.sql

Make sure there are no errors

SQL>alter database open resetlogs

Your problem should resolve now

PLease do the above step and let me know in case you face any problem.

Former Member
0 Kudos

Dear Debdeep,

Sorry I have received you reply so I have formatted the os.

Thanks a lot for given your value time.

AS what I understanding

1 Install oracle (with software only option ).

2 Sap Central instance Installation

3 Database Instance Installation

4 system copy as you have suggest

Previous I have use the option system copy this time think of normal Installation than doing system copy in cd 51033746_13.

Previous when doing the system copy process where we have to keep the backup file in test server because this time i have kept it in the actual drive of test server.

Second thing the problem is our test server drive are diff than the source (PRD).

The drive we have in test server are c ,d and e . were in the PRD there are many drive

So in test server we have one drive d with more space for prd database size backup and we are keeping all the file in that drive .

When installing the sap and oracle which drive we have to install bze only D is have the size of database and we have make the change in control file.

Means for system copy the oracle should in d dive where we have space size as database PRD and can we copy data file before

C: os and swap and SAP (USR)

😧 oracle (where is space of database or in c )

E :of arch and server dir

Is there any way after restoring the offline backup which is 1 month old ,apply arci file of present dated so it will be upto date till date.

Kindly tell me the right process to make test server with system copy.

Regards,

former_member475159
Participant
0 Kudos

Hi Kumar,

I am giving answer to your query one by one

""Second thing the problem is our test server drive are diff than the source (PRD).

The drive we have in test server are c ,d and e . were in the PRD there are many drive ""

As far as my knowledge we cannot do system copy until and unless your source and target system have same structure

"Is there any way after restoring the offline backup which is 1 month old ,apply arci file of present dated so it will be upto date till date."

After restoring the backup, we can always make it upto date by applying the archive log. Please check the link

http://help.sap.com/saphelp_nw70/helpdata/en/bc/07503e30a9d549e10000000a114084/content.htm

Thanks

Debdeep

Former Member
0 Kudos

Hi

I am getting an error when Database Instance Installation.

WARNING 2009-07-18 10:56:06

Execution of the command "C:\usr\sap\TST\SYS\exe\run/brconnect -u / -c -f crsyn -o SAPTST" finished with return code 3. Output: BR0801I BRCONNECT 7.00 (16)BR0999E Loading of SQL client library oci.dll failed - please check Oracle configurationBR0310E Connect to database instance TST failed

ERROR 2009-07-18 10:56:06

CJS-00288 Could not update database statistics.<br>DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPTST returned 3.<br>SOLUTION: See brconnect.log for details.

brconnect.log

BR0801I BRCONNECT 7.00 (16)

BR0999E Loading of SQL client library oci.dll failed - please check Oracle configuration

BR0310E Connect to database instance TST failed

BR0280I BRCONNECT time stamp: 2009-07-17 23.40.00

BR0804I BRCONNECT terminated with errors

Please suggest

Regards,

former_member475159
Participant
0 Kudos

Hi Kumarmoh,

As per your log, BRCONNECT is giving return code 3, that means "Errors occurred in the initialization phase"

My guess is that you are using oracle 9.

For you info, you cannot use oracle 9 and DBATOOLS 7, download DBATOOLS 640 from marketplace.

Please check the thread

from where you will get to know where to find DBATOOLS 640.

Also check note 849483

Thanks

Debdeep

Former Member
0 Kudos

Dear Debdeep

Thanks instillation done.Now i have to do system copy.

Regards,