This is the command:
declare @sql varchar(8000)
select @sql = 'bcp DataDiscovery..bcptst1 out
\\maymowk020\bcp\bcptst1.txt -f\\maymowk020\bcp\bcptst1.fmt
-UExtract_USER -[Email Address Removed] master..xp_cmdshell @sql
This is the bcptst1.fmt
8.0
1
1 SQLCHAR 0 100 "\n "1 COACCTNAME SQL_Latin1_General_CP1_C1_AS
This is the Output
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]I/O error while reading BCP
format file
NULL
NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE01)
MS Sql Server LazyDBA home page