April 3, 2007 at 2:48 pm
What is the best way to find out whether database is readonly state or read write state? My requirement is to from a central sql box connect to all linked servers and get a list of databases that are in read only state.
Is there anyway to know this without using sp_dboption on each database? Like from the master database ? Sysdatabases table status column have the bit value combined for the settings. Is there any other possibility to acheive this.
Thanks...
April 3, 2007 at 3:15 pm
This should do it.
select ReadOnly = databaseproperty(a.name ,'IsReadOnly'), a.name from master.dbo.sysdatabases a order by a.name
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy