background image
<< JDBC escape syntax for timestamp formats | create=true attribute >>

Setting attributes for the database

<< JDBC escape syntax for timestamp formats | create=true attribute >>
Derby Reference Manual
333
Setting attributes for the database connection URL
Derby allows you to supply a list of attributes to its database connection URL, which is a
JDBC feature.
The attributes are specific to Derby.
You typically set attributes in a semicolon-separated list following the protocol and
subprotocol (and, in some cases, the subsubprotocol). For information on how you set
attributes, see
Attributes of the Derby database connection URL
. This section provides
reference information only.
Note: Attributes are not parsed for correctness. If you pass in an incorrect attribute or
corresponding value, it is simply ignored.
bootPassword=key attribute
Function
Specifies the key to use to :
· Encrypt a new database
· Configure an existing unencrypted database for encryption
· Boot an existing encrypted database
Specify an alphanumeric string that is at least eight characters long.
Combining with other attributes
When you create a new database, the bootPassword=key attribute must be combined
with the
create=true
and
dataEncryption=true
attributes.
When you configure an existing unencrypted database for encryption, the
bootPassword=key attribute must be combined with the
dataEncryption=true
attribute.
For an existing, unencrypted database for which authentication and SQL authorization
are both enabled, only the
database owner
can perform encryption. Please see "Enabling
user authentication" and "Setting the SQL standard authorization mode" in the Derby
Developer's Guide
for more information.
When you boot an existing encrypted database, no other attributes are necessary.
Examples
-- create a new, encrypted database
jdbc:derby:newDB;create=true;dataEncryption=true;
bootPassword=cseveryPlace
-- configure an existing unencrypted database for encryption
jdbc:derby:salesdb;dataEncryption=true;bootPassword=cseveryPlace
-- boot an existing encrypted database
jdbc:derby:encryptedDB;bootPassword=cseveryPlace
collation=collation attribute
Function
The
collation
attribute is an optional attribute that specifies whether collation is based
on the territory specified for the database or Unicode codepoint collation. The valid
values for the
collation
attribute are:
UCS_BASIC
Unicode codepoint collation. This value is the default.
TERRITORY_BASED