January 7, 2002 at 3:23 pm
Is there a way to link to more than one database through linked servers?
Rob DeMotsis
Sr. SQL Server DBA
Pier 1 Imports, Inc.
Rob DeMotsis
Sr. SQL Server DBA
January 7, 2002 at 4:06 pm
January 7, 2002 at 4:20 pm
Your right. I could just create a linked server using the other data source option and name it the database I want to link to.
Rob DeMotsis
Sr. SQL Server DBA
Pier 1 Imports, Inc.
Rob DeMotsis
Sr. SQL Server DBA
January 7, 2002 at 4:30 pm
When I have worked with Linked Servers, I found creating a linked server against a database and linking it to a specific login (such as one that had limited access for read only or execute on some stored procedures) made it much easier to implement another linked server for another requested use against other tables/procedures. Just a different twist on using them.
Jody
January 7, 2002 at 4:34 pm
That is exactly what we do here as well. It works out when trying to keep everything organized.
Rob DeMotsis
Sr. SQL Server DBA
Pier 1 Imports, Inc.
Rob DeMotsis
Sr. SQL Server DBA
January 7, 2002 at 4:58 pm
If you link to another SQL Server, use the proper four part naming convention (including owner) to hit multiple databases on the same server... provided the login account being used has permissions. For instance:
SELECT *
FROM MyServer.Northwind.dbo.Customers
SELECT *
FROM MyServer.pubs.dbo.Authors
will work for a single linked server MyServer.
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply