AAI Database Commands

As an AAI administrator or in-house developer, you can use the Configuration Tool CLI to configure the AAI database. The config folder located in your AAI installation directory contains the scripts required to run configuration commands: run.bat for Windows and run.sh for Linux. You can run the scripts and add the parameters and attributes described in this page to configure your AAI database.

These definitions are the same as those that you otherwise define on the Database tab of the AAI Configuration Tool. For more information, see Configuration Tool - Database Tab.

Note:

This function does not support authenticating with user name and password.

This page includes the following:

Syntax and Usage

The AAI database commands use a multipart structure, consisting of the following elements:

  • an action specifying the operation to be executed

    In this case, the action remains dbconfig since the only purpose is to configure the AAI database.

  • options (parameters) and arguments, which can be specified in any order

Example

dbconfig -d <arg> -h <arg> -p <arg> -n <arg> -k -f <arg> [-c | -r <arg>]

The parameters available for this function can be specified in short form (starting with a single dash -) or in long form (starting with a double dash --), for example, -h, --host or -p, --port.

Some parameters have their own arguments, which must be specified right after the option, for example, -d <arg>, --dbms <arg>. Others have no argument and work as a flag, for example, -k, --kerberos.

Parameters

These are the parameters available for the AAI database configuration commands:

  • -d,--dbms <arg>

    DBMS name. Either Oracle or SQL Server

  • -h,--host <arg>

    Database host name or IP address

  • -p,--port <arg>

    Database's TCP port

  • -n,--dbname <arg>

    Database's unique name

  • -k,--kerberos

    Indicates this is a Kerberos connection

  • -f,--filepath <arg>

    Fully Qualified File Name for the authentication file (Kerberos only)

  • -c,--usecache

    The filepath is a cache credential file (Kerberos only)

  • -r,--principal <arg>

    Principal for keytab file (Kerberos only)

Optionally, you can also use the following parameters to add Java VM arguments:

  • -Djava.security.krb5.conf=<arg>

    Specify the krb5.conf

  • -Daai.installation.dir=<arg>

    Specify the AAI installation folder

Examples

The following examples show scripts used on a Linux Server to configure an AAI Oracle database using Kerberos authentication, once with a keytab file and once with cached credentials.

  • Keytab file

    ./run.sh dbconfig --dbms Oracle --host <hostname or IP> --port <port number> --dbname aaipdb --kerberos --principal aai --filepath /opt/aai/aai.keytab

  • Cached credentials

    ./run.sh dbconfig --dbms Oracle --host <hostname or IP> --port <port number> --dbname aaipdb --kerberos --filepath /opt/aai/krb5cc --usecache

On a Windows server, replace run.sh with run.bat.

See also:

Configuration Tool Command Line Interface