Install the Repository
The Repository (gtrep) is a database for storing data. The Repository is necessary for TDM to function.
The Repository (
gtrep) is a database for storing
Test Data Managerdata. The Repository is necessary for TDM to function.
You can install the repository in one of the following ways:
- Use the repository installer utility.
- Use native database management capabilities.
- (Oracle on Linux only) Use the TDM Portal Tools container in Docker.
We recommend that you use the repository installer utility to install the repository.
databasecredentials 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 Managerdatabases, including the repository. The utility is available in the repository installation kit that you download as a part of the product image.
- Download and extract the files in the repository installation kit.
- Open a command prompt, and navigate to\DB-install-kit-<version>\ca-tdm-db-install-kit.
- Run a command similar to the following examples using valid values for your database server:Microsoft SQL Serverca-tdm-db-installer install --dbname gtrep --dbms sqlserver --server mysqlserver.acme.com --dbmsuser sa --dbmspassword gtsecret123 --dbuser gtrep --dbpassword 12ABcd!%Oracleca-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 returns1. 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:
<oracle / sqlserver>]
[--dbmsuser name ] [--dbmspassword pw]
[--dbname <name of db to install> ]
[--dbuser name] [--dbpassword pw]
[--servicename <oracle service name>] [--port n ]
[--role <login role>] [--tnsname <tns name>]
Specifies the server name where you want to install the repository. If you omit this property, the installer uses the local host by default.
Specifies the database type for the repository.
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
dbmsuserhas the following roles and 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
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.
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
For SQL Server installations (i.e. where the value of --dbms is
sqlserver), this value must be
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.
(Oracle only) Specifies the tns name of the Oracle database. This is used as an alternative to server, service and port.
(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.
(Oracle only) Specifies the target Oracle database service name.
Specifies the port for the target Oracle or Sqlserver database:
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 userfor the gtrep database.
To make changes to a database, you must be logged in as an administrator (default:
safor SQL Server,
Install the Repository Manually for Microsoft SQL Server
Ensure that you have an installation of Microsoft SQL Server and that you have privileges to create the following items:
- A database
- Primary and foreign keys
Also ensure that you have access to Microsoft SQL Server Management Studio or Enterprise Manager. If you have fulfilled these conditions, you can create
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:
- Download and extract the files in the repository installation kit. For this example, we assume that the extracted files are in the directoryC:\TDM\Repository Installer\
- Open Microsoft SQL Server Management Studio.
- Create thegtrep database
- Open the fileC:\TDM\Repository Installer\ca-tdm-db-install-kit\sqlserver\gtrep\gtrep-schema.sqlin Microsoft SQL Server Management Studio.
- ClickExecute.The query creates the empty databasegtrep.
- Create thegtrep user
- Open the fileC:\TDM\Repository Installer\ca-tdm-db-install-kit\sqlserver\create-db-user.sqlin Microsoft SQL Server Management Studio.
- Define the variablesdbuser,dbpasswordanddbname.Variabledbnamemust begtrep, to match the database created in Step 3. The recommended value for dbuser is alsogtrep.
- ClickExecute.The query creates the usergtrepfor the databasegtrep.
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.
Ensure that you have installed Oracle and SQL Plus (sqlplus), and that you have privileges to create the following items:
- Primary and foreign keys
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 Managerrequires 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 withTest 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.
- 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\
- Define the following parameters in the files\Repository Installer\ca-tdm-db-install-kit\oracle\create-db-user.sqland\Repository Installer\ca-tdm-db-install-kit\oracle\gtrep\gtrep-pre-config.sql:
- dbusername(recommended value:gtrep)
- Perform the following operations from the Oracle SQL command line (sqlplus):
- To create thegtrep user, execute the file\Repository Installer\ca-tdm-db-install-kit\oracle\create-db-user.sql
- To create thegtrep database, execute the file\Repository Installer\ca-tdm-db-install-kit\oracle\gtrep\gtrep-pre-config.sql.