SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Named Pipes Provider: Could not open a connection
 New Topic  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
2139 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  
 New 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.05 seconds. Powered By: Snitz Forums 2000