Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - Database Administration » Security » Data security » Database encryption and decryption


Decrypting a database

You can decrypt a database using the CREATE DECRYPTED DATABASE statement. As with the CREATE ENCRYPTED DATABASE statement, you are creating a copy of the file (in this case, in decrypted form), and not actually overwriting the original database file.

 Decrypt a database (SQL)
  1. Connect to an existing database from Interactive SQL.

  2. Decrypt the database using the CREATE DECRYPTED DATABASE statement.

    The first statement creates an AES256-encrypted copy of the demo.db database called demoEncrypted.db,. The second statement creates a decrypted copy of demoEncrypted.db called demoDecrypted.db.

    CREATE ENCRYPTED DATABASE 'demoEncrypted.db'
       FROM 'demo.db'
       KEY 'Sd8f6654*Mnn'
       ALGORITHM 'AES256';
    CREATE DECRYPTED DATABASE 'demoDecrypted.db'
       FROM 'demoEncrypted.db'
       KEY 'Sd8f6654*Mnn';

    If there are transaction logs, transaction log mirrors, or dbspaces associated with the database, decrypted copies of those files are made as well. See CREATE DECRYPTED DATABASE statement.

 Decrypting a database for technical support