Solved

BCP works fine but dosen't work

Posted on 2010-09-03
3
401 Views
Last Modified: 2012-06-21
This command runs without error
Exec master..xp_cmdShell 'bcp "select * from MyDB.dbo.ftpinf" queryout C:\test.txt -c -T'

the bcp runs fine. No errors but also no file is created?!!?

heres the result
NULL
Starting copy...
NULL
4 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 1      Average : (4000.00 rows per sec.)
NULL

Any ideas??
0
Comment
Question by:janmishkin
3 Comments
 
LVL 12

Expert Comment

by:GMGenius
ID: 33599176
I think your problem is the file path
Try a drive and folder not on C:\ root
0
 
LVL 5

Expert Comment

by:robertg34
ID: 33604494
Are you running the commands directly on the server or on a client ?  This command will place the output file on the c drive of the sql server, not on the c drive of your client where you are running ssms.  
0
 

Accepted Solution

by:
janmishkin earned 0 total points
ID: 33695305
I needed an -S[ServernaME] TAG
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article I will describe the Detach & Attach 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.

740 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