x

How do i take Backup of Database with password?

I am currently using SQL SERVER 2012 Express Edition.
Now I want to take backup of my database With password protection.
So i tried

 BACKUP DATABASE [NAME] TO DISK ='[PATH]' WITH PASSWORD='[PASSWORD]'

But it showed error that SQL SERVER 2012 Does not support the "WITH PASSWORD".

Can any one please help me with the solution. I want to backup DB with password Protection.

more ▼

asked Sep 21, 2015 at 02:15 PM in Default

avatar image

harshvyas
71 2 2 7

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

With the 2012 (and higher) Express versions, I think that your options are limited to third party solutions such as Red Gate's SQL Backup - http://www.red-gate.com/products/dba/sql-backup/

TDE is an Enterprise version only solution and you can't natively encrypted backups until 2014, which also requires Standard or higher per the supported features list: https://msdn.microsoft.com/en-us/library/cc645993(v=sql.120).aspx

Not sure what else to suggest. Someone else might be able to offer up a suggestion. Is the purpose to secure the backup file itself or the contents within it?

more ▼

answered Sep 21, 2015 at 06:50 PM

avatar image

JohnM
13.7k 3 7 14

I don't know if OP was looking for encryption or just password protection which was available through SQL Server 2008 R2.

For newer versions, BOL says "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."

Sep 21, 2015 at 09:54 PM KenJ

No i Just want the Backup password protected not the data of it. as per suggested by @KenJ i don't want my db encrypted. i heard that PASSWORD & MEDIAPASSWORD are discontinued so are there any other options available similar to that.

Sep 22, 2015 at 05:43 AM harshvyas

As mentioned, I'm not sure what else to use other than third party options. The only other thought that I had was to ensure that your backup location is as secure as possible.

The purpose of the password is such that if someone gets the files they can't restore it without the password. If you prevent someone from getting the file to start with, you've accomplished the same thing just in a different manner. Not quite the same thing I know. It was just a thought.

Sep 22, 2015 at 12:08 PM JohnM
(comments are locked)
10|1200 characters needed characters left

You can utilize something like 7zip or WinZip to put the backup file into a compressed file, then password protect the compressed file. I know 7zip supports passing the password through the command line if you need to automate the process, not sure on WinZip.

more ▼

answered Sep 22, 2015 at 01:15 PM

avatar image

Shawn_Melton
6.4k 21 25 34

Thanks for the suggestion but i cant use it as i want to make backup password protected through one windows application and via coding, also i just wanted the password protected .bak file not a zip file.

Sep 22, 2015 at 02:20 PM harshvyas
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x244
x60
x21
x9

asked: Sep 21, 2015 at 02:15 PM

Seen: 685 times

Last Updated: Sep 22, 2015 at 02:20 PM

Copyright 2016 Redgate Software. Privacy Policy