Hw to restore an encrypted database backup in sql server 2008 (using script)?

  • Hi,

    Can anybody please suggest me the script a database encrypted backup?

    backup database test to disk='c:\test.bak' with mediapassword = 'XXXX'

    restore database test1 from disk='c:\test.bak' decryption by password = 'XXXX';

    The above script doesn't work..

    Regards,

    Sourav

    Thanks.

  • In this link[/url] you may find the answer. If you are restoring to another Server, you first need to export the certificate you created on the Server where you create the backup. Good luck!

  • As per Books Online...

    RESTORE DATABASE ...

    WITH MEDIAPASSWORD = 'XXXX'

    This is not encryption, no keys, no certificates. This is nothing more than a weak password to discourage someone from restoring the media. Also, it's deprecated (since 2005 iirc) and should not be used.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks guys for the valuable feedback.

    Thanks.

  • You are welcome. Please let us know how it goes!:-)

  • I'm now suggesting the customer to use 'database level encryption'.

    Thanks.

  • Sourav-657741 (11/6/2011)


    I'm now suggesting the customer to use 'database level encryption'.

    SQL 2005 doesn't have database encryption. It has column encryption, which is a completely different thing.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks GilaMonster, the server is SQL 2K8.

    Thanks.

  • There is Transparent Data Encryption or column encryption, no database level encryption. Whichever one you choose, you will need to be careful about backing up and managing the encryption keys. You also should make sure you use the proper terminology or you might confuse people as to how they might handle a restore.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply