Raed Alsaleh
Raed Alsaleh

Reputation: 1621

SQL backup with password

I tried to backup database using the following script:

BACKUP DATABASE Northwind 
TO DISK='C:\Northwind.BAK' 
WITH MEDIAPASSWORD='my_password' 

but I get this error :

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

Upvotes: 1

Views: 2544

Answers (1)

marc_s
marc_s

Reputation: 754598

If you check the documentation (as the error message suggests), then you'd see:

Security

Beginning with SQL Server 2012, the PASSWORD and MEDIAPASSWORD options are discontinued for creating backups. It is still possible to restore backups created with passwords.

Upvotes: 2

Related Questions