Setting up a Database

Before you can use PAtools to create tests, you must set up a database to store your tests.

Adding a New SQL Database on a Windows Machine

To add a new SQL database on a Windows machine, refer to Create a database.

When you add a new SQL database, the database is empty. In this case, you must configure the empty database.

Restoring a Database Backup

To set up an existing database on a SQL Server, use PAexpress to restore a database backup.

You can restore a database backup that you were given. Alternatively, PAtools includes a default database backup that you can use to start a new project. The default database backup is in the PAtools application folder.

Before restoring a database backup, set up the SQL Server. Refer to Setting up the SQL Server for more information.
Note Restoring a database using PAexpress requires that the machine running PAexpress has network access rights to update and backup databases on the SQL Server. Check with your IT department if you are unsure about access rights on your machine.
Note You can only use PAexpress if the SQL Server is running on Windows or a Windows Server. If you are unable to get network access or if the SQL Server is set up in a cloud server, you can restore the database using SQL Server Management Studio.
  1. Copy the database backup file to the machine where you installed the SQL Server.
    If you are restoring the default database backup that is installed with PAtools, copy PAtools_DB.bak from C:\Program Files (x86)\National Instruments\PAtools <version>\DB\PAexpress\Dbs
  2. Open PAexpress.
  3. Click the folder icon next to the Server field.
    A Connecting to SQL Server window appears.
    Note If you cannot connect to the database, verify with your IT department that you have access rights to connect and restore the database.
  4. In the Connecting to SQL Server window, enter or select your Database server.
  5. Click OK.
    Note If you cannot connect to the SQL Server using PAexpress, verify with your IT department that you have the required access rights to restore a database backup.
    The SQL Server appears in the left pane of PAexpress.
  6. Click Restore database.
  7. In the Select backup file field, click ... next to the Filename field and select the database backup file that you copied to the machine with the SQL Server.
    The Restore options section automatically populates with information about the database.
  8. Optional: In the Database name field, rename the restored database.
  9. Click Restore.
    A popup confirms successful restoration of the database.
  10. Use PAconfigurator to ensure the appropriate PAtools users have administrator rights for the database.
    Refer to Manage Users for more information.
You can validate the new database by refreshing the SQL Server in SQL Server Management Studio.

Importing a Database Module

Use PAconfigurator to import database modules.

If you were given a database module that you want to import to PAtools, complete the following steps.
  1. Open PAconfigurator.
  2. Click Development.
  3. Right-click the location where you want to import a database module and select Import.
    For example, import a database module to Application Components.
  4. Select the database module that you want to import.