cancel
Showing results for 
Search instead for 
Did you mean: 

Howto configure init<SID>.sap for DBACOCKPIT full and log backup

Former Member
0 Kudos

Hi experts,

topic sounds maybe strange, but I need help in configuring the parameters for backup of database and redo logs correctly.

I have a newly installed solution manager 7.01 EHP1 on Win 2003 R2 x64, Oracle 10.2.04 as the database. As the archive log directory is continiously growing I tried to run a full backup with redo log backup from transaction DBACOCKPIT. The full backup run correctly, whereas the redo log backup failed, but gave me no log file to view any errors?! I cannot find the log file.

By searching the web I found some hints that the parameters for brarchive with "-cds" do not work, which where entered automatically.

In the file init<SID>.sap I only changed 3 parameters to to the backup to hard disk:

backup_mode = full

backup_dev_type = disk

compress = yes

When I run the redo log backup job from transaction manually with option "-sd" the log files are moved from log directory into the backup directory. This is fine so far. But after the next full backup I assume that I do not need them anymore so they can be deleted?!

Is this correct?

Can you guide me with parameter settings to enable the following backup strategy through DBACOCKPIT (if possible)?

I only want a one week cycle with (This is not for productive use):

- Monday-Friday: Incremental backup

- Saturday: Full backup offline (with redo log backup and delete)

- Database checks (as given by default from DBACOCKPIT)

How to achieve this in order that the respective backups are overwritten/deleted after the cycle? Which parameters do I have to set in the init<SID>.sap file and which values?

I would be very happy if you could guide me through this problem.

Regards,

Andreas

Accepted Solutions (0)

Answers (2)

Answers (2)

fidel_vales
Employee
Employee
0 Kudos

Hi,

You should start reading the documentation, it is your friend:

http://scn.sap.com/community/oracle => Oracle DBA Overview => SAP Database Guide:Oracle

then, I do not understand why you install anything "newly" in a non supported version of Oracle (10.2.0.4)

You mention that the archive failed and you have no log. I doubt it. If brarchive starts it creates a log (if it has authorization to write on the directory)

1.- Have you checked the JOB log? that can tell you if the brarchive was started and if there are authorizaion u other type of errors

2.- where did you look for the log file?

By searching the web I found some hints that the parameters for brarchive with "-cds" do not work, which where entered automatically.

you search the web but you have not read the documentation, nice

yes, probably you have no clue what "-cds" means, so check the manual and try to figure out why it does not work on disk backup.

In the file init<SID>.sap I only changed 3 parameters to to the backup to hard disk:

backup_mode = full

backup_dev_type = disk

compress = yes

you should also check that the compress method works in your system

When I run the redo log backup job from transaction manually with option "-sd"

from which transaction? do you mean command line?

Also, you do not know what -sd means, so you do not understand what you are doing here.

But after the next full backup I assume that I do not need them anymore so they can be deleted?!

Is this correct?

Again, you have not read the documentation. Brarchive has "moved" the redo logs to a directory in disk (and delted the original)

After the next backup you still need them if you want to recover from a previous one, which is the "backup lifecycle" I mentioned before. If your cycle is 30 days you should NOT delete them for 30 days.

Can you guide me with parameter settings to enable the following backup strategy through DBACOCKPIT (if possible)?

Read the documentation, it has all the options you may need (and more) 

I only want a one week cycle with (This is not for productive use):

- Monday-Friday: Incremental backup

You can only do incremental backups with RMAN, so forget about that (for the moment), first learn how to do the "normal" ones then start figuring out how to configure RMAN wit BRBACKUP, then change to incremental backups. The changes you mentioned on the initializatioin fileare the correct ones.

- Saturday: Full backup offline (with redo log backup and delete)

this can be configured also in the DB13, no issue.

The archive logs have to be also configured there(depends on the option of the backup you choose)

- Database checks (as given by default from DBACOCKPIT)

this is also scheduled in DB13

How to achieve this in order that the respective backups are overwritten/deleted after the cycle?

Then, if you want to delete the "old" backups, you have to schedule a cleanup as BRBACKUP/BRARCHIVE will not delete the old ones.

Which parameters do I have to set in the init<SID>.sap file and which values?

I would be very happy if you could guide me through this problem.

As I said several times, read the manual. There you can figure out by yourselve the best parameters for your system (and understand the WHY instead of following blindly without understand some recommendations from someone that may or may not know)

Former Member
0 Kudos

Hi Fidel,

thanks for your helpful hints, but I would like to try to clarify some points.

Maybe I did not mentioned that I read the documentation, but you are right, at this point I still have no good feeling that I understood the concepts described correctly.

Coming from SAPDB/MaxDB I configured the backup with the db manager tool from sap, which lets me define a disk volume for a full backup, incremental, log and auto-log backup. Therefor I tried to configure this system in the same way but did not get it working.

1. DB version:

You mentioned this is an unsupported version? I got the install dvd and a patch dvd and the solution manager installation guide said that I can install these two.

2. Log file brarchive:

I try to add some screenshots to the orignal post where you see the error message.

I assumed the log file mentioned (aejhvlko.log) will be somewhere in the backup directory, but did not found it. As the full backup finished successfully I assumed as well that the directory is writeable by sap/br*tools.

3. Searching:

Sorry, did not realize that I have to write that I read the documentation and searched afterwards the web/sdn.

As mentioned above: Yes, I do currently not understand the concept completely. By asking a question about the parameter "-cds" I hoped to get a clearer answer what this parameter actually does. By searching I found only other people having the same issue but not an answer why.

4. Compress method

I assume again it worked as the backup files are smaller than the original files and get the extension *.Z as mentioned in the initSLM.sap config file.

5. Redo log job

Whole documentation talking about transaction DBACOCKPIT and that there are still the old ones (like DB13) but you do not have to mixe them both.

I did run the predefined job "redo log backup" from transaction DBACOCKPIT with parameter "-sd". Again, this was mentioned in the sap online documentation as a valid option, parameter description said that it saves and deletes the archive logs and this worked so for as aspected.

6. RMAN

I already saw this but did not read anything about how to configure RMAN, espacially to create incremental backups.

7. Delete old backup logs

You mentioned to read tho docs to configure it on my own but I wrote the post as I did not get it working. So again can you please give me an example for deleting the old files which where already backuped?!

This is a long answer but one thing to notice: I really like to explore new tools and feature but for some questions it's is much easier to get help from an expert which can lead in the right direction.

Regards,

Andreas

Message was edited by: Andreas Krienke added screenshots

fidel_vales
Employee
Employee
0 Kudos

Hi,

My apologizes if I thought you had not read the documentation. There are too many people who does not do it and the "solution" is there.

1. DB version:

You mentioned this is an unsupported version? I got the install dvd and a patch dvd and the solution manager installation guide said that I can install these two.

Well, it may be that the original DVD come with the mentioned version, but Oracle only offers extended support for 10.2.0.5 (that it has a cost) and the current supported version is 11g R2 (latest one 11.2.0.3)

see SAP Note 1110995 Extended maintenance for Oracle Version 10.2

2. Log file brarchive:

I try to add some screenshots to the orignal post where you see the error message.

I assumed the log file mentioned (aejhvlko.log) will be somewhere in the backup directory, but did not found it. As the full backup finished successfully I assumed as well that the directory is writeable by sap/br*tools

BRARCHIVE writes the archives logs in the saparch directory. check the directory and the binary authorizations. Also see if there is a logfile on the saparch directory.

3. Searching:

not sure what is wrong with the documentation. When I read it I think it is clear. Sorry if I copy it here and ask what is not clear (from page 480):

1.- This BRARCHIVE command option defines the BRARCHIVE function to be performed

2.- BRARCHIVE only performs the selected operation for the number of offline redo log files that

you selected with the option -n. The program only deletes offline redo log files if they have already been successfully archived or copied

Now to the options

-cds|-copy_delete_save: creates a second copy of offline redo log files that were already

archived, then deletes them and starts archiving of the newly created offline redo log files.

-sd|-save_delete: archives offline

4. Compress method

I assume again it worked as the backup files are smaller than the original files and get the extension *.Z as mentioned in the initSLM.sap config file.

  

Now, it seem that you do not understand what that means.

brarchive will save the offline redo logs (into tape or disk), that is what the "s" means

then it may delete the file that it was saved from the archive directory (NOT from the tape or disk) if the "d" is specified.

If you specify that BRARCHIVE will also COPY the file (the "c") then BRARCHIVE will only delete the file AFTER two copies of the redo log file are performed in two different tapes (usually two different days or executions) If you perform the copy to disk, then it cannot do two copies on different "tapes" as the backup is done in "one" disk, so the option "cds" is not possible. You have to use "sd" or, if you want two copies, you have to do two archive backups with two different optiions

4. Compress method

I assume again it worked as the backup files are smaller than the original files and get the extension *.Z as mentioned in the initSLM.sap config file.

yes,

5. Redo log job

Whole documentation talking about transaction DBACOCKPIT and that there are still the old ones (like DB13) but you do not have to mixe them both.

I did run the predefined job "redo log backup" from transaction DBACOCKPIT with parameter "-sd". Again, this was mentioned in the sap online documentation as a valid option, parameter description said that it saves and deletes the archive logs and this worked so for as aspected.

In new systems, when you call DB13 it will call the correct "branch" of the DBACKOCPIT. you can use them as a "shorcut"

6. RMAN

I already saw this but did not read anything about how to configure RMAN, espacially to create incremental backups.

RMAN will not copy to tape by itself (AFAIK), you will need a tape manager. But it can do backups to disk. You have to configure it on the parameter file init<sid>.sap. The device parameter, instead of disk you can use rman_disk and you have to configure other parameters like rman_channels, etc. The guide has a chapter about this. Then you can perform a full backup (level 0) and the incremental backup the following days (level 1)

Incremental backup cannot be performed without RMAN (if you do one without RMAN, BRBACKUP will backup the complete DB always and perform some other tasks, I do not recall which ones by the top of my head)

7. Delete old backup logs

You mentioned to read tho docs to configure it on my own but I wrote the post as I did not get it working. So again can you please give me an example for deleting the old files which where already backuped?!

