Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to connect using sp_addlinkedserver
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01183230
Message ID:
01183286
Views:
23
Thre's nothing similar between 2 error messages. The latest one clearly stated that login failed. Are you sure that you provide correct login info? Didi you try to create connection using ODBC manager to test it?

>changed it to 'MSDASQL' and getting a similar error:
>
>Server: Msg 7399, Level 16, State 1, Line 2
>OLE DB provider 'MSDASQL' reported an error. Authentication failed.
>[OLE/DB provider returned message: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.]
>OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80040e4d:  Authentication failed.].
>
>
>>Your @provstr is incorrect. It's for SQL ODBC driver not OLE DB provider.
>>
>>>I'm using QA and connected to a local SQL server as sa to create this procedure
>>>
>>>
>>>sp_dropserver 'mss'
>>>go
>>>
>>>sp_addlinkedserver
>>>@server 		= 'mss',
>>>@srvproduct = 'SQLOLEDB',
>>>@provider 	= 'SQLOLEDB',	
>>>@provstr 	= 'DRIVER={SQL Server};SERVER=10.0.0.2;UID=MyID;PWD=MyPWD'
>>>
>>>go
>>>
>>>select *
>>>	from openquery(jef, 'SELECT * FROM mss..LocFL')
>>>	
>>>go
>>>
>>>I'm trying to connect to a remote server using a different UID & PWD
>>>I'm getting this error message:
>>>
>>>Server: Msg 18456, Level 14, State 1, Line 2
>>>Login failed for user 'sa'.
>>>[OLE/DB provider returned message: Invalid connection string attribute]
>>>
>>>
>>>how can I connect to the remote server using UID & PWD provided in @provstr?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform