sql server 2005导出数据

时间:2023-03-09 22:05:38
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" '

最后在执行上句。