Monday, March 26, 2012

Link Server problem

Hi, there,
I have two SQL Server 2000, which are SQLA -- with SAN connected; SQLB --
just a bald SQL Server.
I want to set up linked server from SQLA , so I can run query like "select *
from SQLB.dbname.dbo.tablename". The command I use is
sp_addlinkedserver @.server = 'SQLB'
After I ran this code, I span the "Linked servers" node of Enterprise
Manager, I saw an image of a linked server named "SQLB". Then I run the
query "select * from SQLB.dbname.dbo.tablename" from Query Analyzer of
SQLA, I got the following errors
Server: Msg 17, Level 16, State 1, Line 1
SQL Server does not exist or access denied.
I'm the system administrator of the two servers, and the account I ran the
query is sys admin account. I don't know why the command failed. I drop the
linked server and readd the linked server again. I got the same result.
Who can help a bit?
Thanks,
JamieHi
If you don't call sp_addlinkedsvrlogin, then you will have a default match
between logins from ServerA to ServerB created by sp_addlinkedserver. Have
you checked that you have access with the current login to serverA on serverB?
You may want to try calling
EXEC sp_addlinkedsrvlogin 'SQLB', 'true'
John
"Jamie" wrote:
> Hi, there,
> I have two SQL Server 2000, which are SQLA -- with SAN connected; SQLB --
> just a bald SQL Server.
> I want to set up linked server from SQLA , so I can run query like "select *
> from SQLB.dbname.dbo.tablename". The command I use is
> sp_addlinkedserver @.server = 'SQLB'
> After I ran this code, I span the "Linked servers" node of Enterprise
> Manager, I saw an image of a linked server named "SQLB". Then I run the
> query "select * from SQLB.dbname.dbo.tablename" from Query Analyzer of
> SQLA, I got the following errors
> Server: Msg 17, Level 16, State 1, Line 1
> SQL Server does not exist or access denied.
> I'm the system administrator of the two servers, and the account I ran the
> query is sys admin account. I don't know why the command failed. I drop the
> linked server and readd the linked server again. I got the same result.
> Who can help a bit?
> Thanks,
> Jamie
>
>|||Thank you John! I just found out the real problem. We have IP Address
problem of SQLB. After it is fixed, I can ran query across servers.
Jamie
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:2BD42FE7-07D4-4C46-9D93-2E01CBC87E8A@.microsoft.com...
> Hi
> If you don't call sp_addlinkedsvrlogin, then you will have a default match
> between logins from ServerA to ServerB created by sp_addlinkedserver. Have
> you checked that you have access with the current login to serverA on
> serverB?
> You may want to try calling
> EXEC sp_addlinkedsrvlogin 'SQLB', 'true'
> John
> "Jamie" wrote:
>> Hi, there,
>> I have two SQL Server 2000, which are SQLA -- with SAN connected; SQLB --
>> just a bald SQL Server.
>> I want to set up linked server from SQLA , so I can run query like
>> "select *
>> from SQLB.dbname.dbo.tablename". The command I use is
>> sp_addlinkedserver @.server = 'SQLB'
>> After I ran this code, I span the "Linked servers" node of Enterprise
>> Manager, I saw an image of a linked server named "SQLB". Then I run the
>> query "select * from SQLB.dbname.dbo.tablename" from Query Analyzer of
>> SQLA, I got the following errors
>> Server: Msg 17, Level 16, State 1, Line 1
>> SQL Server does not exist or access denied.
>> I'm the system administrator of the two servers, and the account I ran
>> the
>> query is sys admin account. I don't know why the command failed. I drop
>> the
>> linked server and readd the linked server again. I got the same result.
>> Who can help a bit?
>> Thanks,
>> Jamie
>>
>>

No comments:

Post a Comment