January 10, 2017 at 2:18 am
Hi NG.
I want to start a query over my MSDB databases, whitch are locatetd on two differend SQL servers instances. The instances are a member of a 2012 High Availabilty Group. Ther MSDB Databases are not. The purpose of this query is to find differnt jobs in the MSDB databases. Does anybody know how does this work?
I tried, this for example:
SELECT [name], [description] , job_id
FROM [FirstServer\Instance1].msdb.dbo.sysjobs as A
left join
[SecondServer\Instance1].msdb.dbo.sysjobs as B
on
a.name = b.name
where a.description <> b.description
This did not work. I get the message, no entries are found in sys.servers database.
Regards
alphanew
By the way I don't want to establish a linked server connection
January 10, 2017 at 2:25 am
4-part naming requires a linked server, the first part being the linked server name.
Without linked servers, you're not going to be able to directly query another server from this one.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 10, 2017 at 2:40 am
Hi Gail.
Thank you for answering. Unfortunately I have to make it with a linked server, that are bad news for me.
Regards alpanew
January 10, 2017 at 10:24 am
In old-style SQL, outside of HAG, you could use OPENROWSET to reach a remote server without having to create a linked server. That may or may not work in your specific current situation.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply