New Data Driven Rule Dialog Box

This dialog box enables you to create a new rule connected to an external data source. This dialog box's wizard will ask you to select if your data source will be file-based (Microsoft Excel or CSV) or a relational database (Microsoft SQL Server, Oracle, PostgreSQL).

New Data Driven Rule - Excel

New Data Driven Rule - CSV

New Data Driven Rule - Database

To access
  1. In the Data Model Editor, select New Rule > Data Driven Rule.
  2. Select a data source type. Click Next.
  3. Select one of the following:

    • Create new data source
    • Use existing data source

    Click Next.

Important information

Creating a new data source: The Service Virtualization Designer creates new tables, structured according to the schema (message structure) associated with the virtual service. Rule columns are automatically bound to the table columns.

Using an existing data source: After you create the rule, you manually bind rule columns to table columns. After binding, the external data is imported to the Data Model.

Note for CSV files:

  • You can only use an existing data source when creating the data driven rule; creating a new data source is not available for a CSV file.

  • CSV does not support arrays or relationships between tables, since there is just one table in CSV which is the CSV file content.

  • When creating a data driven rule for a CSV file, you have to specify the delimiter. By default, the delimiter is a comma (,).

Relevant tasks
See also Data modeling

User interface elements are described below:

Database Connection String

UI Element Description
Connection String

A connection string in the appropriate format for the selected database type. See Sample Connection Strings.


How to handle the supplied credentials:

  • Save into credential store as new identity: Use a connection string with credentials that are not yet in the Credential Store.
  • Use existing identity: Select existing credentials from the Credential Store.
  • Use Windows integrated security: Connect to the database with your Windows credentials, which are not stored by SV. Note: Ensure that a standalone server is running with the appropriate account.
Test Connection

Checks if the Service Virtualization server can successfully connect to the database with the specified connection string.

Data Driving Properties

UI Element Description
Use Schema

The schema to use for both import and export. This is useful when you have a large database.

Table Prefix

For importing: The prefix of the tables that SV will allow you to use. This is useful when you have many tables and want to filter out some of them.

For exporting: The prefix of the tables that SV will export. SV considers any table with this prefix as a potential for export. The screen lists the number of existing tables that match the prefix.

Caution: Make sure that you do not have any unrelated tables with the prefix that you are specifying, as SV may overwrite them.

Data synchronization

For importing: Automatically import data from the external data source before each simulation.

For exporting: Export data to bound tables after each learning.

Read-Only Schema

For exporting: If the supplied credentials lack privileges to create or modify tables, this option lets you generate an SQL script that performs the necessary changes. You can run the SQL script with database administration credentials and then export the rule again.

Service Operations

The operations in your virtual service for which you want to import/export data.

By default, only the selected service's operations are used. To edit the list of operations, click Change and modify the list.

Sample Connection Strings

This following table shows sample connection strings for common databases.


Connection String


Microsoft SQL Server

Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;

Standard connection string, with explicit credentials

Microsoft SQL Server


Integrated security


Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;

Using tnsnames.ora


Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID))); User Id=myUsername;Password=myPassword;

Omitting tnsnames.ora


Server=;Port=5432;Database=myDataBase;User Id=myUsername; Password=myPassword;

Standard connection string, with explicit credentials

Back to top

See also: