Create a Database

Hide Topic ContentsShow Topic Contents
    1. Step 1: Edit files
    2. Step 2: Execute the Database Build Script
    3. Step 3: Verify the Build Process
    4. Step 4: Update to latest Schema
    5. Step 5: Modify Licensing Endpoint
    6. Using the Database

The Inspect Connectivity Kit must be installed before attempting to create a database.

The Connectivity Kit must have access to the database server wherever it is installed.

Specific database build procedures vary, depending on the tools used by the database administrator. This documentation provides only general procedures.

The following list outlines the required steps for the update:

Edit the InspectBuild.cmd script.

Execute the InspectBuild.cmd script in the command prompt.

Verify the build process.

Update to the latest database schema.

Modify licensing endpoint.

Step 1: Edit files

After installing the Connectivity Kit the build files can be found, by default, in the following directory:

C:\Program Files\Applied Tech Systems\Inspect\Connectivity Kit\Build

Use a text editor such as Notepad to edit InspectBuild.cmd. This is the main command file that calls the other SQL files to build the database.

The InspectBuild.cmd file is read only and must be unlocked before you can modify it.

Modify the following values:

set dbserver=<database server name>

set dbname=<database name>

set username=<server user name>

set password=<server password>

If using "sa" username ensure the password is modified to reflect the correct password of the database server.

The InspectBuild.cmd file executes several files using the Microsoft SQL Server OSQL utility.

Step 2: Execute the Database Build Script

  1. Open a Command Prompt as administrator.

  2. Locate the build directory.

  3. Execute InspectBuild.cmd.

If the user running the InspectBuild.cmd script is different from the user that ran the ATS Inspect installer, you might run into errors. For further information see here.

The InspectBuild.cmd script does the following:

Creates a subdirectory named \logs. If a \logs directory exists, it deletes all old *.err and *.out files from the logs subdirectory.

Retrieves the version number of the database and the time from the database.

Creates all database objects like Tables, Triggers, Stored Procedures, Indexes, Foreign Keys, etc.

Inserts default data and manages permission on all tables.

Runs the database verification script.

Step 3: Verify the Build Process

Check there are no *.err files in the logs directory.

Compare the counts in the VerifyDatabase.out file and make sure they match (each count should be duplicated).

If the counts value does not match, then review the *.out files and execute the appropriate steps to resolve the issue.

Step 4: Update to latest Schema

Now that the database has been created you must ensure that it is using the latest schema.

To determine your current database schema, login as the database owner and execute the following SQL statement in Microsoft SQL Server Manager Studio:

SELECT SCHEMA_MAJOR_VERSION, SCHEMA_MINOR_VERSION, SCHEMA_BUILD_NUMBER FROM GLOBAL_SETTINGS

The database version can also be found from the Cockpit program, under Management > Settings > Global.

If the database is not at the latest version you will need to update it. For information on how to do this see here.

Step 5: Modify Licensing Endpoint

In order for the database to access licenses the licensing endpoint may need to be modified.

Go to the global_settings table in the database and modify wcf_license_svc_endpoint.

The Licensing Service must be restarted if the endpoint is modified.

If you are using a Proxy server and client applications can't connect to the licensing server using the default http connection method the licensing endpoint should be changed to use net.tcp.
e.g. net.tcp://ServerIP:8001/ATSLicensingServer/

Using the Database

Two standard logins are created for a new database, as follows:

Username: inspect

Password: Quality2010

 

Username: ekutay

Password: Quality2010

 

Can we improve this topic?