cancel
Showing results for 
Search instead for 
Did you mean: 

SAPMADB switch log file

Former Member
0 Kudos

Hello to all,

Although I am quite familiar with various databases and backup strategy I have a question regarding the SAPMAXDB backup strategy.

I want to to would like to generate a backup file like before backup of archive logs , like the in the Oracle "Alter system switch logfile".

Any idea?

Thanks in advance,

George

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Hi George,

> I want to to would like to generate a backup file like before backup of archive logs , like the in the Oracle "Alter system switch logfile".

Why do you want to do such a thing in MaxDB?

Unlike Oracle user managed online backups (BEGIN BACKUP...) MaxDB backups are always consistent and can always be used to open the database after recovery.

Also, MaxDB does not have multiple online redolog files that would require 'switching' in between.

When you want a backup of the yet unsaved log information - simply run a log backup.

But, as written, with every full data backup you take you get a 100% transaction consistent backup of the database from the point in time when you started the backup.

regards,

Lars

Former Member
0 Kudos

Hello Lars,

Thanks for the promt response.

1. Does this means that when you simply run a log backup takes also the active log entries ? (does not need to make u201Can archive logu201D file. Correct?

2. I also knew that the architecture is different than the oracle. I also would like to ask if we want to execute from os (unix) level backup log commands? Do we need it separately? Is the following syntax correct?Any reference fro the OS level commands?

SaveDB C %DBNAME% %CUSER% %CPW% %NODENAME% or

dbmcli -d admin -u dbm,dbm -uUTL -c backup_save log

is that correct?

3. The issue in generating log file before taking a backup of archive logs in MAXDB in order to be consistent is not correct do you agree? You do not need to do that you just make backing up the log and the backup contains all the entries up the most current, correct me if I am wrong?

Best Regards

George

lbreddemann
Active Contributor
0 Kudos

> 1. Does this means that when you simply run a log backup takes also the active log entries ? (does not need to make u201Can archive logu201D file. Correct?

If you want to compare it that way, the log backup of MaxDB is pretty much what is called archive log file on Oracle.

What a log backup does for MaxDB is:

1. Copy the log entries to a file (these backup files are sequentially numbered and therefore also called 'version files')

and

2. Mark those entries as overwriteable in the log area.

> 2. I also knew that the architecture is different than the oracle. I also would like to ask if we want to execute from os (unix) level backup log commands? Do we need it separately? Is the following syntax correct?Any reference fro the OS level commands?

>

> SaveDB C %DBNAME% %CUSER% %CPW% %NODENAME% or

> dbmcli -d admin -u dbm,dbm -uUTL -c backup_save log

Nope, that's not the right syntax.

Try this one:


dbmcli -d <DBSID> -u dbm,<pw> -uUTL dbm,<pw> backup_start <MEDIUMNAME> LOG

If you want to schedule something like that, you should consider using the XUSER stored logon data so that you can avoid having the user/password all over your script. Also the database name and the hostname can be pre-stored, making the script actually db-independend.

The command could then look like this:


dbmcli -U c -UUTL c backup_start <MEDIUMNAME> LOG

Well, in fact you may actually want to read the documentation on this:

[http://maxdb.sap.com/doc/7_6/30/f7c7b05be311d4aa1500a0c9430730/content.htm]

You know, there's this site [http://maxdb.sap.com/] containing all the documentation, internals and lot more information.

You may also want to check the SCN Wiki pages for MaxDB: [https://wiki.sdn.sap.com/wiki/display/MaxDB].

> 3. The issue in generating log file before taking a backup of archive logs in MAXDB in order to be consistent is not correct do you agree? You do not need to do that you just make backing up the log and the backup contains all the entries up the most current, correct me if I am wrong?

As I wrote: in Oracle you do this to have a clearly defined set of files that allows you to bring the database online again. It's the datafile copies and the archive log files.

Without the archive log files you cannot open the database.

That's completely different to MaxDB. There, as part of the backup, a consistent state is generated (a savepoint) and all pages that belong to that state are saved to the backup file.

You don't need any log to restart a MaxDB based on this backup. It just works.

You can of course recover log backups - but you don't have to.

If you're familiar with Oracle's RMAN - it's pretty similar. It saves blocks instead of copying files.

Ok, hope that helps for starters.

Best regards,

Lars

Answers (0)