question

DANDaniel avatar image
DANDaniel asked

Recovery Model Options

Good Afternoon, I was wondering if anyone new of way to grab the recovery model from multiple database across multiple servers. This query doesnt seem to work for me. select [name], DATABASEPROPERTYEX([name],'recovery') FROM OpenDataSource ( 'SQLOLEDB', 'DataSource = SERVERA\SQL1;UserID=myUserID;Password=myPassword' )sysdatabases
recovery-mode
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
KenJ avatar image
KenJ answered
Does it need to run from SSMS? If so, a multi-server query comes right to mind from the registered servers pane. You can also run a multi-server query from a Central Management Server. If you can use one of these approaches, then something simple like `SELECT @@ServerName as server_name, name as database_name, recovery_model_desc from sys.databases` should do the trick. If you need to use the OpenDataSource query, could you post the error? "doesn't seem to work for me" is a little vague.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.