Database configuration

Each Designer and Server installation requires its own dedicated database that is not shared with any other Designer or Server. If multiple Service Virtualization instances use the same database, data loss and unexpected behavior may occur.

For currently supported databases, see Support Matrix.

Windows installer UI

This section describes how to setup the database when installing Service Virtualization Designer and the Service Virtualization Server.

In the installation wizard, select the Database configuration option and enter the required values. If the database does not exist, the installation wizard creates it with the name you specify.

  • Name Description
    Database Type

    Select the MS SQL Server, Oracle, or PostgreSQL database.

    If you are upgrading: Custom functions are executed directly on the database layer. If your existing virtual services contain custom functions, changing the database provider can render them non-functional.

    For more information, see Define Custom Functions.

    Data Source

    The data source part of the connection string.

    Basic syntax:

    MSSQL: server\instance,port
    Oracle:

    host/servicename, host:port/servicename, or host/servicename:port

    This works for SERVICE_NAME and not for SID. If you want to connect using SID, see Configuration examples.

    PostgreSQL: server
    Default: localhost\SQLExpress_SV
      Note:
    • If you are working with the full SQL Server version, you can exclude the instance name to use the default instance.

    • If you are working with SQL Server Express, you must specify the exact database instance name.

    • If you are working with Oracle and have problems connecting, you can use SQLPlus to verify if you are able to connect to the Oracle database by opening a command window and typing: sqlplus user/pwd@server:port/serviceName
    • If you are working with PostgreSQL and have problems connecting, use the psql utility or the pgAdmin GUI tool to verify your credentials.

    Database Name

    The database name.

    For MS SQL Server or PostgreSQL only.

    Properties

    Optional: Additional database connection properties. The properties you specify are appended to the connection string after the server and instance parameters.

    For example:

    • Use Encrypt='true' to use an SSL connection to the database server.
    • Use Proxy User Id=pUserId;Proxy Password=pPassword to specify proxy authentication for connection to an Oracle server.
    Create

    For MS SQL Server or PostgreSQL only.

    If the Create option is selected:

    • Creates the database during product installation.
    • Recreates the database if it already exists.
    • Removes the database when the product is uninstalled.

    If you clear the Create checkbox:

    • Uses the existing database.
    • Drops all user objects in the specified database to prepare a clean database for the application.

    Note:  

    • For Service Virtualization Server: To maintain your data, make sure to run the Backup and Restore options provided by Service Virtualization.

      • During Server upgrade: The Backup and Restore options are provided later in this installation wizard.
      • During Server reinstall: Manually run the Backup and Restore options described in Server backup and restore.
    • To install the product successfully, the database user must have the proper privileges.

      • If you select the option to create the database automatically during installation, the database user must have sufficient privileges to create the database—the SQL server roles dbcreator and public, and the database role db_owner.
      • For the PostgreSQL database, the CREATEDB role is required.
      • If you are using an existing database, the database user must have sufficient privileges to create the database schema—the SQL server role public and the database role db_owner.
    Authentication The database server authentication type.
    User

    The database server authentication user.

    For SQL authentication only.

    Password

    The database server authentication password.

    For SQL authentication only.

    Test Connection Tests the database connection.
    Connection String View or modify the complete database connection string.
  • Back to top

    Linux database configuration

    For details, see Setting database configuration from the command line below.

    Back to top

    Setting database configuration from the command line

    Changing database configuration properties

    You can change the values for all database properties that were specified while installing Server or Designer. For example, you can change the data source and authentication.

    Note: The following section is relevant for both Windows and Linux installations.

    To modify database configuration properties:

    Run ConfigTool.exe db-setProperties command, followed by the properties to modify.

    ConfigTool.exe db-setProperties ["server"|"designer"] [dbType] [datasource] [properties] [dbName] ["WinAuth"|"SqlAuth"] ?[username] ?[password]

    where: ["server"|"designer"] specifies the configuration to change (select one). The remaining items are described in Database configuration.

    Example 1. The following example updates the Server database properties to an Oracle database that uses SQL authentication with the specified user name and password.

    ConfigTool.exe db-setProperties server oracle myoracle.mycompany.net/db1 "" "" SqlAuth MyName MyPassword

    Example 2. The following example updates the Designer database properties to a local MS SQL database instance named my_designer that uses Windows authentication.

    ConfigTool.exe db-setProperties designer mssql localhost\SQLExpress_SV "" "my_designer" WinAuth

    Back to top

    Configuration examples

    This section provides examples of connection strings for connecting to a database.

    Back to top