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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Named Pipes Provider: Could not open a connection
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

28 Posts

Posted - 02/20/2014 :  08:36:53  Show Profile  Reply with Quote
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

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 02/22/2014 :  02:03:19  Show Profile  Visit jackv's Homepage  Reply with Quote
Is SQL Server running? Is TCPIP enabled?

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000