13 Managing Files and Databases

This chapter describes the how to import and export files to and from the server, how to manage the Oracle Load Testing database, and how to select the database to use.

13.1 Database Management

The Oracle Load Testing database is used to store the results of your load test sessions. You use the Oracle Application Testing Suite Database Configuration to configure databases for use in Oracle Load Testing. The Databases option on the Manage menu in Oracle Load Testing is used to set the current database to use. The Database Manager dialog box has the following options:

Name - displays the ODBC System Data Source name of the database.

Description - displays a description of the database.

Type - displays the type of database.

Connection String - displays the connection string.

13.1.1 Adding an Oracle Database

To add an Oracle database:

  1. Use the Oracle Application Testing Suite Database Configuration utility to configure database connections to Oracle Load Testing databases. On Windows machines, you can access the Database Configuration utility from the Tools sub menu of the Oracle Application Testing Suite Start menu. On Linux machines, you can access the Database Configuration utility from <oats_install>/bin/DbConfig.sh.

  2. Select Oracle Load Testing.

  3. Click New.

  4. Select Use existing schema or Create new schema & tables.

    This dialog box has the following options:

    System user credentials - specify the login authentication credentials if you select to create a new schema and tables, as follows:

    • User name - enter the login user name for the database system.

    • Password - enter the login password for the database system.

    Connection details - enter the Oracle database connection information.

    • Name - enter the name of the database. This name appears in the Database selection lists for Oracle Load Testing and as the ODBC Data Source name.

    • Description - enter any description text to identify the database.

    • Host - enter the host name of the machine on which the database server is running.

    • Port - enter the port number that you want to communicate with. If you are running multiple instances of the database on the same host, specify the port number you want to communicate with.

    • SID - enter the System Identifier for the Oracle database.

    • User name - enter the login user name for the database.

    • Password - enter the login password for the database.

  5. Enter the database information.

  6. Click Save.

  7. If creating a new schema, enter the password for both the Administrator and default accounts and click OK.

  8. Click Close.

  9. Either restart the computer or restart the Oracle Application Testing Suite Application service by going to the Control Panel Administrative Tools and open Services and restart the Oracle Application Testing Suite Application Service.

13.1.2 Selecting the Database to Use

  1. Select Programs from the Start menu then select Oracle Application Testing Suite Database Configuration from the Oracle Application Testing Suite - Tools menu.

  2. Select Oracle Load Testing as the product type.

  3. Select the database you want to use to store Oracle Load Testing data.

  4. Click Set current.

  5. Click Close.

  6. Restart Oracle Load Testing.

13.1.3 Removing Databases

You can remove databases from Oracle Load Testing. Doing so does not delete the database files. It removes the database from the database selection lists so that the database is no longer available in Oracle Load Testing. The database cannot be deleted if it is open in Oracle Load Testing.

To remove a database from Oracle Load Testing:

  1. Select Programs from the Start menu then select Oracle Application Testing Suite Database Configuration from the Oracle Application Testing Suite - Tools menu.

  2. Select the database that you want to remove.

  3. Click Remove.

  4. Click Yes to confirm the deletion.

13.1.4 Updating Databases

You can change the name, location, and login information for databases that you are using in Oracle Load Testing.

  1. Select Programs from the Start menu then select Oracle Application Testing Suite Database Configuration from the Oracle Application Testing Suite - Tools menu.

  2. Select the database that you want to update.

  3. Click Update.

  4. Make any changes.

  5. Click OK.

13.1.5 Exporting and Importing Databases

Oracle Application Testing Suite Release 12.1+ supports Oracle Database 10g, 11g or XE 10g as the RDBMS for its load testing and test management components. Oracle Application Testing Suite Release 12.5+ supports Oracle Database 11g, 12c or XE 11g as the RDBMS for its load testing and test management components. In some cases, it may be necessary to transfer data between databases. The basic procedure to is to export a database dump from one database and then import the dump file into the new database. The following sections provide basic details for exporting and importing an Oracle XE database. See the Oracle Database Utilities documentation for additional information about using the original Export (exp) and Import (imp) utilities and the Data Pump Export (expdp) and Data Pump Import (impdp) utilities.

13.1.5.1 Exporting Databases Using Export Utility

The Database Export utility provides a way to transfer data objects between Oracle databases, even if the database reside on different platforms. Running the Export utility on an Oracle database extracts objects (such as tables) with all related objects (such as indexes, comments, and grants), if any. The extracted data is written to an Export file.

To export a database using the export utility:

  1. Open a command prompt.

  2. Change directory to Oracle home. For example, C:\OracleATS\oxe\app\oracle\product\10.2.0\server\BIN

  3. Enter the following command:

    exp userid=username/password owner=schema name file=Exportfile.dmp log=Export.log
    

    where:

    userid= specifies the username/password of the user performing the export.

    owner= specifies the schema name to export ("oats", "olt", "otm").

    file= specifies the file name to which the schema will be exported.

    log= specifies the log file name to save any warnings or errors that may have occurred during export.

    For additional parameter information, type exp help=y at the command prompt.

    Example:

    exp userid=system/oracle owner=olt file=olt.dmp log=olt.log statistics=none
    

13.1.5.2 Importing Databases Using Import Utility

The Import utility reads the object definitions and table data from an Export dump file and inserts the data objects into an Oracle database.

To import a database from an exported dump file:

  1. Open Sql Plus and create a user (for example, Test) and grant roles (connect, resource, create any view) to the newly created user.

    • create user Test identified by password;

    • grant connect, resource, create any view to Test;

  2. Open a command prompt.

  3. Change directory to Oracle home. For example, C:\OracleATS\oxe\app\oracle\product\10.2.0\server\BIN

  4. Enter the following command.

    imp userid=user/pwd fromuser=OATS touser=Test file=Exportfile.dmp log=test.log
    

    where:

    userid= specifies the username/password of the user performing the import.

    fromuser= specifies a list of owner usernames. This parameter enables you to import a subset of schemas from an export file containing multiple schemas.

    touser= specifies a list of usernames whose schemas will be targets for import.

    file= specifies the name of the exported dump file. For example, Exportfile.dmp.

    log= specifies the log file name to save any warnings or errors that may have occurred during import.

    For additional parameter information, type imp help=y at the command prompt.

    Example:

    imp userid=system/oracle fromuser=olt touser=tempuser file=olt.dmp log=t.log
    
  5. Add the new database to the Oracle Application Testing Suite using the Oracle Application Testing Suite Database Configuration utility. See Section 13.1.1, "Adding an Oracle Database" for additional information.

13.1.5.3 Importing Databases Using Data Pump Import Utility

In cases where the database was exported using the Data Pump Export (expdp) utility, you use the Data Pump Import (impdp) utility to import the database.

To import a database from a Data Pump Export utility:

  1. Create a folder. (for example c:\test)

  2. Open Sql Plus and enter the following command:

    SQL> create directory test as '/backup/db_name/exports/dpump' ;
    
  3. Grant read and write permissions to the users who will be performing the data pump import. Note: before granting following permission please log in as sys as sysdba (different user than logged in user and should be logged in as dba)

    SQL> grant read, write on directory test to system, user1, user2, user3; 
    
  4. Open a command prompt.

  5. Change directory to Oracle home. For example, C:\OracleATS\oxe\app\oracle\product\10.2.0\server\BIN

  6. Enter the following command:

    impdp system/<Password> DIRECTORY=<dir name> DUMPFILE=<dmpfile.dmp> LOGFILE=<logfilename.log> remap_schema=<source_schema>:<target_schema>
    

    For additional parameter information, type impdp help=y at the command prompt.

    Example:

    impdp system/oracle DIRECTORY=test DUMPFILE=expdp_Exportfile.dmp LOGFILE=impfull.log remap_schema=oats:oats
    

13.2 Importing and Exporting Data Bank Files

You can import and export Data Bank files (.csv) to and from the Oracle Load Testing server and the local machine. This can be useful if you are accessing Oracle Load Testing on a remote machine via the Web UI and want to copy data files to another server.

To export Data Bank files from the server to the local machine:

  1. Select Options from the User menu.

  2. Select Data Bank in the Manage group.

  3. Select the Data Bank file (.csv) file that you want to export.

  4. Click Export.

  5. Click Save As.

  6. Select the location where you want to save the file and click Save.

To import Data Bank files from the local machine to the server:

  1. Select Options from the User menu.

  2. Select Data Bank in the Manage group.

  3. Click Import Data Bank.

  4. Enter the file name or click Browse to locate the file.

  5. Select the destination location from which you want to copy the file.

  6. Click Open.Click Upload.

13.3 Importing and Exporting Data Files

You can import and export Download Manager data files (.dat) to and from the Oracle Load Testing server and the local machine. This can be useful if you are accessing Oracle Load Testing on a remote machine via the Web UI and want to copy data files to another server.

To export data files from the server to the local machine:

  1. Select Options from the User menu.

  2. Select Data File in the Manage group.

  3. Select the data file (.dat) file that you want to export.

  4. Click Export.

  5. Click Save As.

  6. Select the location where you want to save the file and click Save.

To import data files from the local machine to the server:

  1. Select Options from the User menu.

  2. Select Data File in the Manage group.

  3. Click Import Data File.

  4. Enter the file name or click Browse to locate the file.

  5. Select the destination location from which you want to copy the file.

  6. Click Open.Click Upload.

13.4 Using the Reset Password Utility

The Reset Password utility allows the installing user of the Oracle Application Testing Suite web applications to reset the password for the Administrator account in an Oracle Load Testing or Oracle Test Manager database.

The installing user of the Oracle Application Testing Suite can reset the password for:

  • Oracle Load Testing Administrator user

  • Oracle Test Manager Administrator user

The default Administrator user password is the password specified during the Oracle Application Testing Suite installation.

See the Oracle Application Testing Suite Installation Guide for additional information about using the Reset Password utility.