Home All Groups Group Topic Archive Search About
Author
6 Jan 2006 7:59 PM
GB
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

Author
6 Jan 2006 8:16 PM
Aaron Bertrand [SQL Server MVP]
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;




"GB" <v7v***@hotmail.com> wrote in message
news:y_zvf.57264$OU5.43252@clgrps13...
Show quote
> 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
>
>
Author
6 Jan 2006 8:16 PM
Aaron Bertrand [SQL Server MVP]
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;




"GB" <v7v***@hotmail.com> wrote in message
news:y_zvf.57264$OU5.43252@clgrps13...
Show quote
> 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
>
>
Author
6 Jan 2006 8:20 PM
kevin
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

Show quote
"GB" wrote:

> 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