have a script to do this:
CONNECT TO mydb;
QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
CONNECT RESET;
backup database mydb to e:\sqlbackups\mydb compress;
CONNECT TO mydb;
UNQUIESCE DATABASE;
During the backup, the server ran out of disk space. We freed up
space. Because it's windows and runs as a task, I couldn't see which process it was...so we rebooted the box...
When backup ran the next night here's the output:
QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS
SQL1371N Instance or database "mydb" is already quiesced. Quiesce
type:
"Database".
CONNECT RESET
DB20000I The SQL command completed successfully.
backup database mydb to e:\sqlbackups\mydb compress
SQL1035N The database is currently in use. SQLSTATE=57019
CONNECT TO mydb
Database Connection Information
Database server = DB2/NT 8.2.5
SQL authorization ID =
Local database alias = mydb
UNQUIESCE DATABASE
DB20000I The UNQUIESCE DATABASE command completed successfully.
And yet I was able to quiesce and unquiesce ok this morning. If I run the backup again, will the quiesce work? (This db is 120 gigs, so it takes about 5 hours to run and runs at night).