Sp_addlinkedsrvlogin

Sep 28, 2000

Does anyone know how to make a query run successfully against a linked server using sp_addlinkedsrvlogin? I'm trying to do this in Query Analyzer.

I received two different error messages while trying to make this work. They are listed after the example below:

EXAMPLE:

sp_addlinkedsrvlogin SERVER2, FALSE, null, shane, shane

select * from SERVER2.Accounting..orders

----------------------------------------------------------------
Errors:

#1.Login failed for user 'shane'.
#2.Server: Msg 7314, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' does not contain table...

View 1 Replies


ADVERTISEMENT

Need Help Regarding Sp_addlinkedserver && Sp_addlinkedsrvlogin

Jan 10, 2008

Hi,
Iam trying to use database in different server. i have searched for that i got to know there is something called

"sp_addlinkedserver" & "sp_addlinkedsrvlogin " stored procs exist. i have tried using this code block to register server to sys servers.




Code Block
exec sp_addlinkedserver @server='ServerName'
exec sp_addlinkedsrvlogin @rmtsrvname='ServerName', @useself=false, @rmtuser='testUser', @rmtpassword='pwd'



when i login using Domain user it is throwing an error as "Login Failed for the User(Domain user)", but when i use "sa" user it works fine.
Is there any settings which i have to take care while using domain user.
can anyone help on this.

Thanks,
-Badri

View 1 Replies View Related

Why Does Sp_addlinkedsrvlogin Fail Gracefully?

Nov 9, 2007

Running the following does not error, but it does not add the login either! When I try to add the login through EM or Studio it does not error, but when one exits the link's properties window and returns to the link's properties window the login is missing.


exec sp_addlinkedsrvlogin @rmtsrvname = 'myLink'

, @useself = 'false'

, @locallogin = 'mydomainmylogin'
, @rmtuser = 'remoteuser'

, @rmtpassword = 'remotepass'




(0 row(s) affected)

(1 row(s) affected)

(0 row(s) affected)

(1 row(s) affected)


It seems I can add some logins but not others. 'mydomainmylogin' is a sysadmin and is also used to start the sql server service. I can add this on most servers but not on a very few.

What gives?

Thanks,

Michael

View 1 Replies View Related

Sp_addlinkedsrvlogin: There Is No Remote User Xxx Mapped To Local User

Sep 7, 2007

I am creating a linked server to Sybase via ASE OLEDB provider


The following statement


EXEC master.dbo.sp_addlinkedsrvlogin
@rmtsrvname = N'QRY1', @locallogin = NULL ,
@useself = N'False', @rmtuser = N'beg', @rmtpassword = N'4502342'


gets error:


Msg 15466, Level 16, State 2, Procedure sp_addlinkedsrvlogin, Line 91
An error occurred during decryption.
Msg 15185, Level 16, State 1, Procedure sp_addlinkedsrvlogin, Line 98
There is no remote user 'beg' mapped to local user '(null)' from the remote server 'QRY1'.


Did I missed anything?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved