1

If I have a SQL Server database backup, in order to restore it to another SQL Server instance, do I need to provide any password?

I tried restoring it but it didn't asked for a password to restore?

7
  • 1
    Welcome to SO, Have you tried researching the web on this subject? Can you share what you found so far Commented Mar 14, 2019 at 17:54
  • 3
    Did the restore fail? I feel like we're missing the other half of the story here. And you might get better response on the dba.stackexchange site Commented Mar 14, 2019 at 17:56
  • google.com/… Commented Mar 14, 2019 at 18:10
  • I found following SQL to backup the DB with password but "MEDIAPASSWOED" key word is not recognizing by SQL as a key word (BACKUP DATABASE Northwind TO DISK='C:\Northwind.BAK' WITH MEDIAPASSWORD='mssqltips') Commented Mar 14, 2019 at 18:39
  • From what i researched i got to know that you don't need a password to restore the DB to another server instance Commented Mar 14, 2019 at 18:42

1 Answer 1

1

If I have a SQL Server database backup, in order to restore it to another SQL Server instance, do I need to provide any password?

No, you do not need.

Older versions (before SQL Server 2012) had an option MEDIAPASSWORD

However it was retired in newer releases, therefore password protected backups cannot be created anymore on SQL Server 2012 and higher

At the same time old password-protected backups still can be restored using t-sql, an example:

RESTORE DATABASE YourDB FROM DISK='C:\Temp\YourDB.BAK' WITH MEDIAPASSWORD='secretPassword'

In modern versions of SQL Server backups can be protected more serious way using Backup Encryption

References:

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, this was really healpfull

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.