Install Sample Databases

 file packages include sample databases creditcard, orders, travel and scramble, which you can use to experiment with TDM's functionality, and which are necessary for some worked examples in the documentation. This page explains how to restore these databases from backup files.
tdm49
 
Test Data Manager
 file packages include sample databases 
creditcard
,
 orders
travel 
and
 scramble
, which you can use to experiment with TDM's functionality, and which are necessary for some worked examples in the documentation. This page explains how to restore these databases from backup files.
 
 
Install sample databases in Microsoft SQL Server
Prerequisites
Before you start, ensure that you have an installed 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.
Restore a sample database
To install a sample database (i.e. to Restore a database from a backup file), 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 
    C:\TDM\Repository Installer\
    Each database's backup files are in their own subdirectory under 
    C:\TDM\Repository Installer\
     
    SQL_Server_Install_Kit\Databases\
     
  2. For the database you want to install (for example, 
    Credit_Card
    ), navigate to the relevant directory (for example, 
    C:\TDM\Repository Installer\
     
    SQL_Server_Install_Kit\Databases\
     
    Credit_Card
    ).
  3. Copy the .bak file for that database (for example, 
    creditcard.bak
    ), to your SQL Server file system backup directory, which by default is:
    C:\Program Files\Microsoft SQL Server\MSSQL<version>.MSSQLSERVER\MSSQL\Backup
     
  4. Open Microsoft SQL Server Management Studio.
  5. In the 
    Object Explorer
     pane, right-click 
    Databases
     and select 
    Restore Database
    .
    The 
    Restore Database
     dialog opens.
  6. Under the 
    Source
     section, select 
    Device
    , and click the '
    ...
    ' button to the right of the field.
    The 
    Select backup devices
     dialog opens.
  7. From the 
    Backup media type
     drop-down, select 
    File
    .
  8. Click 
    Add
    .
    The 
    Locate Backup File - <server_name>
     dialog opens. By default, it opens in the directory where you coped the .bak file in step 3 (i.e. 
    C:\Program Files\Microsoft SQL Server\MSSQL<version>.MSSQLSERVER\MSSQL\Backup
    ).
  9. Click 
    OK
    .
    The dialog closes.
  10. Select the database you want to restore, from the 
    Database
     drop-down under 
    Device
     (in the 
    Source
     section).
  11. Select the database into which you want to restore the backup, from the 
    Database
     drop-down in the 
    Destination
     section.
  12. Check that the 
    Restore
     check-box (next to the database name, in the 
    Restore plan section
    ) is checked.
  13. Click 
    OK
    .
    SQL Server Management Studio restores the selected database. The database appears in the 
    Object Explorer
     pane, under
     Databases
    .
  14. Return to the backup directory (for example, 
    C:\TDM\Repository Installer\
     
    SQL_Server_Install_Kit\Databases\
     
    Credit_Card
    ), and run the <database>_user.sql script (for example 
    creditcard_user.sql
    ) in SQL Server Management Studio.
Install sample databases in Oracle
Install sample databases in Oracle on Windows
Prerequisites
Before you start, ensure that you have an installed Oracle, SQL Plus (
sqlplus
), and Data Pump Import (
impdp
) and that you have privileges to create the following items:
  • A database
  • Tables
  • Views
  • Functions
  • Procedures
  • Indexes
  • Primary and foreign keys 
  • Constraints
Restore a sample database
To install a sample database (i.e. to Restore a database from a backup file), 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 
    C:\TDM\Repository Installer\
    Each database's backup files are in their own subdirectory under 
    C:\TDM\Repository 
     
    Installer\Oracle_Install_Kit\Databases\
     
  2. For the database you want to install (for example, 
    Credit_Card
    ), navigate to the relevant directory (for example, 
    C:\TDM\Repository Installer\
     
    Oracle_Install_Kit\Databases\
     
    Credit_Card).
     
  3. In the file 
    <database_name>.bat
     (for example, 
    creditcard.bat
    ), change the following variables if necessary:
    •  
      GT_SYS_USER
      Specifies the system user for the Oracle instance.
    •  
      GT_SYS_PASSWORD
      Specifies the password for the Oracle system user.
    •  
      GT_TNS
      Specifies the TNS alias for the target database.
  4. Run the 
    <database_name>.bat
     file.
    The batch file creates the database in your Oracle instance.
Install sample databases in Oracle on Linux with Docker
To install sample databases on an Oracle database, use the Sample Database Creation Tool, part of the TDM Portal Tools container for Docker. This requires the use of Docker for Linux.