Use the reconfigure-database command of the cell management tool to update connection properties for the vCloud Director database. This command cannot be used to change the database type or migrate data to another database instance.

The system configuration script requires you to a specify database type and connection properties for the vCloud Director database. See "Configure Network and Database Connections" in the vCloud Director Installation and Upgrade Guide. After installation has completed, you cannot change the database type without re-installing vCloud Director, but you can update most vCloud Director database connection properties with a command line of the following form:

cell-management-tool reconfigure-database  options

This command can be used if you have to move the existing vCloud Director database to a new host or change the database user name or password.

Any changes you make with this cell management tool subcommand are preserved in the cell's global.properties and responses.properties files. Changes do not take effect until you re-start the cell.

Table 1. Cell Management Tool Options and Arguments, reconfigure-database Subcommand

Option

Argument

Description

--help (-h)

None

Provides a summary of available commands in this category.

--database-host (-dbhost)

IP address or fully-qualified domain name of the vCloud Director database host

This option is used to create a new value for the database.jdbcUrl property.

--database-domain (-dbdomain)

SQL Server database user domain.

Optional if database type is sqlserver.

Important:

If you include this option, you must provide the same value that you specified when you originally ran the configuration script.

--database-instance (-dbinstance)

SQL Server database instance.

Optional if database type is sqlserver.

Important:

If you include this option, you must provide the same value that you specified when you originally ran the configuration script.

--database-name (-dbname)

The database service name. See "Installing and Configuring a vCloud Director Database" in the vCloud Director Installation and Upgrade Guide.

This option is used to create a new value for the database.jdbcUrl property.

Important:

If you include this option, you must provide the same value that you specified when you originally ran the configuration script.

--database-pwd (-dbpassword)

Password for the database user.

This option is used to create a new value for the database.password property. The password you supply is encrypted before it is stored as a property value.

--database-port (-dbport)

Port number used by the database service on the database host.

This option is used to create a new value for the database.jdbcUrl property.

--database-type (-dbtype)

The database type. One of:

  • oracle

  • sqlserver

This option is used to create a new value for the database.jdbcUrl property.

Important:

If you include this option, you must provide the same value that you specified when you originally ran the configuration script.

--database-user (-dbuser)

User name of the database user.

This option is used to update the value of the database.user property.

--private-key-path

pathname

The full pathname to the cell's private key. When you use this option, all cells in the server group will be gracefully shut down, have their database properties updated, and re-started.

When you specify a value for --database-host, --database-port, or both, the command validates that the specified value has the correct form but does not test the combination of host and port for network accessibility or the presence of a running database of the specified type.

If you use the --private-key-path option, all cells must be configured to permit ssh connections from the superuser without a password. You can use a Linux command line like the one shown here to verify this. This example sets your identity to vcloud, then makes an ssh connection to the cell at cell-ip as root but does not supply the root password.

sudo -u vcloud ssh -i private-key-path root@cell-ip

If the private key in private-key-path on the local cell is readable by user vcloud.vcloud and the corresponding public key has been added to the authorized-keys file for the root user at cell-ip the command succeeds.

Note:

The vcloud user, vcloud group, and vcloud.vcloud account are created by the vCloud Director installer for use as an identity with which vCloud Director processes run. The vcloud user has no password.

Change the vCloud Director Database Connection Properties

Important:

Changes you make using this command are written to the global configuration file and the response file. Before you use this command, be sure that the response file is in place (in /opt/vmware/vcloud-director/etc/responses.properties) and writable. See "Protecting and Reusing the Response File" in the vCloud Director Installation and Upgrade Guide.

To change the vCloud Director database username and password, leaving all other connection properties as they were originally configured, use a command like this one:

[root@cell1 /opt/vmware/vcloud-director/bin]#cell-management-tool reconfigure-database \
-dbuser vcd-dba -dbpassword P@55w0rd

A command like this can be used to update the cell's configuration after your database administrator has changed the vCloud Director database user name password. It is a good practice to stop all cells in a vCloud Director server group before changing database connection properties on any cell. You can re-start each cell after its database connection properties have been changed.

The command updates global.properties and responses.properties, but the changes do not take effect until you re-start the cell.