Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling of a backup procedure on NT

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi there!
I have a Windows NT box with DB2 UDB 7.2 installed.
I want to schedule a backup procedure of a database.
Here are my scripts:
backupdb.bat
db2cmd "db2 -tvf d:\backupdb.ctl >> d:\backupdb.log"

backupdb.ctl
force applications all;
backup db <dbname> user <username> using <password> to d:\backupdb2;

I use the &quot;at&quot; command of Windows, ie.
at 9:00 cmd /c &quot;d:\backupdb&quot;

The following error occurs:
force applications all

SQL0567N &quot;SYSTEM&quot; is not a valid authorization ID. SQLSTATE=42602



backup db <dbname user <username> using to d:\backupdb2

SQL1035N The database is currently in use. SQLSTATE=57019

How can I overcome this problem?
Thnx in advance.
DIMA
 
Do you need to do cold backups? Are you using userexit. If so do an online backup so you don't have to force all the connections off. The only other way maybe is to run the force command several times!! I have problems with this doing it manually. It usually takes a few goes. Also make sure that no jobs are automatically connect to the database as this is why the cold backup will fail even after you have diconnect all current users.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top