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:
01183232
Views:
28
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