April 23, 2010 at 11:11 pm
1. Can you please suggest me a suitable query to find out whether any database is in "offline" status in the SQL Server?
2. I need a generic query to find out any database object(tables,SP,Triggers) either located in any of the databases in the SQL Server rather than searching only in a single database.
Thanks.
April 24, 2010 at 7:42 am
Sourav-657741 (4/23/2010)
1. Can you please suggest me a suitable query to find out whether any database is in "offline" status in the SQL Server?
the following will work for sql2005 on
select name, state from sys.databases
where state = 6
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
April 24, 2010 at 12:00 pm
for second question--
Search object across all databases in instance--
http://www.sqlservercentral.com/Contributions/Edit/31650
April 24, 2010 at 4:44 pm
select name from sys.databases where state_desc = 'offline'
or you can use databasepropertyex or even databaseproperty (pre 2005)
---------------------------------------------------------------------
April 25, 2010 at 10:36 am
for second question--
Search object across all databases in instance--
http://www.sqlservercentral.com/Contributions/Edit/31650
----------------------------------------------------------
The above link is not opening!!
Thanks.
April 26, 2010 at 3:40 pm
There were plenty of postings about object search:
http://www.sqlservercentral.com/search/?q=search+objects+for+text&t=s
I also use SQL Search - still free from RedGate:
http://www.red-gate.com/products/SQL_Search/index.htm
--Vadim.
--Vadim R.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply