Solved

bcp is not a recognized as an external/internal command or operable program or batch file

Posted on 2010-11-29
5
2,923 Views
Last Modified: 2012-08-13
Its a continuation of the question I asked here.

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_26645714.html#a34234293

after this I created the objects running another sql script.

Now I am trying to bulk load the data into the tables using the following program. But I ran into this error:

"bcp is not a recognized as an external/internal command or operable program or batch file"

the data files  and the batch file are in this location:
C:\owbcode\ACME_POS_Data_Load_Script_Files

I navigated to the above directory in the command prompt and executed the batch file acme_pos_bulk_load_data.

Here is the content of the batch file in the code snippet.

please advice how to over come this problem

many thanks..

bcp ACME_POS.dbo.Employees in Employees.dat -f Employees-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.Items in Items.dat -f Items-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.Regions in Regions.dat -f Regions-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.Registers in Registers.dat -f Registers-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.Stores in Stores.dat -f Stores-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.Vendors in Vendors.dat -f Vendors-n..xml -T -S VirtualXP\SQLExpress
bcp ACME_POS.dbo.POS_Transactions in POS_Transactions.dat -f POS_Transactions-n..xml -T -S VirtualXP\SQLExpress

Open in new window

0
Comment
Question by:gs79
  • 3
  • 2
5 Comments
 

Author Comment

by:gs79
ID: 34235077
btw I am using sql server 2005 express on xp 32 bit
0
 
LVL 7

Expert Comment

by:FOTC
ID: 34235088
you need to run the command from wherever the bcp tool is located at. if you drop the bcp or a copy of it (named bcp.exe) to the system32 directory you should be able to run it w/ no problems.
0
 
LVL 7

Accepted Solution

by:
FOTC earned 500 total points
ID: 34235098
looks like the default location is c:\program files\Microsoft SQL Server\100\Tools\Bin

navigate to there in the cmd window then try running it.
0
 

Author Comment

by:gs79
ID: 34235211
FOTC -

Awesome, I coped all the dat files and batch file to the default location as mentioned in the above thread and executed by navigating to directory in cmd window..

It worked great and loaded all the data.

Copying the bcp tool to system32 folder and executing by navigating to the files in the original directory (C:]owbcode\...) did NOT work..

Thanks
GS
0
 
LVL 7

Expert Comment

by:FOTC
ID: 34235232
excellent! glad i could assist! happy copying! =)
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DTS Connection Failed 7 66
Access denied running PowerPivot -SQL Server 2014 on Windows Server 2012 10 28
VBScript Write Column Headers 3 31
T-SQL: "HAVING CASE" Clause 1 23
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

815 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

12 Experts available now in Live!

Get 1:1 Help Now