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??
Microsoft SQL Server 2005Microsoft SQL Server 2008
Last Comment
Jan Mishkin
8/22/2022 - Mon
GMGenius
I think your problem is the file path
Try a drive and folder not on C:\ root
robertg34
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.
Try a drive and folder not on C:\ root