Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Connect Two Different databases on two Different Data server Locations Expand / Collapse
Posted Thursday, April 18, 2013 11:22 PM


Group: General Forum Members
Last Login: Thursday, May 1, 2014 10:43 PM
Points: 19, Visits: 28
Hi Friends,

i had a requirement , which leads to work on two database on two different data servers. Now my Problem is how to connect one database to another database.

i have to access the other database procedures and other operation like CRUD .

Please give me some examples or Idea to approach

Thanks in Advance
Post #1444233
Posted Friday, April 19, 2013 12:54 AM

Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 12:31 AM
Points: 3,995, Visits: 4,187

Firstly, you need to link the servers, after that it is fairly straight forwards:-

select * from database.schema.table1
inner join server.database.schema.table2
on . . . . . .

You only need to specify the server for the linked server - the above, very rough example means that table1 is on the local server

Hope this helps

Posting Data Etiquette - Jeff Moden
Smart way to ask a question

There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
Post #1444243
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse