I know I am late to update this blog with very first tip & trick regarding SQL-BackTrack. I was wrapping up my other duties for holiday time. So here I am writing very first trip and it is for Sybase DBAs using SQL-BackTrack for backup and recovery.

SQL-BackTrack for Sybase backup command arguments through control file options.

Most of the times backups are done through scheduled jobs in database environment. Hence you need reliable tool which provides variety of options which suite your backup strategy. Yet these variety of options will not work for scheduled job environment, unless you have strong command line interface to perform backups, which can satisfy all types scenarios RDBMS can throw at you.

One such database is Sybase and one such tool is SQL-BackTrack for Sybase under the umbrella of BMC Recovery Manager for Databases. SQL-BackTrack for Sybase (SBT), has strong base of command line options which can address any scenario and cater to your requirement of backup job scheduling.

However, sometimes database backup scenario change or backup arguments already mentioned in the scheduled script and backup command need change. Sometimes you need to troubleshoot the failed backup or need some change in the backup command. Usually scheduled backup scripts are managed by Unix admin through cron or some other scheduling application. To make any changes in existing script which is there since ages is not a small task. In financial organizations like banks, insurance companies, you need to go through change management process every time if there is any change to be done in production environment.

For this you will need to open a ticket for Unix admin to make the necessary changes in backup script, since he is responsible for scheduled jobs. This might take more time than you anticipate. So there should be better way to avoid this hustle. SQL-BackTrack for Sybase can do just that through control file.

Following are the steps through which you can choose to add options in your exiting backup command without modifying backup script which is scheduled in cron or some other application:

1. open backtrack's database backup control file in vi editor.

2. You should see content like following in it. Even if you are on lower version of SQL-BackTrack some of the options or at least 'dumpcommand' options are not changed.

begin options

type=-physical

server=-server sqlbt

dumpuser=-user sa

dumpepass=Y68HBZ7PUBBJPLQZ5FDFBDU265UDPCBH

loaduser=-user sa

loadepass=YN9C6TTZTURDYV7BDWS8BQ69GNBYUJ77

default_backup_pool=p1

cloneoptions=-no_cloning

generations=2

automatic_backup_expiry=True

dumpcommand=dtsdump $type $server $database >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This is the parameter where you can provide extra/specific backup comamnd arguments

dumpoptions=-compress

loadcommand=dtsload

run_pre_post_backup_ops=False

run_pre_post_restore_ops=False

automatic_catalog_backup=False

incrementals=y

database=-database ajay

auto_expire_staged_location=False

last_full_backup_status=A

active_backups_counter=9

active_generations_counter=2

end options

3. Here I will modify the control file to add option of debug in the backup command. For this purpose I will need to create a new key word in the control file which I will use in dumpcommand parameter with '$' sign before the keyword. So changed control file will look like:

begin options

type=-physical

server=-server sqlbt

dumpuser=-user sa

.

.

.

generations=2

automatic_backup_expiry=True

debug=-DEBUG /path/filename >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Notice the additional keyword in this control file than above.

dumpcommand=dtsdump $type $server $database $debug >>>>>>>>>>>>>>>>>>>>>>>>>>>> Along with additional keyword with '$' sign before the keyword.

dumpoptions=-compress

.

.

.

active_generations_counter=2

end options

4. SQL-BackTrack for Sybase will always refer to this control file before backup command is issued. With the options specified in the actual command it will add -DEBUG /path/filename option on and above already included options in control file.