Home vRealize Automation 6.1 (formally vCAC) – Scripted IaaS Database
Post
Cancel

vRealize Automation 6.1 (formally vCAC) – Scripted IaaS Database

Recently we discussed how to setup the IaaS database. Did you know there are scripts available to do the IaaS database install? There is a catch to using the scripts to pre-create the IaaS database, anyone? anyone? A pre-created IaaS database will only work with the custom install (distributed) for the IaaS Server. This supports the two scripted methods, but more on that later.

The complete (simple) install will not allow the IaaS installer to continue if the database already exists. The only options are deleting the existing database or creating a new one. This setup may work in a lab environment and maybe if you work in a small shop. Let’s face it a good database administrator (DBA) on staff is not going to hand over sysadmin rights. The scripts help by allowing the DBA to assess the database deployment. Also allowing the DBA to pre-create the database, removes the need for sysadmin rights in most cases.

The two scripted methods for the IaaS database are manual and empty. Manual script uses a batch file to create the database, tables and schema. Did I mention the manual scripted install requires sysadmin rights? Empty script creates an empty database, but relies on the IaaS installer to populate. Here are the steps when using either scripted method.

Scripts Location

Typically the SQL scripts can be found in the install guide, but that not the case with vRealize Automation. There are two ways to download the database installation scripts, both requiring the vRA appliance:

  1. The IaaS Install tab from the vRA appliance directly.
  2. Navigating to https://vRA Appliance FQDN:5480/i

Manual IaaS Database Scripted Method

Before starting: Java 1.7 or higher needs to be installed & environment variable for JAVA_HOME must be created.

  1. Download the database installation scripts (DBInstall.zip).
  2. Navigate to the directory where you downloaded the installation scripts zip file.
  3. Extract the DBInstall.zip.
  4. Log in to the SQL server with sufficient rights to create and drop databases, sysadmin privileges are needed within the SQL server instance.
  5. Open a Windows command prompt with administrator rights.
  6. Navigate to DBInstall directory.
  7. Run the following command making the necessary variable changes (variable definitions below). Database Name only requires instance if changed from the default MSSQLSERVER
    Note: Brackets around the database log directory “[log dir]” in the original script are not needed.

BuildDB.bat /p:DBServer=db_server; DBName=db_name;DBDir=db_dir; LogDir=log_dir;ServiceUser=service_user; ReportLogin=web_user

Initial Setup

Results

Empty IaaS Database Scripted Method

  1. Download the database installation scripts (DBInstall.zip).
  2. Navigate to the directory where you downloaded the installation scripts zip file.
  3. Extract the DBInstall.zip.
  4. Log in to the SQL server with sufficient rights to create and drop databases, sysadmin privileges are needed within the SQL server instance.
  5. Locate the CreateDatabase.sql file within the extracted DBInstall directory.
  6. Edit the file using a text editor or SQL Server Management Studio and make the following edits:
  7. Comment out the On Error exit, this is not a SQL command
  8. Replace all the variables with your values ( DB Name, SQL Data Directory, SQL Log Directory)

  9. Save the file (if using another editor) and open in SQL Server Management Studio.
  10. Click Execute.

This post is licensed under CC BY 4.0 by the author.