February 18, 2008 at 3:22 pm
Is it all possible to query any system table/dmv to determine if a database is in a transition status?
Thanks
February 18, 2008 at 6:26 pm
What do you mean by transition?
The status of a database can be gained from DATABASEPROPERTYEX:
[font="Courier New"]select name, databasepropertyex(name, 'Status')
from master.sys.databases
[/font]
This will return one of: ONLINE, OFFLINE, RESTORING, RECOVERING, SUSPECT, EMERGENCY
for each database in an instance.
MARCUS. Why dost thou laugh? It fits not with this hour.
TITUS. Why, I have not another tear to shed;
--Titus Andronicus, William Shakespeare
February 19, 2008 at 12:35 am
you can also refer (Scott's quer is part of sp_helpdb)
sp_helpdb
See the status of the database.
I think Scott's query is more close to your requirement.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
February 19, 2008 at 6:19 am
Yeah I went to databasepropertyex right away as well, but the status reported was online.
Basically, I attempted to take a database offline that still had active connections, during this time, If I attempted to query the database, I received the message that the database is in transition.
I need to figure out how to query for this status.
Thanks
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply