The database configuration file

Guidewire provides the means to configure various aspects of the PolicyCenter database through configuration file database-config.xml. This XML-formatted file contains a root <database> element with a number of subelements that you use to implement database configuration options specific to your database type.

The <database> element has the following syntax. The following code sample shows required attributes in bold font.

<database addforeignkeys="true|false" autoupgrade="full|manual" checker="true|false" 
      dbtype="h2|oracle|sqlserver" env="string" name="string" printcommands="true|false"
      versionchecksonly="true|false">

  <!-- Sets options for the generation of database statistics at the global, database level -->
  <databasestatistics databasedegree="integer" incrementalupdatethresholdpercent="integer"
        numappserverthreads="integer" samplingpercentage="integer" useoraclestatspreferences="true|false">
   
  <!-- Sets database statistics options for the named table -->
  <tablestatistics action="delete|keep|update" databasedegree="integer" name="string"
        samplingpercentage="integer">
      
      <!-- Sets database statistics options for the named column on the named table -->
      <histogramstatistics name="string" numbbuckets="integer"/>
      
    </tablestatistics>

   </databasestatistics>

   <!-- Sets options for the connection pool that Guidewire provides -->
  <dbcp-connection-pool jdbc-url="string" max-idle="integer" max-total="integer" max-wait="integer"
        min-evictable-idle-time="integer" num-tests-per-eviction-run="integer" password-file="string"
        test-on-borrow="true|false" test-on-return="true|false" test-while-idle="true|false" 
        time-between-eviction-runs="integer" when-exhausted-action="block|fail|grow">
    <reset-tools-params collation="string" oracle-tnsnames="string" system-password="string"
          system-username="string"/>
  </dbcp-connection-pool>

  <!-- Sets the data source for a JBoss, WebSphere, WebLogic, or Tomcat application server-->
  <jndi-connection-pool datasource-name="string"/>

  <!-- Sets options for an Oracle database -->
  <oracle-settings adaptive-optimization="true|false" db-resource-mgr-cancel-sql="string"
        query-rewrite="true|false" statistics-level-all="true|false" 
        stored-outline-category="string"/>

   <!-- Sets options for a SQL Server database -->
   <sqlserver-settings jdbc-trace-file="string" jdbc-trace-level="string" unicodecolumns="true|false"/>

   <!-- Sets various options related to database upgrade -->
   <upgrade>

     <mssql-db-ddl>

       <!-- Sets SQL Server database options at the global, database level -->
      <mssql-compression index-compression="NONE|PAGE|ROW" table-compression="NONE|PAGE|ROW/>
      <mssql-filegroups admin="string" index="string" lob="string" op="string" staging="string"
            typelist="string"/>
      
      <!-- Set SQL Server options for the named table, overrides values set at database level -->
      <mssql-table-ddl table-name="string">
        <mssql-index-ddl filter-where="string"index-compression="NONE|PAGE|ROW"
              index-filegroup="string" key-columns="string" partition-scheme="string"/>
        <mssql-table-compression index-compression="NONE|PAGE|ROW" table-compression="NONE|PAGE|ROW"/>
        <mssql-table-filegroups="string" index-filegroup="string" lob-filegroup
              table-filegroup="string"/>
      </mssql-table-ddl>

     </mssql-db-ddl>

     <ora-db-ddl>

       <!-- Sets Oracle database options at the global, database level -->
      <ora-compression index-compression="true|false" table-compression="ADVANCED|BASIC|NONE"/>
      <ora-lobs caching="true|false" type="BASIC|SECURE|SECURE_COMPRESSED/>
      <tablespaces admin="string" index="string" lob="string" op="string" staging="string"
            typelist="string"/>

       <!-- Sets Oracle options for the named table, overrides values set at the database level -->
      <ora-table-ddl table-name="string">
        <ora-index-ddl index-compression="true|false" index-tablespace="string" key-columns="string"/>
        <ora-lobs caching="true|false" type="BASIC|SECURE|SECURE_COMPRESSED/>
        <ora-table-compression index-compression="true|false" table-compression="ADVANCED|BASIC|NONE">
        <ora-table-date-interval-partitioning datecolumn="string"
              interval="DAILY|MONTHLY|QUARTERLY|WEEKLY|YEARLY">
        <ora-table-hash-partitioning hash-columns="string" num-partitions="integer"/>
        <ora-table-tablespaces index-tablespace="string" lob-tablespace="string"
              table-tablespace="string"/>
      </ora-table-ddl>

     </ora-db-ddl>

     <versiontriggers dbmsperfinfothreshold="integer">

       <!-- Sets override options for the named database version trigger -->
      <versiontrigger extendedquerytracingenabled="true|false" name="string" 
            parallel-dml="true|false" parallel-query="true|false"
            queryoptimizertracingenabled="true|false" recordcounters="true|false"
            updatejoinorderedhint="true|false" updatejoinusemergehint="true|false"
            updatejoinusenlhint="true|false"/>

     </versiontriggers>

   </upgrade>

 </database>

