how to check if a database is online and also Ready to query  
Author Message
Por





PostPosted: Mon Jul 02 21:49:40 CDT 2007 Top

SQL Server Developer >> how to check if a database is online and also Ready to query

Hi,
I am asking this question again, I need to determine if a database is online
(which is easy from sys.databases) and ready to query.
I need to run such check on several databases on several servers.
Any ideas?

thanks

SQL Server291  
 
 
M





PostPosted: Mon Jul 02 21:49:40 CDT 2007 Top

SQL Server Developer >> how to check if a database is online and also Ready to query
> Hi,
> I am asking this question again, I need to determine if a database is online
> (which is easy from sys.databases) and ready to query.
> I need to run such check on several databases on several servers.
> Any ideas?
>
> thanks

I think you need to check state column in sys.master_files

 
 
Uri





PostPosted: Mon Jul 02 23:26:47 CDT 2007 Top

SQL Server Developer >> how to check if a database is online and also Ready to query Hi
select DATABASEPROPERTYEX( dbname, Status)







> Hi,
> I am asking this question again, I need to determine if a database is
> online (which is easy from sys.databases) and ready to query.
> I need to run such check on several databases on several servers.
> Any ideas?
>
> thanks
>
>