Oracle Logs - Is it this simple?

GregE

ADSM.ORG Senior Member
Joined
May 12, 2006
Messages
2,089
Reaction score
31
Points
0
Website
Visit site
Ok I've gone thru the tedious process of preparing configuration for Oracle databases (not many yet) to backup LANFree with log archives backing up to disk. Here's what I did.....

setup separate dsm.opt files with Servername <DB>-logarch
setup separate tdpo.opt files for <DB>-logarch
setup separate stanzas in dsm.sys for <DB>-logarch
setup separate include-exclude lists for <DB>-logarch

Now I see in the Oracle TDP (5.4) manual, this include-exclude setup to separate them...
.....The FORMAT parameter in the RMAN script can also be used to assist with object naming. For example, if the FORMAT parameters (in the RMAN script) specified the following values for databases and logs:
format ’DB_%u_%p_%c’
format ’LOG_%u_%p_%c’


The include statement in the dsm.sys file (used by the Oracle node) would be as follows:
INCLUDE /adsmorc/.../DB* mgmtclassnameforDBs
INCLUDE /adsmorc/.../LOG* mgmtclassnameforLogs


Is it really that simple? Can I delete all the stuff I've done and simply replace with a two line include-exclude setup??
 
Last edited:
Yep. that simple... :) I do though, have another entry for the control files. As long as your dsm.opt, dsm.sys and tdpo options files are all done correctly, the include is that simple.

Steph


Ok I've gone thru the tedious process of preparing configuration for Oracle databases (not many yet) to backup LANFree with log archives backing up to disk. Here's what I did.....

setup separate dsm.opt files with Servername <DB>-logarch
setup separate tdpo.opt files for <DB>-logarch
setup separate stanzas in dsm.sys for <DB>-logarch
setup separate include-exclude lists for <DB>-logarch

Now I see in the Oracle TDP (5.4) manual, this include-exclude setup to separate them...
.....The FORMAT parameter in the RMAN script can also be used to assist with object naming. For example, if the FORMAT parameters (in the RMAN script) specified the following values for databases and logs:
format ’DB_%u_%p_%c’
format ’LOG_%u_%p_%c’


The include statement in the dsm.sys file (used by the Oracle node) would be as follows:
INCLUDE /adsmorc/.../DB* mgmtclassnameforDBs
INCLUDE /adsmorc/.../LOG* mgmtclassnameforLogs


Is it really that simple? Can I delete all the stuff I've done and simply replace with a two line include-exclude setup??
 
Thank you. I'm not sure what you mean when you say "as long as" my other files are done correctly? I should be able to put all my other files back they way they were, and delete the additional dsm.opts, tdpo.opts, dsm.sys stanzas that I created specifically for log archives, right? I would only need a correct include-exclude list.

Another question as I was looking thru my RMAN backup logs. What is it that you are putting in your include exclude list as the pattern to bind to the particular mgmt classes?

......For the database backup, in the RMAN log, I see......
input datafile fno=00001 name=/oracle/data/DB1/DB1_system.dbf
piece handle=bk_20797_4_700277265 tag=DB1_HOT comment=API Version 2.0,MMS Version 5.4.1.0

......For the log archive backup, in the RMAN log, I see.....
archive log filename=/oracle/data/DB1/log_archive/DDPROD_98394_1_605283850.log recid=98015 stamp=700260630
piece handle=DB1_ackrqqlr_1_1 tag=TAG20091015T020307 comment=API Version 2.0,MMS Version 5.4.1.0

My question on that is, what do you use in the include-exclude syntax? For the DB, are you using the "input data file" syntax, that being *.dbf, or are you using the "piece handle," which is bk* ?

In the log archive include-exclude syntax are you using the "archive log filename," which would be *.log, or are you using the "piece handle" which would be DB1* ?

My assumption is we should use the "piece handle" for each, but I need to be sure.
 
Last edited:
Yes, technically (for one db), you only need one tdpo, one dsm.sys (with multiple stenzas) and one dsm.opt per stanza. I meant, that all the info in the option files be ok, like the dsm.opt for the oracle instance pointing to the correct stenza in the dsm.sys etc...

I typically create my options files like this:

tdpo_ORACLEDBNAME.opt
dsm_ORACLEDBNAME.opt
the nodename ora_ORACLEDBNAME

In order to "map" the proper data to the correct management class, i use the format command in the rman scripts...

For example, here is the way i use to do a full backup. I schedule tsm to run a TSM_Oracle_backup.sh script. I call that script using the following format
"TSM_Oracle_backup.sh full ORACLEDBNAME"

This script then calls a full.sh script (or arch.sh if i specify arch instead of full in the command line) and it executes the rman backup for the ORACLEDBNAME.

Here is the full.sh script i use...arch is fairly similar.

export ORACLE_SID=${1}
export ORAENV_ASK=NO
. oraenv

rman target "/" catalog ${ORACLE_SID}/[email protected] msgno <<!
run
{
set command id to '${ORACLE_SID}full';

backup full
skip inaccessible
filesperset 32
tag ${ORACLE_SID}_full_tsm
format 'full_%d_%s_%t'
(database) ;

# archives current redo log
sql 'alter system archive log current';

# backup all archived logs
backup archivelog all
tag ${ORACLE_SID}_arch_tsm
format 'arch_%d_%s_%t'
delete all input;

backup current controlfile
tag ${ORACLE_SID}_ctlf_tsm
format 'ctlf_%d_%s_%t';

change archivelog all crosscheck;
delete noprompt obsolete;

}
exit;
!

As you can see, i format my full db backups, archive logs and control files to begin with either full_, arch_ or ctlf_...

Then, in the dsm.sys:

INCLUDE /ORACLEDBNAME/.../full* TDP_ORACLE_DISK
INCLUDE /ORACLEDBNAME/.../arch* TDP_ORACLE_DISK
INCLUDE /ORACLEDBNAME/.../ctlf* TDP_ORACLE_DISK

Hope this helps...

Steph
 
Thank you. I already have multiple dsm.opts, tdpo.opts, etc, because I have several databases per UNIX server so we're on the same page there. As for the format of the include-exclude, I understand now that it comes from the RMAN "format" command, so in my example from the RMAN logging output, it's the "piece handles."

Thanks again for posting all of that. I had seen one of your posts similiarly on this subject from not long ago. That, along with what I read in the Oracle TDP admin guide, got me very interested in the simplicity. I understand it all now.

Odd thing is, I have info directly from IBM with logarchive-to-disk with full db going to tape, and there's NO mention of the simple method of two separate lines in include-exclude. Their method will work (extra files, extra dsm.sys stanzas), but creates WAY more config that's necessary.
 
Last edited:
Odd thing is, I have info directly from IBM with logarchive-to-disk with full db going to tape, and there's NO mention of the simple method of two separate lines in include-exclude. Their method will work (extra files, extra dsm.sys stanzas), but creates WAY more config that's necessary.

Some of my DBs are small, hence why the are sent to disk instead of waiting for a tape mount...

Glad i could help.

Steph
 
One more thing. Currently in my dsm.sys stanzas for Oracle databases, I use "COMPRESSION YES" since it's backing up to disk. My tape drives have compression enabled.

When I begin backing up LANFree, I want to use COMPRESSION NO and let the tape drive handle compression.

Now, what about log archives? If I use the simple method of the include-exclude list, my log archives will go to disk, but uncompressed. I assume that if I wanted to compress those at the client, I'd have to setup my long-winded version of additional dsm.opts, tdpo.opts, dsm.sys stanzas, etc, just as I had planned to all along before discovering the include-exclude option. Is this correct?

....or...is it simpler....

I found the client option "include.compression" but it only applies if compression is set to YES.

Do I set COMPRESSION YES in the dsm.sys, then set my full db backup to NOT compress and allow my log archives to compress, by setting my include-exclude as:

* set inclusion *
INCLUDE /adsmorc/.../DB* mgmtclassnameforDBs
INCLUDE /adsmorc/.../LOG* mgmtclassnameforLogs
* set compression on/off *
exclude.compression /adsmorc/.../DB* mgmtclassnameforDBs
include.compression /adsmorc/.../LOG* mgmtclassnameforLogs


I found this in the client admin guide but don't quite understand it....
include.compression
Includes files for compression processing if you set the compression option to yes.


If Compression is YES already, why would I have to use include.compression on anything?
 
Last edited:
If it helps anyone else, I've found the answer to my question.

COMPRESSION YES must be in place for any compression to take place.

From the client admin guide...
"Tivoli Storage Manager processes exclude.dir and other include-exclude statements first. Tivoli Storage Manager then considers any exclude.compression statements.

For example, consider the following include-exclude list:
exclude c:\test\*.*
exclude.compression c:\test\file.txt
include c:\test\file.txt

Tivoli Storage Manager examines the statements (reading from bottom to top) and determines that the c:\test\file.txt file is a candidate for backup, but is not a candidate for compression processing."


So exclude.compression, or include.compression, doesn't determine whether something is backed up. It only determines whether to compress something that's is already going to be backed up.

Learn something new everyday. :-D
 
Last edited:
Hi GregE!

Sorrry about the delay in the feedback...Seems like you've found your answer anyhow..! :)
I actually learned about that just now as well. Thanks for the post.

Steph
 
Back
Top