?
Solved

bcp copy

Posted on 2007-11-13
3
Medium Priority
?
917 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 2000 total points
ID: 20277588
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-
ID: 20277811
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-
ID: 20278060
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

850 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