Groups | Blog | Home
all groups > sql server programming > january 2006 >

sql server programming : Link Server settings



kevin
1/6/2006 12:20:02 PM
What you see in Enterprise Manager is simply the default database for the
account that you are using to authenticate to the linked server. Changed the
default database for that user, and refresh and you will see another
databases tables.

You will still be able to access all databases to which that user has access.

kevin

[quoted text, click to view]
Aaron Bertrand [SQL Server MVP]
1/6/2006 3:16:24 PM
You could change the default database for the user the linked server is
configured to use, using sp_defaultdb on the remote server.

Or, use the USE statement or proper 4-part naming to qualify the database
name you are accessing from the local server. e.g. you should not be saying
this:

SELECT <col_list> FROM LinkedServer...TableName;

You should be saying:

SELECT <col_list> FROM LinkedServer.DatabaseName.dbo.TableName;




[quoted text, click to view]

Aaron Bertrand [SQL Server MVP]
1/6/2006 3:16:24 PM
You could change the default database for the user the linked server is
configured to use, using sp_defaultdb on the remote server.

Or, use the USE statement or proper 4-part naming to qualify the database
name you are accessing from the local server. e.g. you should not be saying
this:

SELECT <col_list> FROM LinkedServer...TableName;

You should be saying:

SELECT <col_list> FROM LinkedServer.DatabaseName.dbo.TableName;




[quoted text, click to view]

GB
1/6/2006 7:59:26 PM
Hello:
I am trying to create linked server ( another SQL Server) to my SQL Server,
using Enterprise Manager, but new alias pointed me only to master database.
How can I change settings of the link server to get access to pubs database?

Thanks,
GB

AddThis Social Bookmark Button