SQL SERVER数据库备份命令:
Backup Database *database_name*
To disk='*X:\folder\databse_name_backupname.bak*'
注 : 此命令无法将数据库备份到网络地址上
使用该命令:
Backup Database *database_name*
To disk='*\\xxx.xxx.xxx.xxx\folder\databse_name_backupname.bak*'
会出现如下错误提示:
注:即使将网络地址映射为驱动器也是不行的:
Backup Database *database_name*
To disk='*Z:\databse_name_backupname.bak*'
Backup Database *database_name*
To disk='X:\folder\database_name_diff_backupname.bak'
with Differential
注:前提是X:\folder存在
成功:
3. 镜像备份
说明:mirror1和mirror2两个备份都是一样的
Backup Database database_name
To disk='X:\folder\database_name_mirror1.backupname.bak'
Mirror
To disk='X:\folder\database_name_mirror2.backupname.bak'
with Format
注:如果没有with Format,则会提示错误,并给出错误消息
To disk='\\xxx.xxx.xxx.xxx\folder\database_name_mirror.backupname.bak'
with Format
4. 镜像备份到本地和远程
5. 每天生成一个备份文件
6.