March 14, 2011 at 8:16 am
I have created a powershell script to loop through a file of servernames listing each database and whether or not that it is online or not. However, my question is, what SMO property do I reference, "State" or "Status?" I have looked through the object model of SMO for Powershell but it is not really plain or clear which one to reference. My goal is to list the database name and then a status of whether the database is "online/offline."
Hope this makes sense.
March 18, 2011 at 10:29 am
I have discovered the answer to my own question. In looking back at what I found and asking that question I feel rather stupid. Thank you to all that at least had a look at my question.
April 5, 2011 at 9:56 am
I don't know what your needs are, but have you considered querying the instance for the list of DBs and then traversing through the result set to see which ones are open? It would eliminate the possibility of the file with DB names being out of date.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply