用BCP命令 导入导出数据
2010-11-15 15:07
253 查看
要使用..xp_cmdshell,首先要打开高级选项,命令如下:
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
--导出
EXEC master..xp_cmdshell 'bcp ksoacc.dbo.lsdtxb out Currency.dat -c -S"wby-pc\yy" -U"sa" -P"1" '
--导入
EXEC master..xp_cmdshell 'bcp ksoacc.dbo.lsdtxb1 int Currency.dat -c -S"wby-pc\yy" -U"sa" -P"1" '
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
--导出
EXEC master..xp_cmdshell 'bcp ksoacc.dbo.lsdtxb out Currency.dat -c -S"wby-pc\yy" -U"sa" -P"1" '
--导入
EXEC master..xp_cmdshell 'bcp ksoacc.dbo.lsdtxb1 int Currency.dat -c -S"wby-pc\yy" -U"sa" -P"1" '
相关文章推荐
- SQL Server中bcp命令的用法以及数据批量导入导出
- 数据库中的数据导入导出汇总一(bulk insert命令,bcp命令)
- BCP命令导入导出数据库数据
- MSSQL中使用命令行BCP命令导入导出数据
- sqlserver bcp(数据导入导出工具)一般用法与命令详解
- BCP命令导入导出数据
- SqlServer 数据的导入导出,使用bcp命令
- MSSQL 的常用命令BCP的用法 导出导入某个表数据
- SQL Server中bcp命令的用法以及数据批量导入导出
- SQL Server中bcp命令的用法以及数据批量导入导出
- sqlserver bcp(数据导入导出工具)一般用法与命令详解
- 数据库BCP命令导入导出数据
- SQL Server BCP命令导入、导出数据
- SQL2005的BCP命令导入导出数据
- sqlserver bcp(数据导入导出工具)一般用法与命令详解
- Oracle数据导入导出imp/exp命令 10g以上expdp/impdp命令
- Oracle数据导入导出imp/exp命令
- SQL Server数据导入导出工具BCP详解
- BCP导入导出数据
- 常用mysql导入导出数据的命令