Defining a JDBC Data Profile

Restriction: This topic applies to Windows environments only.

A data profile is a set of property values defined in one location and referred to, as often as required, by a single profile name. Using property values from a data profile enables you to keep the URL short. This is convenient for development environments where you are required to retype the URL. If you are developing multiple applications, you can use data profiles to centralize your data configurations on one XDB Server and perform all of your maintenance in a single location.

Defining a data profile is optional. You can also set property values in the URL or in a Properties Object, depending on which overload for the DriverManager.getConnection method you use. See the section Overloads for the DriverManager.getConnection Method for more information.

You define a data profile by adding a set of entries to the SYSXDB.SYSPROFILES table in the SYSTEM location of your XDB Server. Each entry in the SYSXDB.SYSPROFILES table defines a profile property. The following data connection properties are available:

You can use the SQL Wizard to alter the SYSXDB.SYSPROFILES table. For instructions on how to alter tables, see the topic Altering a Table in your SQL Wizard Online Reference. To define your data profile:

  1. Choose a name for the data profile. The maximum name length is 32 characters.

    Make sure that you enter the name consistently for each entry you add to the table. The profile name in the table must be the same as the one you specify in the URL when you call the getConnection method.

  2. Add an entry for the location property. Set its value to the name of the XDB Server location where your applet or application will first log on when it is executed.

    A minimal profile definition could consist of just a location entry. All other profile properties have default values.

  3. Add an entry for the canoverride property. Set its value to "No" if you do not want to be able to override the property associated with this profile.

    Ignore this property or set its value to "Yes" if you want to be able to override these values in the URL or in a Properties Object.

  4. Add an entry for the default property, if you want this data profile to be the default profile.

    You do not need to specify a value for the default property.

Note:

Do not add the prefix mf. to any of the properties defined in a data profile.

You can prevent a specific profile from being overridden by setting its canoverride property value to "No" and ensuring that the default property is also present. If you specify multiple profiles, make sure that all canoverride values are set to "No". For example:

Profile Name Property name Property Value
DEF location PASSTHRU
DEF canoverrride no
DEF default yes

If you add a second profile and leave its canoverride value set to "Yes" (the default), it will defeat the purpose of the first profile. In the following example, a user could specify the ALT profile and successfully override the data connection properties of the DEF profile in the URL:

Profile Name Property name Property Value
DEF location PASSTHRU
DEF canoverrride no
DEF default yes
ALT location ALTERNATE
ALT canoverride yes