ADSM-L

Automating SQL/Exchange Connect Agents

1998-06-16 05:08:41
Subject: Automating SQL/Exchange Connect Agents
From: Phil Chissell <phil.chissell AT NATPOWER DOT COM>
Date: Tue, 16 Jun 1998 09:08:41 -0000
Due to popular(!) demand, I have enclosed my scripts for automating the
SQL and Exchange connect agent backups and deletions.

***********
***SQL***
***********

SQL backups are automated by a batch file (SQL_BACKUP.BAT) which is
scheduled by ADSM Scheduler.

Firstly, it uses the "sqldsmc /sqlquerydb" command to query all the SQL
databases on the system and then uses a perl script (SQL_GET_DBS.PL) to
put all the database names into a temporary file.

Secondly, it uses the "sqldsmc /backupfull" command to backup each SQL
database in the temporary file (this is in effect, the same as using the
wildcard operator for SQL backups which some people were asking about).

Thirdly, it issues a "sqldsmc /adsmquerydb" to get a list of all backed
up databases.

Fourthly, it runs another perl script (SQL_LIST_OLD_DBS.PL) to find all
databases more than %window% days old and writes this out to another
temporary file.

Finally, it issues a "sqldsmc /adsmdelete" command for each database in
this temporary file.







********************
***EXCHANGE***
********************

This is essentially the same as for SQL but without the perl script to
generate a list of databases as there are only two, IS and DIR.  The
scheduled script is EXCHANGE_BACKUP.BAT.

Firstly, this runs a utility to generate the current day of the week
(GETDAY.EXE) which is a binary file someone here found on the Internet
somewhere.

Secondly, according to which day of the week it is, it will perform
either a full or incremental backup of the Exchange databases.

Thirdly, it issues a "excdsmc /adsmquerydb" to get a list of all backed
up databases.

Fourthly, it runs another perl script (EXC_LIST_OLD_DBS.PL) to find all
databases more than %window% days old and writes this out to a temporary
file.

Finally, it issues a "excdsmc /adsmdelete" command for each database in
this temporary file.







Watch out for the next exciting episode in this series, coming soon when
the Oracle Connect Agent is released for NT....

Good luck.

Phil

Phil Chissell
National Power plc
Windmill Hill Business Park
Whitehill Way
Swindon
Wilts. SN5 6PB
UK

Tel:  +44 (0)1793 894237
Fax: +44 (0)1793 894230
E-mail: Phil.Chissell AT natpower DOT com
<Prev in Thread] Current Thread [Next in Thread>