Solved

bcp copy

Posted on 2007-11-13
3
911 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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.

829 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