the command is "brconnect -f cleanup" you have to define the retention period with some parameters in the init<sid>.sap or on the command line (check the documentation for the name of the parameters, page 598 on the latest pdf. The command line options are:

 

-i|-diskarch defines the retention period for offline redo log files saved on disk

-k|diskback defines the retention period in days for database files saved on disk

in both cases the default is 30 days.

This option is also available in the DBACOCKPIT but you do not specify the options on the command line, so you need to change the parameters.

I know all this information is on the guide, for that reason I pointed to it as a lot of people do not bother reading it.

As you mention, it may be difficult to find (some) or to understand. Hopefully it will give you enough clues to check it again for other posibilities in the BR*TOOLS

Regards

Fidel

Message was edited by: Fidel Vales (minor edits)

Former Member
0 Kudos

Hi Fidel,

thy again for the helpful hints. I try to answer on some of them:

1.

Well, it may be that the original DVD come with the mentioned version, but Oracle only offers extended support for 10.2.0.5 (that it has a cost) and the current supported version is 11g R2 (latest one 11.2.0.3)

see SAP Note 1110995 Extended maintenance for Oracle Version 10.2

You are right and I will try to update the database to at least the mentioned version 10.2.0.5.

2.

BRARCHIVE writes the archives logs in the saparch directory. check the directory and the binary authorizations. Also see if there is a logfile on the saparch directory.

I checked the log, but I cannot find the mentioned file. The directory contains three files from other backup jobs I tried to start through DBACOCKPIT, a redo log backup ("aejhuzlb.dsv", "aejhvagh.svd") as well as a "archSLM.log" file. I assume that the log is not there because of the "wrong" parameter "-cds"?!

From the online documentation I read that the log files get the respective extension depending on what option the job was started with.

3.

OK, got the point, that "-cds" cannot work and will be normaly used for tape backups. I think "-sd" is good in my situation.

4.

In new systems, when you call DB13 it will call the correct "branch" of the DBACKOCPIT. you can use them as a "shorcut"

I did not know that it points directly into DBACOCKPIT. In earlier systems I think it was a separate transaction.

5.

the command is "brconnect -f cleanup" you have to define the retention period with some parameters in the init<sid>.sap or on the command line (check the documentation for the name of the parameters, page 598 on the latest pdf. The command line options are:

This option is also available in the DBACOCKPIT but you do not specify the options on the command line, so you need to change the parameters.

I know all this information is on the guide, for that reason I pointed to it as a lot of people do not bother reading it.

As you mention, it may be difficult to find (some) or to understand. Hopefully it will give you enough clues to check it again for other posibilities in the BR*TOOLS

As said before, I have no problems reading the docs so can you give me the correct link to the guide you mentioned in order to speak of the same document?

Thx and regards,

Andreas

fidel_vales
Employee
Employee
0 Kudos

Hi,

the document (PDF) is

http://scn.sap.com/community/oracle

=> Oracle DBA Overview

=> SAP Database Guide: Oracle

there is also a link to the online version  on the same location.

Former Member
0 Kudos

Additional information:

I did run the full backup from DBACOCKPIT 2 times and it creates 2 strange directories under sapbackup containing exactly the same database files.

But I cannot see any file with naming convention from default volume parameters in initSLM.sap:

# volumes for brarchive

# [<volume_name> | (<volume_name_list>) | SCRATCH]

# no default

volume_archive = (SLMA01, SLMA02, SLMA03, SLMA04, SLMA05,

                  SLMA06, SLMA07, SLMA08, SLMA09, SLMA10,

                  SLMA11, SLMA12, SLMA13, SLMA14, SLMA15,

                  SLMA16, SLMA17, SLMA18, SLMA19, SLMA20,

                  SLMA21, SLMA22, SLMA23, SLMA24, SLMA25,

                  SLMA26, SLMA27, SLMA28, SLMA29, SLMA30)

# volumes for brbackup

# [<volume_name> | (<volume_name_list>) | SCRATCH]

# no default

volume_backup = (SLMB01, SLMB02, SLMB03, SLMB04, SLMB05,

                 SLMB06, SLMB07, SLMB08, SLMB09, SLMB10,

                 SLMB11, SLMB12, SLMB13, SLMB14, SLMB15,

                 SLMB16, SLMB17, SLMB18, SLMB19, SLMB20,

                 SLMB21, SLMB22, SLMB23, SLMB24, SLMB25,

                 SLMB26, SLMB27, SLMB28, SLMB29, SLMB30)

Are these values only relevant for tape backup or as well for for disk backups?

I am a little bit confused...

fidel_vales
Employee
Employee
0 Kudos

Hi,

Will start from this one.

You are doing a backup to disk

therefore volume_backup/volume_archive parameters are NOT used as they are used to name the tapes and be able to follow the "backup lifecicle"

if you bacup cycle is 30 days, you cannot use the same tape for several days. Each has a different name on the parameters indicated.

When you do a backup, BRBACKUP will create a log file. When you do a backup to disk, in addition it creates a directory where the files are copied. the name of the backup log file and directory is the same and it has some "internal logic"  to avoid duplicates.

Have you read the BR* documentation? it is a nice (and long) document where this information is provided.

http://scn.sap.com/community/oracle => Oracle DBA Overview => SAP Database Guide:Oracle