Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sp_addlinkedserver -- sql server 2000 -- problem

2 views
Skip to first unread message

Rich

unread,
Jan 8, 2010, 12:19:01 PM1/8/10
to
I am trying to link a sql server to another sql server using
sp_addlinkedserver. Here is what I am doing but no luck:

First I add myself as an sa in the remote server userID='joe' pwd='abc'

then I do this in master of the primary server

EXEC sp_addlinkedserver
@server = 'svrRemote',
@srvproduct = '',
@provider = 'SQLOLEDB',
@provstr = 'DRIVER={SQL Server};SERVER=serverDEF;UID=joe;PWD=abc;'

after running this sp I can see svrRemote in the LinkedServer section of
Enterprise Manager. But when I try to open it - I get the message "server
doesn't exist or access denied".

So I run


sp_addlinkedsrvlogin 'svrRemote'

but still nothing. What do I need to do to create this linked server?

Thanks

Rich

Rich

unread,
Jan 8, 2010, 4:03:06 PM1/8/10
to
I solved my problem. I was misspelling the remoter servername. Here is what
I did:


EXEC sp_addlinkedserver 'myRemoteServer' --spelled correctly

then

exec sp_addlinkedsrvlogin 'myremoteServer,'false',NULL,'joe','abc'


now I can read data on the linked server from the primary server as follows

--from primary server

select count(*) from myremoteServer.DBonRemoteServer.dbo.tbl1

returns a count of rows

0 new messages