PrizmDoc Viewer v13.20 Release - Updated
Developer Guide / PAS / Set up Your Database for use with PAS
In This Topic
    Set up Your Database for use with PAS
    In This Topic

    Introduction

    This topic covers how to set up your database for use with PAS. For information on configuring PAS to communicate with your database, see the PAS Configuration section in the help file.

    Creating the required database tables

    Some databases, like Microsoft SQL Server, require that the tables be created before PAS can use them. This is a manual step.

    The easiest way to create the tables is to run the scripts available as part of PAS:

    On Windows:

    cd C:\Prizm\pas\db
    createtables.cmd
    
    

    On Linux:

    cd /usr/share/prizm/pas/db
    ./createtables.sh
    
    

    This will create the required tables in the database that is configured through the PAS configuration file. If you need to change any of the configuration temporarily when running these scripts (such as using a different user that has the required privileges to create tables), you can specify any of the database.* properties from the PAS configuration file as command line flags, as such:

    createtables.cmd --user=createTablesUser --password=Pa55w0rd
    
    
    ./createtables.sh --user=createTablesUser --password=Pa55w0rd
    
    

    NOTE: The create tables script should be run when upgrading PAS as well. This will update the database schema without modifying any data already stored in the database.

    Advanced use

    For advanced database administrators, you may want to inspect and manually run the SQL scripts to create tables. You can use this by adding the --export-scripts flag to the above commands, as such (the commands below work on both Windows and Linux using the appropriate script):

    ./createtables.sh --export-scripts --filepath=/path/to/script.sql
    
    

    When running this command, the configured database will not be changed, and the script will be saved to the output file specified. These SQL scripts can be found:

    On Windows:

    C:\Prizm\pas\db\mssql-scripts
    C:\Prizm\pas\db\mysql-scripts
    
    

    On Linux:

    /usr/share/prizm/pas/db/mssql-scripts
    /usr/share/prizm/pas/db/mysql-scripts