日期:2014-05-18 浏览次数:20523 次
bcp {[[database_name.][owner].]{table_name | view_name} | "query"}
{in | out | queryout | format} data_file
[-m max_errors] [-f format_file] [-e err_file]
[-F first_row] [-L last_row] [-b batch_size]
[-n] [-c] [-w] [-N] [-V (60 | 65 | 70)] [-6]
[-q] [-C code_page] [-t field_term] [-r row_term]
[-i input_file] [-o output_file] [-a packet_size]
[-S server_name[\instance_name]] [-U login_id] [-P password]
[-T] [-v] [-R] [-k] [-E] [-h "hint [,...n]"]
------解决方案--------------------
exec master..xp_cmdshell 'bcp dbname..tablename out c:\d.txt -c -S. -Usa -P'
------解决方案--------------------
不c 就w
------解决方案--------------------
exec master..xp_cmdshell 'bcp test..tb out c:\d.txt -c -S. -T'
/*
output
-------------------------------
NULL
开始复制...
NULL
已复制 57 行。
网络数据包大小(字节): 4096
总时钟时间(毫秒) : 62 平均值: (每秒 919.35 行。)
NULL
(7 行受影响)
*/
--在我这没什么问题.我的数据库:
/*
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
*/