Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.


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.
Posted
Updated 11-Jul-19 0:37am

1 solution

As MSDN documentation[^] says:
Quote:
Beginning with SQL Server 2012 the PASSWORD and MEDIAPASSWORD options are discontinued for creating backups. You can still restore backups created with passwords.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900