cancel
Showing results for 
Search instead for 
Did you mean: 

Autolog on feature

Former Member
0 Kudos

With the autolog on feature is there a way to have the log file written in two destinations during the same execution? I presently have an archlogs medium setup to go out to a file */sapdb/LCx/saparch. I would like to have a second destination /sapdb/LCx/saparch2 for use with my DR server.

Any suggestions would be appreciated

Accepted Solutions (1)

Accepted Solutions (1)

markus_doehr2
Active Contributor
0 Kudos

The backup can only be saved to one place. However, you could write a small script, that copies the files over (or use e. g. rsync)

Markus

Former Member
0 Kudos

Markus,

I was looking into the archive_stage and archive_stage_repeat. It appears I can't use them with autolog on?? If that is the case it says about using system commands to copy the files. Am I right in assuming this? If so then that is what I will try to incorporate.

Thanks

markus_doehr2
Active Contributor
0 Kudos

I´m not sure what you are talking about... those parameters are from init.sap for Oracle databases, right?

Markus

Former Member
0 Kudos

Those archive parameters are what I have researched in Maxdb (livecache documentation). They are not init.sap oracle databases.

John

Former Member
0 Kudos

Markus,

This is the url I got those parameters from which I am sure you are familiar with.

http://maxdb.sap.com/currentdoc/14/774939e5523668e10000000a114084/frameset.htm

Answers (1)

Answers (1)

former_member229109
Active Contributor
0 Kudos

Hello John,

Please review SAP notes ::

853135 archive_stage does not save log files

869267 FAQ: MaxDB LOG area

< 27. How do I execute a log backup? &&

26. How do I archive the log backup files generated? >

Or document at the link, you already know:

http://maxdb.sap.com/currentdoc/14/774939e5523668e10000000a114084/frameset.htm

-> Overview of All DBM Commands

-> autolog_on

-> Database Administration Tutorial, Activating Automatic Log Backup < click on it>

    • You created the complete data backup & have defined a backup medium of type FILE

for the backup type LOG or AUTO. Automatic log backup is on using this Log medium.

As soon as a log segment is full in the log area, the database system saves this log

segment to a version file to the location defined by the LOG medium.

It then releases the log segment again for overwriting in the log area.

    • If you want to archive the files using backup tools from other providers, you can use DBM

commands < archive_stage, archive_stage_repeat >to save the contents of the backup files

in pipes, which can then be read by the backup tools.

    • If you would like to have a second destination /sapdb/LCx/saparch2 for use with my DR server.

Log backups that are created using the automatic log backup function can only be written to files.

A) You could archive the Backup Files written in /sapdb/LCx/saparch to your

second destination /sapdb/LCx/saparch2 . For archiving, you can use operating system commands

to copy the backup files onto second destination /sapdb/LCx/saparch2 .

B) Redefine the LOG backup medium for AUTOLOG for the log backups to be

written to the new location /sapdb/LCx/saparch2.

Thank you and best regards, Natalia Khlopina

Former Member
0 Kudos

Hi Natalia,

So it appears that I read it correctly, as you also state below: Log backups that are created using the automatic log backup function can only be written to files. Therefore I must use a system command to get them to the second archive destination.

Is this correct?

I am uncertain what you mean by your second point: Can you further explain how I would accomplish this?

Redefine the LOG backup medium for AUTOLOG for the log backups to be

written to the new location /sapdb/LCx/saparch2.

As I am under the impression I can only have only one log medium set to autolog on.

I have also found an OS command that I can append to the log medium definition but so far I am unable to get it too work.

I have the following syntax:

backup_media_put "john" "/sapdb/LCD/testarch/LCD_LOG" FILE LOG 0 0 NO NO "cp /sapdb/LCD/testarch/LCD_LOG.* /sapdb/LCD/saparch/" NONE

Please Advise

former_member229109
Active Contributor
0 Kudos

Hello John,

1) Yes. Log backups that are created using the AUTOLOG ON can only be written to files.

You could use a system command to copy the log backup files to a second destination

/sapdb/LCx/saparch2 for use with my DR server.

2) Create the LOG backup medium for the log backups to be written to the new location

/sapdb/LCx/saparch2. You could do so using DBMGUI tool or dbmcli + medium_put.

Then run::

dbmcli -d <SID> -u control,control

<enter>

dbmcli on <SID>>autolog_off

dbmcli on <SID>>autolog_on <new_logmedium>

dbmcli on <SID>>exit

< You could also use the DBMGUI tool -> Instance<main menu>-> Set Auto Log on/off

to set Auto Log off & then to set Auto Log on, select the new Log medium;

after that you will have the new LOG medium of the AutoLog type. >

Thank you and best regards, Natalia Khlopina

Former Member
0 Kudos

Natalia,

Thank You very much for your reply. I believe that in my situation I will need to generate the log files and then have a monitor in place to pickup the newly create log files and copy them to a 2nd destination.

Thanks Again