December 1, 2003 at 2:11 pm
I am trying to get a report of recovery modes of all dbs on our database servers.
On the local server I can do the following and it works fine.
SELECT databasepropertyex ('master', 'Recovery')
However, I would like to get this for all our servers, and the following
query
select remserver.master.dbo.databasepropertyex ('master', 'Recovery')
fails with the message
The object name 'remserver.master.dbo.' contains more than the maximum number
of prefixes. The maximum is 2.
I would like to not to have to create any procedures on each server (we have plentyof servers)
Any way I can read the recovery mode remotely?
thanks.
December 1, 2003 at 2:21 pm
Build a DTS pacakge and roll everything up into one server.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
December 1, 2003 at 2:26 pm
You can execute something like this:
DECLARE @query AS NVARCHAR(300)
SELECT @query = 'SELECT databasepropertyex ('+''''+'master'+''''+', '+''''+'Recovery'+''''+')'
EXEC [ServerName].master.dbo.sp_executesql @statement = @query
I also have many servers across my country, But fore me it is better to create a batch file wich executes OSQL and I pass parameters like the query or a file containing a query, and the output file to view all the results.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply