Database Table (legacy)

Overview

This wiki page refers to bundle version 1.2.X. For newer versions, check this page.

The Database Table connector is designed to manage users stored in a single database table that uses any relational database with an SQL92 standard compliant JDBC driver.

Supported Resource Versions

  • DB2 Express 9.5 installation
  • MySQL 4.1 - GA release
  • MySQL 5.0 - GA release
  • MySQL 5.1 - GA release
  • Oracle 10g Express
  • SQL Server 2008 Express

Installation

Follow these steps to run the stand-alone connector server:

  1. Download the connector server jar file and store it in the connector server directory (any directory).
  2. Download the Database Table connector jar file and store it in the bundles subdirectory.
  3. Add the resource-related third-party JDBC driver jar file to the lib directory.
  4. Start the connector server. For more information, see Connector Servers?.

Supported operations

  • Authenticate (Optional) Specify the password column configuration property.
  • Create
  • Delete
  • Update
  • Search
  • Schema
  • Test
  • Sync (Optional) Specify the Change Log Column configuration property.

Configuration

You must include the mandatory driver name configuration parameter as part of the configuration. The connector uses the existence of a driver on the classpath to validate the configuration.

Configuration methods

You can use one of the following methods to connect the JDBC driver to the resource:

    1. Provide the user, password, host, port, and database name configuration properties.
The mandatory URL Template can contain wild cards such as %h, %p, and %d|%h, %p, and %d. These wild cards will be replaced by provided values such as host, port, and database. If the URL Template contains any of these wild cards, the connector considers the host, port, and database name to be required configuration properties and they are used accordingly.
    1. Provide the user and password configuration properties and an exact URL Template with a JDBC connection URL (no wild-cards).
    2. Provide a datasource name and the optional JNDI properties.
While the datasource name with JNDI properties is sufficient to connect to the resource, the configuration properties mentioned in the previous two methods will not be considered.

See Supported Resource Versions to review the list of resource versions that have been tested with this connector.

The Database Table connector manages users that are located in a single, custom database table. The database table name is a part of the required configuration. The Database Table connector also uses a required keyColumn name configuration property to store the account's names within the custom table.

You can configure the optional passwordColumn name to activate the authentication capabilities. The adapter also supports Active Sync to poll for account changes. To allow Active Sync capabilities, specify the changeLogColumn.

See Configuration Properties for more information about additional optional connector capabilities.

Configuration Properties

The following table describes all of the properties that you can specify for the configuration:

 

Configuration PropertyTypeRequired (Driver)Required (Datasource)Definition
JDBC DriverString



The JDBC Driver class name.
  • Oracle is oracle.jdbc.driver.OracleDriver?.
  • MySQL is org.gjt.mm.mysql.Driver.
JDBC URL TemplateString

(%h,%p, and %d)
 The JDBC connection URL Template with %h, %p, and %d wild-cards.
  • Oracle template is jdbc:oracle:thin:@%h:%p:%d.
  • MySQL template is jdbc:mysql://%h:%p/%d. For more information, consult your JDBC driver documentation.
HostStringwhen %h Resource host. Used in place of the %h wild card in the URL Template.
PortStringwhen %p Resource port. Used in place of the %p wild card in the URL Template.
DatabaseStringwhen %d Resource database. Used in place of the %d wild card in the URL template.
UserString

 Name of the resource admin user with rights to do SELECT, INSERT, UPDATE, or DELETE.
PasswordString

 Resource admin user's password.
Data-sourceString XDatasource name for datasource-managed connections.
JNDI PropertiesString  Optional naming of datasource look-up properties.
TableString



Name of the single table where the accounts are stored.
Key ColumnString



Name of the column where the account's names are stored.
Password ColumnString  Optional name of the password column where the account's passwords are stored.
Change Log ColumnString  Optional name of the column where the last update-related, non-decreasing, value is stored. This value can be a number or a timestamp value.
QuotingString  Column quoting property (such as None, Single, Double, Back, or Brackets) that best fits your resource. Default is None. 

Column names display between single quotes, double quotes, back quotes, or brackets in the generated SQL when access the database.
Enable Empty StringBoolean  Select to enable support for writing an empty string instead of a NULL value. By default empty strings are written as a NULL values.
Rethrow All SQL ExceptionsBoolean  If false (default), the SQLExceptions with a 0 ErrorCode are considered a success, or not an error, and they are caught and suppressed by the connector. For example, some databases return an exception for an empty result set. Select to throw exceptions when the ErrorCode is 0. Note: No other SQLExceptions are influenced by this property.
Native TimestampsBoolean  If false (default), timestamp data are read as Strings, which can cause the loss of time milliseconds. Select to retrieve the data as java.sql.Timestamp type, and have the connector perform the conversion.
All NativeBoolean  If false (default), the attribute data are converted to Strings using the JDBC driver. Select to use the appropriate JDBC types and force the connector perform the conversion as needed.
Valid Connection QueryString  If false (default), the connection is validated by switching the auto commit mode. For example, you might have select 1 from dummy, which might be more efficient on some databases.

 

Schema

The Database Table connector only supports the ACCOUNT objectclass.

The following table describes the attributes that are explicitly supported in the schema. All of these attributes are single-valued, and unless specifically noted otherwise in this table, they can be created, updated, and read.

 

Attribute NameDescription
"column name"This attribute is required when "column" is NOT NULL. Blobs, clobs, and binaries are not returned by default.
All columns ... 
PASSWORDThis attribute is required for a Password Column and it is not readable or returned by default.
NAMEThis attribute is required.