Click here to Skip to main content
14,386,278 members
Rate this:
Please Sign up or sign in to vote.
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 1:37am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100