Install the Repository

The Repository (gtrep) is a database for storing  data. The Repository is necessary for TDM to function.
tdm49
The Repository (
gtrep
) is a database for storing
Test Data Manager
data. The Repository is necessary for TDM to function.
You can install the repository in one of the following ways:
We recommend that you use the repository installer utility to install the repository.
Use your
database
credentials to install the repository. Do not use your Windows credentials.
Use the Database Installer Utility to Install the Repository
The database installer utility provides an automated method for installing various
Test Data Manager
databases, including the repository. The utility is available in the repository installation kit that you download as a part of the product image.
  1. Download and extract the files in the repository installation kit.
  2. Open a command prompt, and navigate to
    \DB-install-kit-<
    version>
    \ca-tdm-db-install-kit
    .
  3. Run a command similar to the following examples using valid values for your database server:
    Microsoft SQL Server
    ca-tdm-db-installer install --dbname gtrep --dbms sqlserver --server mysqlserver.acme.com --dbmsuser sa --dbmspassword gtsecret123 --dbuser gtrep --dbpassword 12ABcd!%
    Oracle
    ca-tdm-db-installer install --dbname gtrep --dbms oracle --server myoracle.acme.com --dbmsuser system --dbmspassword gtsecret123 --servicename myoracle.acme.com --dbuser gtrep --dbpassword 12ABcd!%
    The tool installs the main repository database on the database server that you specify. In this example, it installs the database with a new user gtrep. The --force flag is not set, so if the database already exists, the tools fails and returns
    1
    . You can use the --testdb command to test for database existence first.
Database Installer Utility Command Line Syntax
The following parameters are available when you use the install action:
ca-tdm-db-installer install
  [--server server[\instance]]
  [--dbms
<oracle / sqlserver
>]
  [--dbmsuser name ] [--dbmspassword pw]
  [--dbname <name of db to install> ]
  [--dbuser name] [--dbpassword pw]
  [--force ]
  [--servicename <oracle service name>]  [--port n ]
  [--role <login role>] [--tnsname <tns name>]
  [? help]
server
Specifies the server name where you want to install the repository. If you omit this property, the installer uses the local host by default.
dbms
Specifies the database type for the repository.
Values:
oracle, sqlserver.
dbmsuser, dbmspassword
Specifies a user with administrative rights to access the database where you want to install the repository. If you omit this property, the installer attempts to log in to the database with the current user privileges.
Example:
If you configure Microsoft SQL Server to use Windows authentication while logged in as an administrator, the current user has the required privileges. Enter the password for this user in the dbmspassword property.
Unified login only works for Microsoft SQL Server and not Oracle.
For Oracle, verify that the specified
dbmsuser
has the following roles and privileges:
Roles
  • SELECT_CATALOG_ROLE
System privileges
  • ALTER ANY PROCEDURE
  • ALTER ANY TABLE
  • CREATE ANY INDEX
  • CREATE ANY PROCEDURE
  • CREATE ANY SEQUENCE
  • CREATE ANY TABLE
  • CREATE ANY VIEW
  • CREATE SESSION
  • CREATE USER
  • DROP USER
  • GRANT ANY PRIVILEGE
  • GRANT ANY ROLE
  • INSERT ANY TABLE
  • LOCK ANY TABLE
dbuser, dbpassword
Specifies the user name for the database to be created. Enter the password for this user in the dbpassword property. For Oracle, the dbuser user is usually the same as the database name, but need not be. In fact, several repositories may be installed under different user names.
Microsoft SQL Server and Oracle users differ as follows
  • In Microsoft SQL Server, a user is an independent entity which can access databases depending on permissions granted by the dba. For example, fred and jim are users and gtrep1 and gtrep2 are databases.
  • In Oracle, a user owns tables and other entities. Users and schemas are synonymous. For example, users fred and jim can both own separate repository tables.
dbname
Specifies the name of the directory in the kit that contains the repository, which also becomes the name of the TDM repository (the name of the repository folder in the kit is
gtrep
).
For SQL Server installations (i.e. where the value of --dbms is
sqlserver
), this value must be
gtrep
.
force
Drops and re-installs the database if the database already exists. Omit this property unless you upgrade or replace an existing repository.The force option must never be used to upgrade an existing repository because its purpose is to destroy the existing one and replace it. The installer does not support upgrade. Upgrade your repository through TDM Portal.
tnsname
(Oracle only) Specifies the tns name of the Oracle database. This is used as an alternative to server, service and port.
role
(Oracle only) Specifies the role that the Oracle user is to take. If the user logs as system then this can be omitted as system already has the necessary roles. If  the user logs as some other user, then specify --role sysdba.
servicename
(Oracle only) Specifies the target Oracle database service name.
port
Specifies the port for the target Oracle or Sqlserver database:
Default:
1521 (Oracle)
Default:
1433 (Microsoft SQL Server)
Install the Repository Manually
You can install the repository manually. To achieve this, you need to create the
gtrep database
, and the
gtrep user
for the gtrep database.
To make changes to a database, you must be logged in as an administrator (default:
sa
for SQL Server,
system
for Oracle)
Install the Repository Manually for Microsoft SQL Server
Prerequisites
Ensure that you have an installation of Microsoft SQL Server and that you have privileges to create the following items:
  • A database
  • Tables
  • Views
  • Functions
  • Procedures
  • Indexes
  • Primary and foreign keys
  • Constraints
