设置密码保护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’;