Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Do I need a linked server if both databases reside within the same SQL Named Instance? Expand / Collapse
Author
Message
Posted Wednesday, January 23, 2013 1:31 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:33 AM
Points: 307, Visits: 1,846
DatabaseA needs to be able to retrieve data from DatabaseB on a periodic basis. Both databases reside on the same instance (SERVER\INSTANCE).
Post #1410394
Posted Wednesday, January 23, 2013 1:33 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
If they exist on the same instance no, use cross database queries

Like the following.

INSERT INTO DatabaseA.dbo.Mytable SELECT Col1, Col2 FROM DatabaseB.dbo.MyTable

If the database was on a different server, then yes a linked server would be needed.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1410396
Posted Wednesday, January 23, 2013 1:46 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:33 AM
Points: 307, Visits: 1,846
Cheers Anthony! Exactly what I was after... many thanks.
Post #1410403
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse