Database connection settings
By configuring the database connection settings, you specify how you want WorldServer to connect to your database and add connection parameters, if necessary. You can configure these connection settings in the general.properties file.
Connect to a Microsoft SQL Server database
If you want WorldServer to connect to a Microsoft SQL Server database, change the following entries in the general.properties file:
# JDBC driver configuration
# MS SQL Server
database_driver=com.idiominc.jdbc.sqlserver.SQLServerDriver
database=jdbc:idiom:sqlserver://wsdata:1433;DatabaseName=worldserver
- Uncomment the last two lines by removing the
#sign before the worddatabase. - In the last line, insert the appropriate URL connection string. The generic URL connection string for an SQL Server database instance is:
jdbc:idiom:sqlserver://<dbservername>\\<instance if any>:<port if any>;DatabaseName=<dbname>
For example, if the name of the SQL Server database server is
wsdata and the name of the database is worldserver, the entire section will look like this:
# JDBC driver configuration
# MS SQL Server
database_driver=com.idiominc.jdbc.sqlserver.SQLServerDriver
database=jdbc:idiom:sqlserver://wsdata:1433;DatabaseName=worldserver
Connect to an Oracle Database
If you want WorldServer to connect to an Oracle database, change the following entries in the general.properties file:
# Oracle
#database_driver=com.idiominc.jdbc.oracle.OracleDriver
#database=jdbc:idiom:oracle://host:1521;SID=database
- Uncomment the last two lines by removing the
#sign before the worddatabase. - In the last line, insert the appropriate URL connection string. The generic URL connection string for an Oracle database instance is:
jdbc:idiom:oracle://<dbservername>:<port if any>;SID=<dbname>
For example, if the name of the Oracle database server is
wsdata and the name of the database is worldserver, the entire section will look like this:
# JDBC driver configuration
# Oracle
database_driver=com.idiominc.jdbc.oracle.OracleDriver
database=jdbc:idiom:oracle://wsdata:1521;SID=worldserver
Connection parameters
QueryTimeout-
By using this parameter, you can set the default query timeout interval (in seconds) for all the statements created by a connection.
The values you can specify for this parameter are
-1,0, or x, where x is a number of seconds.- If you specify
-1, the query timeout functionality is disabled. - If you specify
0, the default query timeout is infinite, which means that the query is never timed out. This is the default value. - If you specify
x, the data driver uses that value as the default timeout for any statement that is created by the connection. The default value is0.
You can configure theQueryTimeoutparameter in the general.properties file by modifying the database configuration value. For example:- Oracle:
database=jdbc:idiom:oracle://wsdata:1521;SID=worldserver;QueryTimeout=300 - Microsoft SQL Server:
database=jdbc:idiom:sqlserver://wsdata:1433;DatabaseName=worldserver;QueryTimeout=300
- If you specify