Also ensure that you have access to Microsoft SQL Server Management Studio or Enterprise Manager. If you have fulfilled these conditions, you can create
gtrep
manually.
Installation
Complete the following steps to install the repository on a Microsoft SQL Server machine. You must be logged in as an administrator to complete these steps.
Follow these steps:
  1. Download and extract the files in the repository installation kit. For this example, we assume that the extracted files are in the directory
    C:\TDM\Repository Installer\
  2. Open Microsoft SQL Server Management Studio.
  3. Create the
    gtrep database
    1. Open the file
      C:\TDM\Repository Installer\ca-tdm-db-install-kit\sqlserver\gtrep\gtrep-schema.sql
      in Microsoft SQL Server Management Studio.
    2. Click
      Execute
      .
      The query creates the empty database
      gtrep
      .
  4. Create the
    gtrep user
    1. Open the file
      C:\TDM\Repository Installer\ca-tdm-db-install-kit\sqlserver\create-db-user.sql
      in Microsoft SQL Server Management Studio.
    2. Define the variables
      dbuser
      ,
      dbpassword
      and
      dbname
      .
      Variable
      dbname
      must be
      gtrep
      , to match the database created in Step 3. The recommended value for dbuser is also
      gtrep
      .
    3. Click
      Execute
      .
      The query creates the user
      gtrep
      for the database
      gtrep
      .
Other sample databases are available in the TDM file package you download. For information on how to install these databases, see Install sample databases.
Install the Repository Manually for Oracle
This section describes how to configure and install the repository on an Oracle database on a Windows or Linux system.
Prerequisites
Ensure that you have installed Oracle and SQL Plus (sqlplus), and that you have privileges to create the following items:
  • Databases
  • Tables
  • Views
  • Functions
  • Procedures
  • Indexes
  • Primary and foreign keys
  • Constraints
Windows-specific Requirements
A mismatch of Oracle versions is a common problem during the initial setup of the repository on Windows. Use the following steps to check for an Oracle instance installed on the path:
  • From a command prompt, issue the command PATH. Look for an existing Oracle in the path variable.
  • Issue a sqlplus command and see if you are prompted for a username and password.
  • Issue a tnsping command to see if you can ping an existing Oracle instance.
You must meet the following requirements for an Oracle Windows repository:
  • Test Data Manager
    requires a 32-bit client called Oracle Instant Client. This is provided with the product installation.
  • Modify the TNSNAMES.ORA file to include the databases that you plan to connect to. Alternatively, you can use EZConnect strings (//server:port/dbservice).
  • A 32-bit client is required for ODBC. The manager for this is located in %windir%\sysWOW64.
  • DB2 Connect on 64-bit sets up ODBC sources that do not work with
    Test Data Manager
    . These sources must be recreated with a unique name using %windir%\syswow64\odbcad32.exe, instead of %windir%\system32\odbcad32.exe. After you create the source,  move over all of the advanced settings.
  • In some cases, the sqlnet.ora file needs to be updated to work with the installation batch scripts. Locate and open the sqlnet.ora file in the oracle directory. Change the SQLNET.AUTHENTICATION_SERVICES = (NTS) to SQLNET.AUTHENTICATION_SERVICES = (NONE).
Installation (Windows and Linux)
Complete the following steps to install the repository on an Oracle (Windows or Linux) machine. You must be logged in as an administrator to complete these steps.
  1. Download and extract the files in the repository installation kit. For this example, we assume that the extracted files are in one of the following directories:
    • Windows:
      C:\TDM\Repository Installer\
    • Linux:
      \home\Repository Installer\
  2. Define the following parameters in the files
    \Repository Installer\ca-tdm-db-install-kit\oracle\create-db-user.sql
    and
    \Repository Installer\ca-tdm-db-install-kit\oracle\gtrep\gtrep-pre-config.sql
    :
    1. dbusername
      (recommended value:
      gtrep
      )
    2. dbpassword
  3. Perform the following operations from the Oracle SQL command line (sqlplus):
    1. To create the
      gtrep user
      , execute the file
      \Repository Installer\ca-tdm-db-install-kit\oracle\create-db-user.sql
    2. To create the
      gtrep database
      , execute the file
      \Repository Installer\ca-tdm-db-install-kit\oracle\gtrep\gtrep-pre-config.sql
      .
Other sample databases are available in the TDM file package you download. For information on how to install these databases, see Install sample databases.