cancel
Showing results for 
Search instead for 
Did you mean: 

Autolog archiving questions.

Former Member
0 Kudos

Hello All,

We are currently running LiveCache 7.7 and are running autologs. I have gone over the sap documentation and have found the following when running autologs:

Do not backup autologs to pipe.

You must archive the autologs using a 3rd party backup tool or through os level commands.

I was digging around in db13 and found that when i switch to LCA I can archive log backup files.

So I tested it out to see what would happen.

Here are the end results:

2010-06-08 17:10:23

Cleaning up.

Removed temporary output file of pipe2file ('/var/tmp/temp1276024691-0') successfully.

Removed temporary error output file of pipe2file ('/var/tmp/temp1276024691-1') successfully.

Have finished clean up successfully.

2010-06-08 17:10:23

Filling reply buffer.

Constructed the following reply:

OK

Processed Stage Files 8

Bytes processed 2798125056

Deleted Stage Files 8

Remaining Stage Files 0

Reply buffer filled.

      • DBA Action ends:

Timestamp: 20100608171023 State: Success

So my log files were cleaned up and removed but the question is by doing this have a caused any kind of consistency problem with autologs? Maybe I have read the documentation wrong?

Second question is, is there a way to set differnt backup policies for maxdb/LiveCache ? For example with our oracle backups that use brtools we can specify differnt policy files...initSID.sap and initSIDarch.sap. We do this because we want our oracle archive logs to go to disk then to tape on our cdl. We do this so we don't run into not having any free tapes when backups are running thus causing us to have to move archive logs around until we can save/delete them.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here is something that I have found in the documentation.

[Setting the BSI_ENV|http://maxdb.sap.com/doc/7_7/47/6f1237a1db4d14b220fc3137c3f890/content.htm]

So in theroy if i had a shell script that was running from cron to check the filesystem every 10min or so I could have that script exec dbmcli.

This syntex generates errors but it is a step in the right direction? This bsi_archive.env file points to a differnt Parameterfile would wound in turn point to a different netbackup policy.

I get the ERROR of TOOMANYPARAMETERS with this string.

dbmcli -d LP1 -n lp1dbsap -u control,******** -raw BSI_ENV /sapdb/data/wrk/LP1/bsi_archive.env archive_stage BACKpage AUTOLOGS NOVERIFY REMOVE

I have successfully run the dbmcli below but again it's still using the primary bsi.env config which leads me to slower backups.

dbmcli -d LP1 -n lp1dbsap -u control,******** archive_stage BACKpage AUTOLOGS NOVERIFY REMOVE

Thanks

lbreddemann
Active Contributor
0 Kudos

>

> Here is something that I have found in the documentation.

> [Setting the BSI_ENV|http://maxdb.sap.com/doc/7_7/47/6f1237a1db4d14b220fc3137c3f890/content.htm]

Right direction!

> So in theroy if i had a shell script that was running from cron to check the filesystem every 10min or so I could have that script exec dbmcli.

>

> This syntex generates errors but it is a step in the right direction? This bsi_archive.env file points to a differnt Parameterfile would wound in turn point to a different netbackup policy.

>

> I get the ERROR of TOOMANYPARAMETERS with this string.

> dbmcli -d LP1 -n lp1dbsap -u control,******** -raw BSI_ENV /sapdb/data/wrk/LP1/bsi_archive.env archive_stage BACKpage AUTOLOGS NOVERIFY REMOVE

That's because in command line mode dbmcli accepts just one command.

For a series of commands, create a text file with the commands and call dbmcli with the -i option.

Example:

Textfile "1_archive_stage.cmd*


dbm_configset -raw BSI_ENV /sapdb/data/wrk/LP1/bsi_archive.env
db_connect
archive_stage BACKpage AUTOLOGS NOVERIFY KEEP
db_release
exit

Example 1. call


dbmcli -U w -i 1_archive_stage.cmd

Example:

*Textfile "2_archive_stage.cmd" *


dbm_configset -raw BSI_ENV /sapdb/data/wrk/LP1/bsi_archive_2.env
db_connect
archive_stage BACKpage2 AUTOLOGS NOVERIFY REMOVE
db_release
exit

Example 2. call


dbmcli -U w -i 2_archive_stage.cmd

With that and the documentation you should get along.

Hint: make sure to use the XUSER logon mechanims (-U w).

That way you can securely configure the database connection credentials and nobody will be able to see them in the crontab or via ps!

regards,

Lars

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you very much for all of the help Lars! I'm well on my way to getting everything scripted out.

In case anyone stumbles on this thread here is the SAP note on setting up the XUSER:

SAP Note: 39439

Many thanks,

Mike

lbreddemann
Active Contributor
0 Kudos

You're welcome!

Just as a small 'self-marketing'-note... read my blogs, especially those of the "mind the gap" series.

Guess that these might be instresting to you.

And for more general training/documentation, check out [http://maxdb.sap.com/training] with all the expert sessions.

Cheers,

Lars

lbreddemann
Active Contributor
0 Kudos

> So my log files were cleaned up and removed but the question is by doing this have a caused any kind of consistency problem with autologs? Maybe I have read the documentation wrong?

Hmm... maybe you misunderstood it.

What you did was to "archive" already written log backups.

This is pretty much the same as BRARCHIVE does for Oracle databases.

The liveCache kernel has already saved the logentries to the log backup files and with the "archive_stage" command you now have the option to hand these files over to the external backup tool - e.g. via pipe.

Thus: no consistency problem here!

> Second question is, is there a way to set differnt backup policies for maxdb/LiveCache ? For example with our oracle backups that use brtools we can specify differnt policy files...initSID.sap and initSIDarch.sap. We do this because we want our oracle archive logs to go to disk then to tape on our cdl. We do this so we don't run into not having any free tapes when backups are running thus causing us to have to move archive logs around until we can save/delete them.

Yes, you may well do this - but it's not as easy to setup as with BRARCHIVE.

You can script yourself the appropriate backup actions.

This could look like this:


dbmcli -U c

1. Backup of log backup files that had been put to the staging area <log_medium>
> archive_stage <backup_medium> <log_medium> KEEP

2. In the same DBM-Session this will just take the same files and back them up to a different medium
> archive_stage_repeat <backup_medium_2> 

More on this can be found in the [docs|http://maxdb.sap.com/doc/7_7/44/d97af17a012754e10000000a1553f6/content.htm].

regards,

Lars

former_member229109
Active Contributor
0 Kudos

Hello Mike,

Please review the SAP notes:

869267 32 59 FAQ: SAP MaxDB LOG area

1377148 10 54 FAQ: SAP MaxDB backup/recovery

-> There is the answer on the question :

u201C9. Can the log area be saved to a pipe?u201D &&

u201C11. How do I archive the log backup files that are generated?u201D

in SAP note 1377148.

-> u201CArchive log backupsu201D => review the document at

http://maxdb.sap.com/doc/7_7/default.htm

Database Administration -> Backing Up Databases -> Archiving Backup Files ->

Database Administration in CCMS, Archiving Backup Files

< To archive the log backups you could use different backup templates - <ext_backup_medium> >

Thank you and best regards, Natalia Khlopina