monkeylizard
MIS
I have a DB that I have gotten a good backup of. This DB is used for training. I want to give the trainers the ability to restore the backup and effectively restore them to their pre class session state.
I've written an app that executes a restore command when they click a button. I want to make the app wait until the restore is done before returning a "It's done" message.
My problem is that I don't knwo how to determine if a database is in ready mode or still restoring.
I've found master..sysdatabases and it has a "status" column, but I don't know how to find the meaning of the number in this column, or if it's relevant.
Is there a stored proc that can be called to return database statuses? If not, can I join sysdatabases somewhere to get the status?
Monkeylizard
Sometimes just a few hours of trial and error debugging can save minutes of reading manuals.
I've written an app that executes a restore command when they click a button. I want to make the app wait until the restore is done before returning a "It's done" message.
My problem is that I don't knwo how to determine if a database is in ready mode or still restoring.
I've found master..sysdatabases and it has a "status" column, but I don't know how to find the meaning of the number in this column, or if it's relevant.
Is there a stored proc that can be called to return database statuses? If not, can I join sysdatabases somewhere to get the status?
Monkeylizard
Sometimes just a few hours of trial and error debugging can save minutes of reading manuals.