File database-config.xml contains a single root-level <database> element that takes the following attributes.

name

Required. String identifying the database for which PolicyCenter uses this connection specification.

dbtype

Required. Database type, either h2 (for the QuickStart database), oracle, or sqlserver.

The following attributes are all optional.

addforeignkey

Used only for development and testing. Do not use this attribute in production. The default is true.

autoupgrade Use to set how to upgrade the database. Valid values are:
  • full – Takes precedence and initiates a full upgrade assuming all other necessary conditions are met.
  • manual – Requires that you set either the database upgrade type (in Server Tools Upgrade and Versions screen) or the date system property.

checker

Important: Guidewire deprecates this attribute and recommends that you not use it.
Boolean. Whether PolicyCenter runs consistency checks before it starts:
  • Development environments – For development environments with small data sets, you can enable consistency checks to run each time the PolicyCenter server starts. Set the value of checker in the database block to true to enable checks on server startup.
  • Production environments – Running consistency checks upon server startup can take a long time, impact performance severely, and possibly time out on very large datasets. Set the value of checker in the database block to false to disable checks on server startup.

Valid values are:

  • true – Guidewire recommends that you only set checker to true in development environments with a small set of test data.
  • false – Guidewire recommends that you set checker to false under most circumstances.

The default is false.

See the following for more information:

env

Use of the env attribute to set a server environment enables you to provide different database configurations for different server environments. For example, you can set up different database configurations for a production environment and a test environment. To specify a database configuration for multiple environments, provide a comma-separated list of values for the env attribute.

See Example syntax for the <server> element for more information.

printcommands

Boolean. Whether the server prints database upgrade messages to the console upon startup. Valid values are:

  • true - By default, Guidewire sets the value of printcommands to true in the base configuration.
  • false - Do not set printcommands to false in a production environment.

The default is true.

versionchecksonly

Boolean. Whether the PolicyCenter server runs only database version checks at startup, without performing any actual database upgrade steps:

  • true - PolicyCenter runs all version checks regardless of a failure in one of the checks.
  • false - PolicyCenter stops the upgrade if it detects an error.

The default is false. Changes to this attribute take effect only during an application upgrade.

See Checking the database before upgrade in the Upgrade Guide

The <database> element takes the following subelements. There is, at most, a single occurrence of each of these subelements in the <database> element.

databasestatistics

Specifies parameters that control the generation of database statistics. See The <databasestatistics> database configuration element and Database statistics generation for more information.

dbcp-connection-pool

Specifies parameters for connection pool shared using dbcp. You must include this subelement if using a dbcp data source. See The <dbcp-connection-pool> database configuration element and The JDBC URL format for more information.

jndi-connection-pool

Specifies parameters for a connection pool shared using JNDI. You must include this subelement if using a jndi data source. See The <jndi-connection-pool> database configuration element and Configure PolicyCenter to use a direct JNDI data source for more information.

oracle-settings

Specifies settings for Oracle databases. See The <oracle-settings> database configuration element and Guidelines for configuring Oracle for PolicyCenter for more information.

sqlserver-settings

Specifies settings for SQL Server databases. See The <sqlserver-settings> database configuration element and Guidelines for configuring SQL Server for PolicyCenter for more information.

upgrade

Specifies PolicyCenter behavior during a database upgrade. See The <upgrade> database configuration element for more information.

See also