Contents Index CREATE DBSPACE statement CREATE DOMAIN statement

ASA SQL Reference
  SQL Statements

CREATE DECRYPTED FILE statement


Description 

This statement decrypts strongly encrypted databases.

Syntax 

CREATE DECRYPTED FILE newfile
FROM oldfileKEY
key

Parameters 

FROM    Lists the filename of the encrypted file.

KEY    Lists the key required to access the encrypted file.

Usage 

This statement decrypts an encrypted database, transaction log file, or dbspace and creates a new, unencrypted file. The original file must be strongly encrypted using an encryption key. The resulting file is an exact copy of the encrypted file, without encryption and therefore requiring no encryption key.

If a database is decrypted using this statement, the corresponding transaction log file (and any dbspaces) must also be decrypted in order to use the database.

If a database requiring recovery is decrypted, its transaction log file must also be decrypted and recovery on the new database will still be necessary.

The name of the transaction log file remains the same in this process, so if the database and transaction log file are renamed, then you need to run dblog -t on the resulting database.

If you want to encrypt an existing database, you need to either use the CREATE ENCRYPTED FILE statement, or unload and reload the database using the -an option with either -ek or -ep. You can also use this method to change an existing encryption key.

Permissions 
Side effects 

None.

Example 

The following example decrypts the contacts database and creates a new unencrypted database called contacts2.

CREATE DECRYPTED FILE 'contacts2.db'
FROM 'contacts.db'
KEY 'Sd8f6654*Mnn'

Contents Index CREATE DBSPACE statement CREATE DOMAIN statement