Solved

bcp copy

Posted on 2007-11-13
3
908 Views
Last Modified: 2008-02-01
I am running SQL Server Management Studio Express 2005.  I am trying to bulk copy the contents of a csv file into a table.  I've opened the command winow and typed in the following:

bcp "Public_data.dbo" in "c:\customer_service_reportcard.csv" -c -q -U"xxxxxx" -P"xxxxxxx"

I get the following error:
SQLState = 08001. NativeError = 2
Error = [Microsoft][SQL Native Client] Named Pipes Provider: Could not open a connection to SQL Server [2]
SQLState = HYT00. NativeError = 0
Error = [Microsoft][SQL Native Client] Login timeout expired
SQLState = 08001. NativeError = 2
Error = [Microsoft][SQL Native Client] An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

SQLServer Management Studio Express is installed on my local PC for development.  Does bcp work with Express?

Any help is appreciated.
0
Comment
Question by:-Dman100-
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 500 total points
Comment Utility
Hi,

>>Does bcp work with Express?

Not sure, but generally it doesnt allow remote connections. You will need to enable this.

HTH
  David
0
 

Author Comment

by:-Dman100-
Comment Utility
I checked the server properties and "allow remote connections to this server" is checked.  Are there any other settings I need to check?

Thanks.
0
 

Author Comment

by:-Dman100-
Comment Utility
I finally figured it out...for those that come across a similar issue with Express.  You have to specify the server:

bcp DatabaseName.dbo.TableName in c:\filename.csv -c -q -S ServerName\SQLExpress -U xxxxxxx -P xxxxxx -t \t -r \n
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now