Wednesday, March 7, 2012

how to get online/offline status

Hi,

i try get information about the online or offline status of a database
within ms-sql srv 2000.

I can look it up within server manager, but I'm looking for a way to get
this information from the command line or a select statement.

Is there a command or a sql statement that tells me the status of a
database ? There's some information in master.dbo.sysdatabases, but it
looks very cryptic.

Any help appreciated, thanks,
stefan"Stefan Behrens" <stefan.news@.gmx.net> wrote in message
news:Xns94DB71E9836ADstefannewsgmxnet@.195.20.224.1 16...
> Hi,
> i try get information about the online or offline status of a database
> within ms-sql srv 2000.
> I can look it up within server manager, but I'm looking for a way to get
> this information from the command line or a select statement.
> Is there a command or a sql statement that tells me the status of a
> database ? There's some information in master.dbo.sysdatabases, but it
> looks very cryptic.
> Any help appreciated, thanks,
> stefan

select databasepropertyex('master', 'status')

Simon

No comments:

Post a Comment