每天在sql express 2008 r2备份和恢复数据库 [英] backup and restore database every day at sql express 2008 r2
问题描述
你好,
i需要远程从一个服务器数据库备份和恢复到另一个服务器数据库
1)首先我从原始服务器数据库备份到另一个服务器数据库
2)我必须将anohter服务器数据库恢复到原始服务器数据库
i我正在通过C驱动的任务调度器来做
但是我不想在c盘中做备份。
i想知道如何将备份带到另一个服务器数据库
< blockquote>任务调度程序没有定义备份的位置,你运行的脚本是什么。
从我的问题中收集到的,
- 使用 sqlcmd [ ^ ]实用程序来运行SQL脚本
- 为备份创建一个sqlcmd运行并定义要在任意位置使用的备份
- 如果需要,在脚本中添加一个步骤,将备份从一个位置复制到另一个
- 为备份创建一个sqlcmd运行并定义备份到另一个数据库的恢复
- 使用任务调度程序安排此脚本
有关运行备份和恢复命令的定义,请参阅备份 [ ^ ]和 RESTORE [ ^ ]
对于sqlcmd,请参阅sqlcmd Utility [ ^ ]
hello,
i need to take backup and restore from one server database to another server database remotely
1) first i take backup from original server database to another server database
2) again i have to restore anohter server database to original server database
i am doing by task scheduler for in C drive
but i dont want to do the backup in the c drive.
i want to kw how to take backup into another server database
Task scheduler doesn't define where the backup is taken, the script you run does.
From what I gather from your question,
- use sqlcmd[^] utility to run the SQL scripts
- create one sqlcmd run for the backup and define the backup to be taken where you like
- if necessary add a step in your script where you copy the backup from a location to another
- create one sqlcmd run for the backup and define the restore of the backup to another database
- schedule this script using task scheduler
For defitions for the backup and restore commands to run, please refer to BACKUP[^] and RESTORE[^]
For sqlcmd see sqlcmd Utility[^]
这篇关于每天在sql express 2008 r2备份和恢复数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!