On this page:
   28.15    Cross-Origin Resource Sharing (CORS) 28.17    EMPI   

28.16Database

 

The Database configuration category includes the following configurable options:

  • Database Type

  • Database Connection URL

  • Database Username

  • Database Password

  • Database Update Mode

  • Min Idle Connections

  • Max Idle Connections

  • Max Total Connections

  • Connection Max Lifetime (millis)

  • Max Wait (Seconds)

  • Default Query Timeout (Seconds)

  • Pool Prepared Statements

  • SQL Parameter Bind Mode

28.16.1Property: Database Type

 
Property Name Database Type
Property Key
Property Type ENUM
Values
  • H2_EMBEDDED
  • DERBY_EMBEDDED
  • MARIADB_10_1
  • MYSQL_5_7
  • POSTGRES_9_4
  • ORACLE_12C
  • MSSQL_2012
Description The database platform being used. Smile CDR supports several relational database platforms for persistence so this setting selects the dialect that is specific to the platform being used.

For example, if you are using Postgres 9.4, select the POSTGRES_9_4 dialect.
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.driver = 

28.16.2Property: Database Connection URL

 
Property Name Database Connection URL
Property Key
Property Type STRING
Description JDBC Connection URL for the persistence database.

The following examples show JDBC URLs for a few different database platforms:
  • Derby Filesystem: jdbc:derby:directory:target/testDatabase;create=true
  • Postgresql: jdbc:postgresql://localhost/cdr
  • MariaDB: jdbc:mariadb://localhost:3306/cdr
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.url = 

28.16.3Property: Database Username

 
Property Name Database Username
Property Key
Property Type STRING
Description Username for the persistence database.
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.username = 

28.16.4Property: Database Password

 
Property Name Database Password
Property Key
Property Type PASSWORD
Description Password for the persistence database.
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.password = 

28.16.5Property: Database Update Mode

 
Property Name Database Update Mode
Property Key
Property Type ENUM
Values
  • UPDATE
  • NONE
Description Controls whether Smile CDR should attempt to update the FHIR storage database schema on startup. If the database schema is out of date, Smile CDR automatically run migration on the FHIR storage schema at startup if the value is "UPDATE" If the value is "NONE", then Smile CDR will abort starting the FHIR storage module if its schema is out of date. When set to "NONE", you should use the "smileutil migrate" command to upgrade the database manually.
Default Value UPDATE
Example Property
module.[MODULE_ID].config.db.schema_update_mode = UPDATE

28.16.6Property: Min Idle Connections

 
Property Name Min Idle Connections
Property Key
Property Type NON_NEGATIVE_INTEGER
Description The minimum number of idle connections to keep in the database connection pool at any given time.
Default Value 0
Example Property
module.[MODULE_ID].config.db.connectionpool.minidle = 0

28.16.7Property: Max Idle Connections

 
Property Name Max Idle Connections
Property Key
Property Type NON_NEGATIVE_INTEGER
Description The maximum number of idle connections to keep in the database connection pool at any given time.
Default Value 8
Example Property
module.[MODULE_ID].config.db.connectionpool.maxidle = 8

28.16.8Property: Max Total Connections

 
Property Name Max Total Connections
Property Key
Property Type POSITIVE_INTEGER
Description The maximum total number of connections to allow the database connection pool to hold at any given time. Set this value carefully as it may negatively impact database performance when set too low or too high.
Default Value 8
Example Property
module.[MODULE_ID].config.db.connectionpool.maxtotal = 8

28.16.9Property: Connection Max Lifetime (millis)

 
Property Name Connection Max Lifetime (millis)
Property Key
Property Type POSITIVE_INTEGER
Description If set, provides the maximum total number of milliseconds that a connection is allowed to live. Any connections that are open for longer will be closed instead of being reused. Note that this setting applies only to idle connections in the pool, it does not affect active database operations even if the timeout is exceeded.
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.connectionpool.maxlifetime.millis = 

28.16.10Property: Max Wait (Seconds)

 
Property Name Max Wait (Seconds)
Property Key
Property Type POSITIVE_INTEGER
Description The maximum number of seconds that a request should wait for a database connection before timing out and aborting.
Default Value 30
Example Property
module.[MODULE_ID].config.db.connectionpool.maxwait_seconds = 30

28.16.11Property: Default Query Timeout (Seconds)

 
Property Name Default Query Timeout (Seconds)
Property Key
Property Type NON_NEGATIVE_INTEGER
Description This setting is the maximum number of seconds that a query may run before being automatically aborted by the database. This setting is a failsafe to prevent overly taxing searches from dominating the database.
Default Value 60
Example Property
module.[MODULE_ID].config.db.connectionpool.default_query_timeout_seconds = 60

28.16.12Property: Pool Prepared Statements

 
Property Name Pool Prepared Statements
Property Key
Property Type BOOLEAN
Description If enabled, prepared statements will be pooled by the connection pool. Note that when using schema-based multitenancy, Smile CDR may choose to ignore this setting.
Default Value false
Example Property
module.[MODULE_ID].config.db.connectionpool.pool_prepared_statements = false

28.16.13Property: SQL Parameter Bind Mode

 
Property Name SQL Parameter Bind Mode
Property Key
Property Type ENUM
Values
  • ALWAYS_INLINE
  • INLINE_NUMERIC
  • NEVER_INLINE
Description Specifies whether parameters in SQL statements should be inlined or bound to parameters.
Default Value NEVER_INLINE
Example Property
module.[MODULE_ID].config.db.sql_parameter_bind_mode = NEVER_INLINE
   28.15    Cross-Origin Resource Sharing (CORS) 28.17    EMPI