This statement creates a decrypted copy of an existing database, including all transaction logs and dbspaces.
CREATE DECRYPTED DATABASE newfile FROM oldfile [ KEY key ]
The CREATE DECRYPTED DATABASE statement produces a new database file (newfile), and does not replace or remove the original database file (oldfile).
All encrypted tables in oldfile are not encrypted in newfile, and table encryption is not enabled.
For databases created with SQL Anywhere version 11.0.0 and later, the ISYSCOLSTAT, ISYSUSER, and ISYSEXTERNLOGIN system tables always remain encrypted to protect the data from unauthorized access to the database file.
If oldfile uses transaction log or transaction log mirror files, they are renamed newfile.log and newfile.mlg, respectively.
If oldfile contains dbspace files, a D (decrypted) is added to the file name. For example, when you execute the CREATE DECRYPTED DATABASE statement, if oldfile is mydbspace.dbs, newfile becomes mydbspace.dbsD.
You cannot execute this statement on a database that requires recovery. Also, this statement is not supported in procedures, triggers, events, or batches.
Must be a user with DBA authority.
SQL/2003 Vendor extension.
The first statement below creates an AES256-encrypted copy of the demo.db 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';
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|