setDatabaseConfiguration

Back to index

Summary

Sets the database configuration in the server. If the server is in bootstrap mode, these changes take effect immediately, and the server will attempt to start. If the server is already running, these changes have no effect until the server is restarted.
If you are replacing the database you are currently using, you must restart the CloudBees CD/RO server after configuring the new database that you want to use.

CloudBees CD/RO assigns default values to the following three arguments that are derived from information you enter for the arguments: customDatabaseDialect customDatabaseDriver customDatabaseUrl. The values for these arguments can be viewed in the XML response for getDatabaseConfiguration. You should not need to change these values, but customDatabase arguments may be used to override CloudBees CD/RO default values. Contact CloudBees Customer Support for assistance with using these arguments.

customDatabaseDialect
Stringoptional
Class name of the Hibernate dialect (advanced use only -- the server will choose an appropriate dialect base on databaseType).
customDatabaseDriver
Stringoptional
Class name of the JDBC driver (advanced use only -- the server will choose an appropriate driver based on databaseType).
customDatabaseUrl
Stringoptional
The JDBC URL to use (advanced use only -- the server will compose an appropriate URL). If using an IPv6 address, enclose the address in square brackets. Example: [<IPv6-ADDRESS>].
databaseName
Stringoptional
The database instance name. Defaults to commander if left out.
databaseType
Stringoptional
The database type. Defaults to builtin.
Possible values: "builtin", "hsqldb", "hsqldbInProcess", "mariadb", "mysql", "oracle", "postgresql", "sqlserver"
hostName
Stringoptional
The domain name or IP address of the server machine corresponding to this resource.
ignorePasskeyMismatch
Booleanoptional
If true, ignore a passkey fingerprint mismatch between the current passkey file and the database configuration, discarding stored credentials.
ignoreServerMismatch
Booleanoptional
If true, ignore a host name mismatch between the current server and the database configuration.
password
Stringoptional
The password used to connect to the database.
port
Integeroptional
Port number to use when connecting to the agent for this resource; defaults to server default.
preserveSessions
Booleanoptional
If true, preserve sessions when ignoring server host name mismatches.
userName
Stringoptional
The user name used to connect to the database.

Usage

Perl

$cmdr->setDatabaseConfiguration( # optionals );

ectool

ectool setDatabaseConfiguration \ # optionals

Examples

Perl

$cmdr->setDatabaseConfiguration({hostName => "localhost", port => 3306}); # If the database type is set to the mysql, sqlserver, or oracle and # you want to use the builtin database $cmdr->setDatabaseConfiguration({databaseType => "builtin", databaseName => "builtin"});

ectool

ectool setDatabaseConfiguration --hostName localhost --port 3306 # If the database type is set to the mysql, sqlserver, or oracle and # you want to use the builtin database ectool setDatabaseConfiguration --databaseType builtin --databaseName builtin