sql server 2005导出数据

*/

EXEC sp_configure 'show advanced options', 1

GO

*/     配置选项 'show advanced options' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。

RECONFIGURE

GO */

EXEC sp_configure 'xp_cmdshell', 1

GO */                  配置选项 'xp_cmdshell' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。

RECONFIGURE 

GO

EXEC default_ezt_db..xp_cmdshell 'bcp " select TS_NAME,TS_DESCRIPTION from default_ezt_db.td.TEST " queryout D:\test.txt -c -T -S"db-server" '

最后在执行上句。

posted on 2014-02-20 18:37  叶子的分享  阅读(456)  评论(0编辑  收藏  举报