keycloak-scim/server_installation/topics/database/hibernate.adoc

61 lines
2.4 KiB
Text
Raw Normal View History

2016-04-30 04:39:32 +00:00
2016-08-22 08:29:25 +00:00
=== Database Configuration
2016-04-27 21:01:22 +00:00
2017-03-27 17:13:11 +00:00
The configuration for this component is found in the `standalone.xml`, `standalone-ha.xml`, or `domain.xml` file in your distribution. The location of this file depends on your <<fake/../../operating-mode.adoc#_operating-mode, operating mode>>.
2016-04-27 21:01:22 +00:00
2016-08-22 08:29:25 +00:00
.Database Config
[source,xml]
2016-04-27 21:01:22 +00:00
----
2017-03-27 17:13:11 +00:00
<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">
...
<spi name="connectionsJpa">
<provider name="default" enabled="true">
<properties>
<property name="dataSource" value="java:jboss/datasources/KeycloakDS"/>
<property name="initializeEmpty" value="false"/>
<property name="migrationStrategy" value="manual"/>
<property name="migrationExport" value="${jboss.home.dir}/keycloak-database-update.sql"/>
</properties>
</provider>
</spi>
...
</subsystem>
2016-04-27 21:01:22 +00:00
----
Possible configuration options are:
dataSource::
JNDI name of the dataSource
jta::
boolean property to specify if datasource is JTA capable
driverDialect::
Value of database dialect.
In most cases you don't need to specify this property as dialect will be autodetected by Hibernate.
2016-08-22 08:29:25 +00:00
initializeEmpty::
Initialize database if empty. If set to false the database has to be manually initialized. If you want to manually initialize the database set migrationStrategy to `manual` which will create a file with SQL commands to initialize the database. Defaults to true.
2016-08-22 08:29:25 +00:00
migrationStrategy::
Strategy to use to migrate database. Valid values are `update`, `manual` and `validate`. Update will automatically migrate the database schema. Manual will export the required changes to a file with SQL commands that you can manually execute on the database. Validate will simply check if the database is up-to-date.
2016-08-22 08:29:25 +00:00
migrationExport::
Path for where to write manual database initialization/migration file.
2016-04-27 21:01:22 +00:00
showSql::
Specify whether Hibernate should show all SQL commands in the console (false by default). This is very verbose!
formatSql::
Specify whether Hibernate should format SQL commands (true by default)
globalStatsInterval::
Will log global statistics from Hibernate about executed DB queries and other things.
Statistics are always reported to server log at specified interval (in seconds) and are cleared after each report.
schema::
Specify the database schema to use
NOTE: These configuration switches and more are described in the link:{{book.appserver.jpa.link}}[_{{book.appserver.jpa.name}}_].
2017-03-27 17:13:11 +00:00