本文介绍了在SQL Server 2012中受密码保护的SQL数据库备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试在sql查询下执行以备份受密码保护的数据库。我在sql server 2012和sql server 2014中遇到问题。



Hi ,

I am trying to execute below sql queries for back the DB with password protected. I am getting below issue in sql server 2012 and sql server 2014.

BACKUP DATABASE TM001 TO DISK ='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA' WITH PASSWORD='TEST'







BACKUP DATABASE TM001 TO DISK ='C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA' WITH MEDIAPASSWORD='TEST'





错误消息:



Error Msg :

One or more of the options (mediapassword) are not supported for this statement. Review the documentation for supported options.





我已经google了,并且它说这个密码功能在sql server 2014和sql server 2012中已经停止。



如果有任何解决方案,请告诉我。



谢谢

M Dhanasekaran



我的尝试:





I have googled and its says this password feature has discontinued in sql server 2014 and sql server 2012.

Please let me know if there any solution.

Thanks
M Dhanasekaran

What I have tried:

One or more of the options (mediapassword) are not supported for this statement. Review the documentation for supported options.

推荐答案

Quote:

从SQL Server 2012开始, PASSWORD MEDIAPASSWORD 选项已停止创建备份。您仍然可以恢复使用密码创建的备份。

Beginning with SQL Server 2012 the PASSWORD and MEDIAPASSWORD options are discontinued for creating backups. You can still restore backups created with passwords.


这篇关于在SQL Server 2012中受密码保护的SQL数据库备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 05:35