Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Named Pipes Provider: Could not open a connection

Author  Topic 

cms9651
Starting Member

28 Posts

Posted - 2014-02-20 : 08:36:53
Hi guys, I need your help.

I've this query for export the resultset in txt file:


EXEC master.dbo.sp_configure 'show advanced options',
1 RECONFIGURE EXEC master.dbo.sp_configure 'xp_cmdshell',
1 RECONFIGURE EXEC xp_cmdshell 'bcp "SELECT * FROM [MYdb].[dbo].[TB40] WHERE LEFT (ZZ, 2) IN (''Is'', '''MS', ''OS'', ''SM'') AND YEAR (MAX([theDate])) >= YEAR (GETDATE());" queryout "c:\output\123.txt" -T -c -t;'

but the error is :

SQLState = 08001, NativeError = 2
Error = [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [2].
SQLState = 08001, NativeError = 2
Error = [Microsoft][SQL Server Native Client 10.0]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 config
ured to allow remote connections. For more information see SQL Server Books Online.
SQLState = S1T00, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Login timeout expired

can you help me?
thank you in advance

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2014-02-22 : 02:03:19
Is SQL Server running? Is TCPIP enabled?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -