3.2.4 Properties for the Connection to the Database
Note
sql.properties for Command Line Tools
Be aware that the command line tools that access the database directly (like cm unlockcontentserver or cm schemaaccess)
still need the sql.properties file in their properties/corem directory,
as the tools are not (yet) configurable via Spring.
sql.pool.check-connection-max-threads
Type
Integer
Default
-1
Description
The maximum number of threads for checking database connections, or -1
for twice the number of sql.pool.max-connections.
sql.pool.check-timeout
Type
Integer
Default
5
Description
Maximum time in seconds the check is allowed to take.
sql.pool.log-queries
Type
Boolean
Default
false
Description
If the property is "true", messages concerning queries
(search of content item versions) will be generated.
sql.pool.log-query-statements
Type
Boolean
Default
false
Description
If the property is "true", SQL statements concerning queries
will be written to the log.
sql.pool.log-schedule-messages
Type
Boolean
Default
false
Description
If the property is "true", write messages of the connection
pool to the log file.
sql.pool.log-verbose
Type
Boolean
Default
false
Description
If the property is "true", more debug messages will be
generated.
sql.pool.max-connections
Type
Integer
Default
4
Description
Maximum number of connections to the database.
sql.pool.max-queries
Type
Integer
Default
4
Description
Maximum number of connections used for queries, that is, the maximum
number of parallel queries.
sql.pool.max-retries
Type
Integer
Default
15
Description
Maximum number of retries on job that failed due to read-only DB or
connection loss.
sql.pool.min-connections
Type
Integer
Default
2
Description
Minimum number of connections to the database.
sql.pool.open-timeout
Type
Integer
Default
30
Description
Maximum time in seconds the opening of connections is allowed to take.
sql.pool.reaper-interval
Type
Long
Default
120
Description
The interval in seconds in which it is checked if connections can be
closed.
sql.pool.reaper-timeout
Type
Long
Default
180
Description
The time in seconds a connection must be idle before it will be
closed.
sql.pool.retry-delay
Type
Duration
Default
15s
Description
Delay interval before a retry is attempted due to a read-only DB or
connection loss.
sql.pool.retry-on-connection-loss
Type
Boolean
Default
false
Description
If "true", will retry failed transactions due to db
connection failure.
sql.pool.retry-on-read-only-db
Type
Boolean
Default
false
Description
If "true", will retry failed transactions due to a read-only
database.
sql.pool.scheduler-pull-up-ratio
Type
Double
Default
0.1
Description
Ratio of non-exclusive elements to pull up in scheduler queue in case
of a potential deadlock (in the range ]0.0,1.0]).
sql.pool.scheduler-watch-interval
Type
Duration
Default
10s
Description
The interval between two checks for potential scheduler deadlocks.
sql.pool.scheduler-watchdog-enabled
Type
Boolean
Default
true
Description
Flag to enable scheduler watchdog.
sql.pool.validator-interval
Type
Long
Default
300
Description
The interval in seconds in which existing connections will be checked
for function.
sql.pool.validator-timeout
Type
Long
Default
120
Description
The time in seconds a connection must be idle before it will be
checked for function.
sql.schema.alter-table
Type
Boolean
Default
false
Description
Setting the property to "true", causes the Content Server to
automatically add database columns for newly defined content type
properties and to fix wrong widths of String properties. This will
only work if you set sql.schema.checkColumns to "true".
sql.schema.check-columns
Type
Boolean
Default
true
Description
Setting the property sql.schema.checkColumns to "true",
causes the Content Server to compare the content type definition with
the existing database schema for missing columns and matching widths
of String properties. If there are differences, it depends on the
setting of sql.schema.alterTables if the Content Server refuses to
start ("false") or if it adds and changes the columns
automatically ("true"). Checking the tables consumes a
considerable amount of time, so that the server starts up more slowly.
If sql.schema.checkColumns is set to "false", the Content
Server will not check the columns. If there are differences, you will
run into Content Server exceptions later on.
sql.schema.create-drop-indexes
Type
Boolean
Default
false
Description
Setting the property to "true", causes the Content Server to
automatically create and drop indexes on content type properties,
according to the Index attribute in the doctypes.xml. This flag only
affects existing columns. For newly added columns and tables, an index
is always created if the Index attribute is set.
sql.schema.create-table
Type
Boolean
Default
true
Description
The Content Server always checks if tables for the content types are
missing. Setting the property to "true", causes the Content
Server to create missing tables for new content types. If the setting
is "false" and there are missing tables the Content Server
refuses to start
sql.store.collector.blob-preservation-period
Type
Integer
Default
86400
Description
The time in seconds, a blob, that has no reference to a resource, will
be preserved.
sql.store.collector.delay
Type
Integer
Default
86400
Description
The delay between two collections in seconds.
sql.store.collector.initial-delay
Type
Integer
Default
600
Description
The delay in seconds before starting the first collection.
sql.store.collector.start-time
Type
Integer
Default
-1
Description
The time of the day, in seconds from 0:00h in the default time zone,
when the collector should run every day. If set to -1, it does not run
at a fixed time. The initial delay is always enforced as a minimal
delay after server startup.
sql.store.collector.suspend
Type
Boolean
Default
false
Description
If set to true, unused blobs will not be deleted in the blob store.
This can be used during backup if you have a non-transactional blob
store. Alternatively, the blobcollector actuator endpoint must be used
to suspend deletion of unused blobs at runtime before starting a
backup of a non-transactional blob store.
sql.store.convert
Type
Map<String,String>
Description
Converters which are used to convert custom XML formats which have
been defined for the obsolete coremedia-sgmltext.dtd.
The editor in versions before SCI 4.1.38 created XML text, which was
not valid according to the coremedia-richtext-1.0.dtd. If you have
created content with versions before SCI 4.1.38, set the property to
"true" to correct these errors (CoreMedia recommends to
always use "true").
sql.store.driver
Type
String
Description
The JDBC driver used to connect to the database.
Example:oracle.jdbc.driver.OracleDriver
sql.store.folder-index-timeout
Type
Duration
Default
1m
Description
Maximum time to wait for an enabled folder index to become up-to-date
when a content query with BELOW-clause is executed. Folder index
updates may take some time, if large folders were moved. If the
maximum time has been reached, the query will be executed as if the
folder index was offline. Set to negative value for unlimited.
sql.store.generate-blob-ids
Type
Boolean
Default
true
Description
Whether the store generates blob ids on its own. Defaults to
"true". If set to "false", the store relies on
externally provided blob ids. This allows the use of shared media
stores for MLS and RLS. This flag must not be changed after the first
start of a Content Server.
NOTE: this feature switch is
currently reserved exclusively for integration of the Image
Transformation Service and Blob Service and must not be used in
projects otherwise.
sql.store.isolation
Type
String
Description
Define the transaction isolation level. An empty value uses the driver
default setting.
sql.store.log-driver-messages
Type
Boolean
Default
false
Description
Write messages of the JDBC driver to the logs
hox.corem.server.sql.SQLStore and
com.coremedia.cotopaxi.server.DatabaseProperties.
sql.store.login-user-name
Type
String
Description
The user name for a database login. If not set, the value of
"sql.store.user" will be used to log in to the database. In
some cases the login username differs from the actual user, e.g. with
PostgreSQL on Azure a postfix on the user name is necessary to log in.
Example:
sql.store.login-user-name=username@domain
sql.store.user=username
sql.store.password
Type
String
Description
The password of the user at the database.
sql.store.prepared-statement-cache-size
Type
Integer
Default
-1
Description
If set, denotes the maximum number of prepared statements that is kept
open per database connection.
sql.store.read-only-media-store-names
Type
List<String>
Description
A list of names of read-only media stores. Such stores receive their
binary data from another Content Server which also generates the blob
ids that must then be used when creating blobs in this Content Server.
Because the blob ids are provided externally,
sql.store.generate-blob-ids=false is required if
this property is non-empty. This makes it possible to share blobs
between MLS and RLS. The blob collector will not remove any blobs from
shared stores.
NOTE: this feature is currently
reserved exclusively for integration of the Image Transformation
Service and Blob Service and must not be used in projects otherwise.
sql.store.replace-substitute
Type
Boolean
Default
false
Description
There are problems with zOS DB2 databases to store characters that are
not in the databases character set. Such characters are converted to
the character with the code "0x001A" upon read. If the
property is set to "true", this character will be replaced
with the character defined in sql.store.substituteCharacter, thereby
avoiding the replacement character that is illegal in XML texts.
sql.store.sgml-cache-interval-seconds
Type
Integer
Default
0
Description
Seconds between cache statistics log entries to facility
cap.server.store.sgmlcache
sql.store.sgml-cache-size
Type
org.springframework.util.unit.DataSize
Default
10MB
Description
Total size of XML objects cached in memory. Unit defaults to bytes.
sql.store.sgml-cache-size-bytes
Type
org.springframework.util.unit.DataSize
Deprecation
This property has been deprecated since 2404.1 and will be removed in a future version.
Use sql.store.sgml-cache-size instead.
Reason:
Aligning name with all other capacity configuration options.
sql.store.substitute-character
Type
String
Default
?
Description
The character, with which "0x001A" should be replaced.
sql.store.url
Type
String
Description
The URL of the database to connect to.
Example:jdbc:oracle:thin@HostName:Port:CM Replace HostName
and Port with the appropriate values of the database host. Don't
replace HostName with "localhost", this may cause problems
with some JDBC drivers.
sql.store.use-ctes-for-below-queries
Type
Boolean
Default
true
Description
Whether to use recursive common table expressions (aka "WITH
RECURSIVE") in SQL statements for content queries with
BELOW-clauses (aka descendantOf clauses) to find contents below some
folder, if the folder index is not online.
sql.store.user
Type
String
Description
The user name at the database, which must match the schema.