怎样让SQL-Server定期备份某一张数据库表?

来源:百度知道 编辑:UC知道 时间:2024/05/09 14:26:07
在SQL Server Management Studio工具中我应该怎样设置?

1、先练习怎么在命令行用 bcp 导出那个表的数据;
2、写一个存储过程 usp_callCmd,在其内用 xp_cmdshell 调步骤 1 写的命令;
3、如果是 Enterprise Edition, 在 SQL Agent Service 中创建一个 job 来定期执行步骤 2 的 usp_callCmd;
4、如果是 Express Edition,在 OS 中写一个 scheduledBkp.bat,在其内用 oisql 执行步骤 2 的 usp_callCmd,再设置计划任务定期执行 scheduledBkp.bat;
5、Done.