June 20, 2014 at 8:14 am
Hi Guys,
Any workaround for this error while trying to run openrowset query from server and from my local machine SSMS.
Server - SQL 2008R2 Ent 64 bit and it is clustered server .
My account has sysadmin rights.
Query
select * from openrowset('SQLNCLI','Server=(local);Trusted_Connection=yes;','exec dbo.sp_who') AS a
Go
select * from openrowset('SQLNCLI','Server=(server\Instance);Trusted_Connection=yes;','exec dbo.sp_who') AS a
Go
From Local Server Error
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 2, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [2].
From Local SSMS to Server
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 65535, Level 16, State 1, Line 0
SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF].
Any solution?
thank you
June 20, 2014 at 10:25 pm
You need to remove the parenthesis from (server\instance) in the following example...
select * from openrowset('SQLNCLI','Server=(server\Instance);Trusted_Connection=yes;','exec dbo.sp_who') AS a
Of course, you also need to sub the correct names for server\instance.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply