Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The key is that both instances are running simulataneously and I just don't want to go through the harrowing experience of having to create all these stoprocs that I've authored on the instance that needs to use them.

My guess would be that there's a way in T-SQL to make sure I'm targetting the "remote" [there] instance when I'm executing with the

USE [here].[dbo].[...]

local expression.

What's the form of the pre-USE, so to speak?

[Edit]

Like "USE [(leftarrow)servername(rightarrow)\

(leftarrow)instancename(rightarrow)].[here].[dbo].[allthosestoredprocedures]" ...

[End Edit]
Posted
Updated 4-Nov-11 7:06am
v4
Comments
RedDk 14-Dec-11 13:00pm    
redaction (oh yes they are ...)

1 solution

You can connect to the other instance by creating a linked server. see here :
http://www.quackit.com/sql_server/sql_server_2008/tutorial/linked_servers.cfm[^]

You will have to create all your SP's on your here instance as well as calling the SP on the linked server will change data on that server instance not on the here one.
 
Share this answer
 
Comments
RedDk 4-Nov-11 13:22pm    
Well,

The trouble is that the SQL Server instance is also an SQLClient10.0 server. From the first couple of lines in the help file for ssmse I can see that there's a prospective solution like yours if you're dealing with OLE DB data sources. Not for a bonafide SQL Native.
RedDk 4-Nov-11 13:25pm    
Improvement on that locus:

ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_4deptrbl/html/6ef578bf-8da7-46e0-88b5-e310fc908bb0.htm

I see that I'm confused here, on OLE DB pass through, but the errors are specifically about "SQLNCLI10". What's the THAT option doing in the drop-down if that's not OLEDB too?
RedDk 4-Nov-11 13:38pm    
Also can't leave "Product name" blank as in the quackit link
Amir Mahfoozi 4-Nov-11 14:19pm    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900