Wednesday, March 28, 2012

linked server problem

I am facing this problem for partitioned views in sql server.

First I use the sp_addlinedserver command to add a server instance S2 into S1 and vice-versa on machine M

then I create two tables T1 and T2 in S1 and S2

When I issue the command on lets say S1 to create a view from
S1.pubs.dbo.T1 and S2.pubs.dbo.T2, it doesn't

Message says Server does not exist or access denied

If I try to include machine name as M\S1.pubs.dbo.T1 it says a syntax error at \.

Could not find any online help as well. Kindly helpTwo tips:

Your syntax for machine name should be:
[ServerName].[Database].[Owner].[ObjectName]

or

M.S1.dbo.T1

As for the linked server, you probably need to also run sp_addlinkedsrvlogin after sp_addlinkedserver to set up the proper security context to the linked server.

-b

No comments:

Post a Comment