BCP works fine but dosen't work

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??
Jan MishkinIT ManagerAsked:
Who is Participating?
 
Jan MishkinIT ManagerAuthor Commented:
I needed an -S[ServernaME] TAG
0
 
GMGeniusCommented:
I think your problem is the file path
Try a drive and folder not on C:\ root
0
 
robertg34Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.