Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Unable to access the Linked Server


Unable to access the Linked Server

Author
Message
MuraliKrishnan1980
MuraliKrishnan1980
SSC-Enthusiastic
SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)

Group: General Forum Members
Points: 121 Visits: 1409
Hi Friends,
I have been trying to create a Linked Server from my machine for the last few days and I am not able to do so successfully. My Machine is having SQL Server 2008 R2 Dev Edition and the machine that i am trying to connect is SQL Server 2008 Express Edition.

I have enabled the Named Pipes and TCP/IP in the Express Edition Machine. Please find below the code that I am using to create the linked server.

EXEC master.dbo.sp_addlinkedserver @server = N'PC068751\SQLEXPRESS', @srvproduct=N'',@datasrc = N'PC068751\SQLEXPRESS',@provider='SQLNCLI'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'PC068751\SQLEXPRESS',@useself=N'False',@rmtuser='****',@rmtpassword='******'



I have masked the username and password for security purpose.

However I am getting an error while trying to test the connection or access the server using OPENROWSET. I have read numerous articles. However I am unable to resolve the issue. Your help would be appreciated..

SQL Surfer '66
SQL Surfer '66
Say Hey Kid
Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)Say Hey Kid (712 reputation)

Group: General Forum Members
Points: 712 Visits: 328
Is the linked server using the default port 1433? Otherwise you need to specify the port: @server = N'PC068751\SQLEXPRESS,<port>'
MuraliKrishnan1980
MuraliKrishnan1980
SSC-Enthusiastic
SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)

Group: General Forum Members
Points: 121 Visits: 1409
SQL Surfer '66 (9/5/2012)
Is the linked server using the default port 1433? Otherwise you need to specify the port: @server = N'PC068751\SQLEXPRESS,<port>'


Do i need to specify the port number in the @Server or @datasrc
spaghettidba
spaghettidba
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5730 Visits: 13305
First thing to check: from the SQL Server, can you connect to the SQLExpress instance (with SSMS or SQLCMD)?
If not, there's no need to involve the linked server in your troubleshooting.

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
spaghettidba
spaghettidba
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5730 Visits: 13305
SQL Surfer '66 (9/5/2012)
Is the linked server using the default port 1433? Otherwise you need to specify the port: @server = N'PC068751\SQLEXPRESS,<port>'


True only if the port is static, which is not by default.

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
spaghettidba
spaghettidba
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5730 Visits: 13305
MuraliKrishnan1980 (9/5/2012)
SQL Surfer '66 (9/5/2012)
Is the linked server using the default port 1433? Otherwise you need to specify the port: @server = N'PC068751\SQLEXPRESS,<port>'


Do i need to specify the port number in the @Server or @datasrc


You'd better use an alias in the configuration manager and keep the linked server simple.

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
MuraliKrishnan1980
MuraliKrishnan1980
SSC-Enthusiastic
SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)SSC-Enthusiastic (121 reputation)

Group: General Forum Members
Points: 121 Visits: 1409
First thing to check: from the SQL Server, can you connect to the SQLExpress instance (with SSMS or SQLCMD)?
If not, there's no need to involve the linked server in your troubleshooting.


Hi,

I would go ahead and create an alias for the sql express instance. I enabled the remote connection, TCP/IP and Named Pipe in the Express machine and I am able to view the server name of the machine in the Netwerk Servers list while trying to connect to the Database Engine from SSMS. However, I am unable to connect to the same.

What could be the problem? Can someone provide me the steps to connect to an express instance from a Developer Instance..
spaghettidba
spaghettidba
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5730 Visits: 13305
Some things to check:

1) Remote connections enabled and service restarted on the Express instance (according to your reply, this should be ok)
2) TCP/IP enabled with a static port on the Express instance
3) Native Client alias created on the Dev instance machine, pointing to the host/port of the Express instance
4) Network traffic enabled in your firewall

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search