I had yesterday several problems with my DB. We run everyday several backups with a disk snapshot tool. The created image is backed up while the system is running .. (I guess you all know this kind of backup system)

Well, in order to create a consistent image we run three scripts.

1st one: suspend.sh

su - db2sdp -c "db2 archive log for database SDP"
su - db2sdp -c "db2 set write suspend for db"

--> Normal output :

DB20000I The ARCHIVE LOG command completed successfully.
DB20000I The SET WRITE command completed successfully.

2nd Activate snapshot image (take photo!)

3rd: resume.sh

su - db2sdp -c "db2 set write resume for db"

--> Normal output:

DB20000I The SET WRITE command completed successfully.

Ok, yesterday, as we were rescheduling the backup jobs (full activity on DB) a backup was unfortunately started.

As we knew the backup had been started it was too late and the three scripts had been started.

But no output came to the db commands.

A ps -fea gave there were two processes started (an hour later the situation was still the same)

1.- archive log
2.- write resume

Well, what I suppouse is that the 'write suspend' operation ended before the 'archive log' what was new for me.

The database was stuck. We had to stop SAP and restart the database (on the production environment).

My questions are:

1.- What happend exactly?
2.- How can I avoid it?

Thanks in advace, at least for reading my questions,