The SQL database is upgraded automatically from the machine where you run the IaaS installer as a necessary part of the upgrade process. If you do not have permissions to update the SQL database using the IaaS installer, contact your database administrator to upgrade the SQL database first using the following procedure.

About this task

An administrator can control some aspects of upgrade by using DBUpgrade.exe command line options.

The DBUpgrade command requires the names of the SQL Server database instance and the vRealize Automation database and the port number if you are using a port other than the default SQL port. It can use Windows authentication or SQL authentication to access the database. DBUpgrade.exe creates a log file named dbupgrade.log in the current directory if you do not provide a path name for another directory.

Important:

The DBUpgrade.exe command is case-sensitive. Enter the command line options using the case shown in the command options table.

Run this command only once during an upgrade.

If Java 8, update 91, 64 bit is not installed, or if the JAVA_HOME environment is set incorrectly, you see a message similar to the following one:

Upgrading VMware vCAC or vCloud Automation Center IaaS SQL database 
fails with the error: Java version 1.7(64-bit) must be installed, 
the environment variable JAVA_HOME must be set to the Java install folder, and 
%JAVA_HOME%\bin\java.exe (2089329) 

For information about resolving the error, see the VMware Knowledge Base article at http://kb.vmware.com/kb/2089329.

Prerequisites

  • Verify that the machine on which you run the DBUpgrade command meets the following Java-related requirements.

    • Java 8, update 91, 64 bit, jdk-8u91-windows-x64.exe, is installed. 32-bit versions are not supported.

      For the latest version information, see the vRealize Automation Support Matrix at https://www.vmware.com/support/pubs/vcac-pubs.html.

    • The environment variable JAVA_HOME is set to the Java install folder.

    • The %JAVA_HOME%\bin\java.exe file is available.

Procedure

  1. Navigate to the Windows installer download page by using https://vcac-va-hostname.domain.name:5480/installer/, the host name of the vRealize Automation appliance.
  2. Click database upgrade scripts from the list of options under IaaS Installation.
  3. Extract the contents of the DBUpgrade.zip archive file to a local folder on the vRealize Automation database host, or to another location with network access to the database host.
  4. In an elevated Windows command prompt window, set your current directory to the folder where you extracted the contents of the DBUpgrade.zip archive file.
  5. Enter a DBUpgrade command string in the following format, recognizing that the command options are case-sensitive.
    DBUpgrade [-S dbserver[,port number][\SQLinstance]] [-d dbname] [-N] [{-E | -U username}] [-l logfilepath]

    Option

    Description

    -S dbserver [,portnumber][\SQLinstance]

    Identifies the database server instance by server name, port number and SQL instance name.

    Allowable values for dbserver are localhost or a fully qualified domain name for the database server.

    If you are using an SQL port number other than the default, 1433, you must specify the port number as part of the FQDN. If no port number is specified, the 1433 port is used.

    If you are using a named SQL instance, specify the instance name. If no name is specified, the default, unnamed SQL instance is used.

    -d dbname

    Identifies the vRealize Automation database dbname.

    -N

    Specifies that a secure database connection be used. If your SQL server is configured to accept a secure connection, you can use this option to upgrade the database.

    -E

    Requires a Windows Authentication trusted connection to access the database and connects using the Windows credentials of the user who is running the command.

    -U username

    Specifies the user name for the database owner account.

    -l logfilepath

    Specifies the full pathname of the upgrade log file. By default, the command creates the dbupgrade.log log file in the current directory.

  6. (Optional) : At the prompt, enter the password for the database owner account.

    You are prompted for this information only when you specify a username with the -U username argument to the DBUpgrade command.

Results

The command upgrades the database to the latest release.

DBUpgrade.exe

The following examples illustrate uses of command syntax.

  • DBUpgrade

    With no options, displays usage information.

  • DBUpgrade -S localhost	-d VCAC -E

    Upgrades the VCAC database in the default, unnamed SQL instance running on the local host on the default port 1433 and connects using your Windows credentials over a Windows Authentication trusted connection.

  • DBUpgrade -S dbhost.mydomain.local,5555 -d VCAC -E  

    Upgrades the VCAC database in the default, unnamed SQL instance running on dbhost on the non-default port 5555 and connects using your Windows credentials over a Windows Authentication trusted connection.

  • DBUpgrade -S dbhost.mydomain.local\MySQLinstance -d VCAC -U SqlUser -l	%SystemDrive%\VCACDBUpgrade\Log_30Apr.log

    Logs in as the user named SqlUser and prompts you for the password for the SqlUser account. Then, upgrades the VCAC database in the named instance MySQLinstance running on dbhost on the default port, and creates the Log_30Apr.log upgrade log file in the VCACDBUpgrade folder on the system drive.

  • DBUpgrade -S dbhost.mydomain.local,5555\MySQLinstance -d VCAC -E -l %SystemDrive
    %\VCACDBUpgrade\Log_30Apr.log

    Upgrades the database VCAC in the named instance MySQLinstance running on dbhost and the non-default port 5555, logs in using your Windows credentials over a Windows Authentication trusted connection, and creates the Log_30Apr.log upgrade log file in the VCACDBUpgrade folder on the system drive.