SQL Server 2008 linked server connection string setup -


i'm trying setup linked server instance of sql server installed on same windows server. in sql server management console have both instances added , i'm trying insert 1 database another. setup linked server using query below , i'm getting following failure message when test connection of the linked server. can me solve problem?

use master go -- use named parameters: exec sp_addlinkedserver     @server = 'server name',  --actual server name    @srvproduct = '',    @provider = 'msdasql',    @provstr = 'driver={sql server};server=database name;uid=test_user;pwd=test_pwd;' go 

error message

cannot initialize data source object of ole db provider "msdasql" linked server "server name".
ole db provider "msdasql" linked server "server name" returned message "[microsoft] [odbc sql server driver][dbnetlib]connectionopen (connect()).".
ole db provider "msdasql" linked server "server name" returned message "[microsoft][odbc sql server driver][dbnetlib]sql server not exist or access denied.". (.net sqlclient data provider)

exec sp_addlinkedserver @server='servername'; exec sp_addlinkedsrvlogin @rmtsrvname='servername',@useself=false, @rmtuser='sa',        @rmtpassword='password'; 

if sql server named instance servername\instancename


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -