Is it possible to change a database from having no encryption to having simple encryption using the CREATE ENCRYPTED FILE command? Or must you use dbunload or dbinit flags and create a new database file?

asked 15 Nov '11, 17:37

BetterOffTed's gravatar image

BetterOffTed
46224
accept rate: 0%

The description of the statement is that the CREATE ENCRYPTED FILE statement will create a new file and it does not replace the previous version of the file.

"You can also encrypt an existing database or change an existing encryption key by unloading and reloading the database using the dbunload -an option with either -ek or -ep".

HTH

(15 Nov '11, 18:10) Derli Marcochi
1

As always, telling the version (and build) is quite helpful:)

(15 Nov '11, 19:33) Volker Barth

Thanks for the information guys. We are using SQL Anywhere Network Server Version 10.0.1.3831.

(16 Nov '11, 12:06) BetterOffTed
Replies hidden

To sum up:

With v10.0.1, I would conclude that the answer is: "Unfortunately no, you will have to use an unload", as

  1. that nice CREATE ENCRYPTED DATABASE feature is not available before 11.0.1 and
  2. CREATE ENCRYPTED FILE does not support simple encryption.
(30 Nov '11, 07:13) Volker Barth

Starting with 11.0.1, you can use the CREATE ENCRYPTED DATABASE statement to create a new database (with all necessary files) from a not encrypted (or differently encrypted one). That does not require a reload.

As to the docs, that does also allow to change from no encryption to simple encryption.


EDIT 1: To answer your actual question, the same should be possible in older versions with CREATE ENCRYPTED FILE (so you should not need to do an unload) - but you have to take care to adapt all necessary files yourself.


EDIT 2: As Graeme has pointed out, CREATE ENCRYPTED FILE does not support simple encryption. So I stand corrected...

permanent link

answered 15 Nov '11, 19:10

Volker%20Barth's gravatar image

Volker Barth
30.8k308456665
accept rate: 32%

edited 15 Nov '11, 19:33

2

Just to clarify - no, you cannot use create encrypted file to create a database file encrypted with simple encryption. But as Volker says, you can use create encrypted database. The create encrypted database statement is much easier anyway.

(15 Nov '11, 19:28) Graeme Perrow
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×33

question asked: 15 Nov '11, 17:37

question was seen: 923 times

last updated: 30 Nov '11, 07:13