当前位置: 数据库>sqlserver
设置密码保护的SqlServer数据库备份文件与恢复文件的方法
来源: 互联网 发布时间:2014-10-04
本文导语: 设置密码保护SqlServer数据库备份文件! 备份SqlServer数据库 Backup Database [数据库] To disk='c:mysql'+ replace(replace(replace(replace(CONVERT(varchar, getdate(), 121),'-',''),' ',''),':',''),'.','') +'.bak' With Password = '123',init; 恢复SqlServer数据库 Restore Databas...
设置密码保护SqlServer数据库备份文件!
备份SqlServer数据库
Backup Database [数据库] To disk='c:mysql'+ replace(replace(replace(replace(CONVERT(varchar, getdate(), 121),'-',''),' ',''),':',''),'.','') +'.bak' With Password = '123',init;
恢复SqlServer数据库
Restore Database [数据库] From disk=数据库备份文件地址 With Password = '123';
备份SqlServer数据库
Backup Database [数据库] To disk='c:mysql'+ replace(replace(replace(replace(CONVERT(varchar, getdate(), 121),'-',''),' ',''),':',''),'.','') +'.bak' With Password = '123',init;
恢复SqlServer数据库
Restore Database [数据库] From disk=数据库备份文件地址 With Password = '123';