The examples in this section use the syntax of the connection URL for use
in an embedded environment. You can also specify these same attributes and
values on the client connection URL if you are using as
a database server. For more information, see the .
You can also set these attributes by passing a Properties object
along with a connection URL to DriverManager.getConnection when
obtaining a connection; see .
If you specify any attributes both on the connection URL and in a
Properties object, the attributes on the connection URL override the
attributes in the Properties object.
All attributes are optional.
Attributes are not parsed for correctness. If you pass in an
incorrect attribute or corresponding value, it is simply ignored.
Applications, however, should validate all attributes and not simply pass-through
directives from the end-user.
In particular, the traceFile and traceDirectory directives could
be used to write trace logs into a branch of the file system which your application
can access but which end-users can't.
For more information on working with connection URL attributes, see the
following:
- "Configuring database encryption" in the
for information on database
encryption
- for information on tracing
network clients, replicating databases, restoring databases from backup, and
logging on separate devices
For complete information about the attributes, see "Setting attributes for
the database connection URL" in the
.
For detailed information about the connection URL syntax,
see "Syntax of database connection URLs for applications with embedded
databases" in the .