When creating a T-SQL step in a SQL Server Agent job, is there a way to pull from a database on a different server? For example, I'd like to query different database job histories across all of the various servers. Possible?
|
feedback
|
|
Besides running queries via linked servers there is also the whole 'multiserver' concept in SQL Agent. See: You should also look into Centralised Managed Servers in SSMS: | |||
|
feedback
|
|
You can only access an external server if it is a linked server in the server that you are running the query from. After adding the server as a linked server access objects on that server with the full name -- [servername].[database].[dbo].[object]. | |||
|
feedback
|
|
You can issue queries against linked servers with the If you'd rather do it without a linked server, with an ad-hoc connection (specifying the connect string in the function call), use | |||
|
feedback
|