I'm a newbie to DBA scripting. I've been tasked to build a set of maintenance scripts on a SuSe box for DB2 8.2. I'd like to know where I could go for good
information on backup and recovery scripts.
I've thus far been able to do a simple backup and recovery, but I'm not sure
of the commands I'll need for a standalone script. For instance I need to know
how to take the datbase "offline".
I've been using a command
db2 force applications all
To kick all pending applications off the database, but I'm not sure how to make sure the database is offline so that no new processes won't try to connect during or right before the backup process.
The other key item I'm trying to determine is how to hide a password.
The script will have to login in order to perform the backup, and the
simple way to do this is to add the login and password in the command in
plain text. Is there another way to have the proper login access to perform
the required backup and restore commands without having the password
in plain text, "sight".
Any help is much appreciated.
Regards,
Michael