Note: Configuring a database from the command line requires that you pass the password you intend to use in plain text on the command line. Oracle recommends that after configuring the database, you change the password for security. Alternatively, use the graphical user interface for configuring databases, which does not require passing the password in plain text.
You can configure the database connection by opening a command window as an Administrator and running Primavera.Launcher.DBconfig.exe. You can find Primavera.Launcher.DBconfig.exe in the install location of P6 Professional. The default location for Primavera.Launcher.DBconfig.exe is: <local drive>\Program Files\Oracle\Primavera P6\P6 Professional
When you run Primavera.Launcher.DBconfig.exe you must also pass certain parameters. You can pass the parameters in any order, however you must include a space between each parameter and there must be no space between a parameter and its value. All parameters are case-sensitive except the boolean values "yes" and "no".
The following command line parameters are available:
Parameter | Description |
---|---|
| Use this parameter to specify whether to Add a new database, or Edit or Delete an existing database. This parameter can also be used to AddorEdit a database alias, adding the alias if it does not exist, or editing it if it does. You can also use this parameter to DeleteDriver if you wish to exclude the specific driver types listed with the /dbtype parameter from the bootstrap file. This parameter is optional. If you do not pass this parameter, the default value will be used. The default value is Add. |
| Use this parameter to set the name of the database alias. This parameter is mandatory. |
| This parameter is only valid when creating a new standalone database. Use this parameter to set the name of the base currency for the database. This parameter is optional, but the value is mandatory. If you do not pass this parameter, the default value will be used. The default value is US Dollar. |
| This parameter is only valid when creating a new standalone database. Use this parameter to set the abbreviation of the base currency for the database. This parameter is optional, but the value is mandatory. If you do not pass this parameter, the default value will be used. The default value is USD. |
| This parameter is only valid when creating a new standalone database. Use this parameter to set the symbol of the base currency for the database. This parameter is optional, but the value is mandatory. If you do not pass this parameter, the default value will be used. The default value is $.
|
| Use this parameter to provide the connection string for a Cloud, Oracle or SQL Server database, or the location for an SQLite database. This parameter is mandatory. |
| Use this parameter to specify the driver type to use for the database. Valid values are Oracle, SQLServer, and SQLite. This parameter is mandatory. |
| Use this parameter to provide the public group ID for the database. This ID must be an integer. This parameter is optional, but the value is mandatory. If you do not pass this parameter, the default value will be used. The default value is 1. |
| Use this parameter to hide access to the database configuration screens from the launcher dialog box. Valid values are Yes and No. This parameter is optional. The default value is no. |
| Use this parameter to provide the key name and the path your P6.key file. The value should be expressed as <Key Name>@<Key Store File Path>. Alternatively, use this parameter to switch on the option to use the default database keystore, by passing a null value, i.e. "". This parameter is optional if you choose to use the default database keystore. |
| This parameter is only valid when creating a new standalone database. Use this parameter to specify whether to load sample data into the new database. Valid values are Yes and No. This parameter is optional. The default value is yes. |
| Use this parameter provide the path and name for a log file. This parameter is optional. If you do not pass this parameter, the default log file will be created as Primavera.Launcher.DBConfig.log in the user's %TEMP% folder. |
| This parameter is only valid when creating a new standalone database. Use this parameter to provide the password for the user of the new standalone instance of P6 Professional. This parameter is mandatory when creating a new standalone database. |
| Use this parameter provide the pubuser name for the database. This parameter is mandatory, but applies only to Oracle and SQLServer databases. |
| Use this parameter provide the password for the pubuser in the database. This parameter is mandatory, but applies only to Oracle and SQLServer databases. |
| This parameter is only valid when connecting to a CloudServer database. Use this parameter to specify the number of seconds to wait for a response from the cloud database. This parameter is optional, but the value is mandatory. If you do not pass this parameter, the default value will be used. The default value is 900. |
| Use this parameter to specify whether to test the database connection. Valid values are Yes and No. This parameter is optional. If you do not pass this parameter, the database will not be tested. |
| This parameter is only valid when connecting to a CloudServer database. Use this parameter to specify whether to enable the local cache database. Valid values are Yes and No. This parameter is optional. If you do not pass this parameter, the local cache database will be enabled. |
| This parameter is only valid when creating a new standalone database. Use this parameter to provide the username for the user of the new standalone instance of P6 Professional. This parameter is mandatory when creating a new standalone database. |
| This parameter is only valid when connecting to a CloudServer database. Use this parameter to specify whether to use SAML authentication. Valid values are Yes and No. This parameter is optional. If you do not pass this parameter, SAML authentication will not be enabled. |
Examples
Delete an alias:
Primavera.Launcher.DBconfig.exe /dbtype="Oracle" /runsilent="Yes" /action="Delete" /alias="MyAlias"
Add a cloud server alias with SAML authentication enabled and the local cache database not enabled:
Primavera.Launcher.DBconfig.exe /runsilent="Yes" /dbtype="CloudServer" /alias="MyCloudAlias" /connectionString="myclouddatabase@https://mycloudserver/p6procloudconnect" /usesaml="Yes" /uselocalrepository="No"
Edit an Oracle alias to change the database key to KeyTwo:
Primavera.Launcher.DBconfig.exe /runsilent="Yes" /action="Edit" /dbtype="Oracle" /alias="MyOracleAlias" /connectionString="//myoracleserverdatabase:1234/orcl" /pusername="databasepublic" /puserpwd="databasepublicpassword" /keypath="KeyTwo@C:\p6.key"