Install and configure database objects (for example, tables, triggers, and indexes) for synchronization with the sample driver configuration. If you don’t configure database objects, the sample configuration file won’t work.
The following table lists default locations for SQL scripts:
Table 2-4 Default Locations for SQL Scripts
Platform |
Default Location |
---|---|
Windows |
c:\novell\NDS\jdbc\sql\database-abbreviation |
UNIX or Linux |
/usr/lib/dirxml/rules/jdbc/database-abbreviation |
For example, when installed on a SuSE Linux Enterprise Server with eDirectory, the DB2 scripts are found in /usr/lib/dirxml/rules/jdbc/db2/*.
All SQL scripts use the same conventions, regardless of the database.
The maximum size of a DB2 identifier is 18 characters. This least common denominator length defines the upper bound of database identifier length across all SQL scripts. Because of this restricted length, abbreviations are used. The following table summarizes identifier abbreviations and their meaning:
Table 2-5 Identifier Abbreviations and Meanings
1 The more common abbreviation is sp_. This prefix is reserved for system-stored procedures on Microsoft* SQL Server. Also, this prefix forces lookup of a procedure first in the master database before evaluating any qualifiers (for example, database or owner). To maximize procedure lookup efficiency, this prefix has been deliberately avoided.
The following table indicates identifier naming conventions for indexes, triggers, stored procedures, functions, and constraints:
Table 2-6 Identifier Naming Conventions
Other conventions:
All database identifiers are lowercase.
This is the most commonly used case convention between databases.
String field lengths are 64 characters.
Fields of this length can hold most eDirectory™ attribute values. You might want to refine field lengths to enhance storage efficiency.
For performance reasons, primary key columns use native, scalar numeric types whenever possible (such as BIGINT as opposed to NUMERIC).
The record_id column in event log tables has the maximum numeric precision permitted by each database to avoid overflow.
Identity columns and sequence objects do not cache values. Some databases throw away cached values when a rollback occurs. This action can cause large gaps in identity column or sequence values.
IMPORTANT:For IBM* DB2, you must manually create operating system user accounts before running the provided SQL scripts.
Because the process to create user accounts differs between operating systems, Step 1 below is OS-specific. These instructions are for a Windows NT operating environment. If you rerun the SQL scripts, repeat only Steps 2 through 5.
The directory context for DB2 is install-dir\jdbc\sql\db2_udb\install
Create user accounts for users idm, indirect and direct.
Use novell as the password in .
Remember to deselect
for this account.You might want to also select
.NOTE:The remaining instructions are OS-independent.
Adjust the file path to idm_db2.jar in the 1_install.sql installation script. The file path to idm_db2.jar should reflect the location of this file on your client machine.
Execute the 1_install.sql script from the Command Line Processor (CLP.)
For example: db2 -f 1_install.sql
IMPORTANT:The scripts won’t execute in the Command Center interface beyond version 7. The scripts use the ‘\' line continuation character. Later versions of the Command Center don’t recognize this character.
For versions 8 or later, execute the 2_install_8.sql script.
For example: db2 -f 2_install_8.sql
IMPORTANT:For Informix* Dynamic Server, you must manually create an operating system user account before running the provided SQL scripts.
Because the process of creating user accounts differs between operating systems, Step 1 below is OS-specific. These instructions are for a Windows NT operating environment. If you rerun the SQL scripts, you should repeat only Steps 2 through 4.
The directory context for Informix SQL scripts is install-dir\jdbc\sql\informix_ids\install.
In Windows NT, create a user account for user idm.
Use novell as the password in .
Remember to deselect
for this account.You might want to also select
.NOTE:The remaining instructions are OS-independent.
Start a client such as SQL Editor or DBAccess.
Log in to your server as the informix user or another user with DBA (database administrator) privileges.
By default, the password for the informix user is informix.
NOTE:If you execute scripts as a user other than informix, change all references to informix in the scripts prior to execution.
Open and execute 1_install_9.sql from either the ansi (transactional, ANSI-compliant), log (transactional, non-ANSI-compliant), or no_log (non-transactional, non-ANSI-compliant) subdirectory, depending upon which type of database you want to create.
For version 10 or later, open and execute 2_install_10.sql from either the ansi (transactional, ANSI-compliant), log (transactional, non-ANSI-compliant), or no_log (non-transactional, non-ANSI-compliant) subdirectory, depending upon which type of database you want to create.
The directory context for Microsoft SQL Server scripts is install-dir\jdbc\sql\mssql\install.
Start a client such as Query Analyzer (7, 2000) or Microsoft SQL Server Management Studio (2005).
Log in to your database server as the sa user.
By default, the sa user has no password.
Execute the installation script.
For version 7, execute 1_install_7.sql.
For version 2000 (8), execute 1_install_2k.sql.
For version 2005 (9), execute 1_install_2005.sql.
NOTE:The execute hotkey in Query Analyzer is F5.
The directory context for MySQL* SQL scripts is install-dir\jdbc\sql\mysql\install.
From a MySQL client, such as mysql, log in as root user or another user with administrative privileges.
For example, from the command line, execute
mysql -u root -p
By default, the root user has no password.
Execute the installation script 1_install_innodb.sql or 1_install_myisam.sql, depending upon which table type you wish to use. For MySQL 3 or 4, use the scripts in subdirectory 3or4. For version 5 or later, use the scripts in subdirectory 5.
For example: mysql> \. c:\1_install_innodb.sql
HINT:Don’t use a semicolon to terminate this statement.
The directory context for Oracle SQL scripts is install-dir\jdbc\sql\oracle\install.
From an Oracle client, such as SQL Plus, log in as the SYSTEM user.
By default, the password for SYSTEM is MANAGER.
NOTE:If you execute scripts as a user other than SYSTEM with password MANAGER, change all references to SYSTEM in the scripts prior to execution.
Execute the installation script 1_install.sql.
For example: SQL> @c:\1_install.sql
The directory context for PostgreSQL scripts is install-dir\jdbc\sql\postgres\install. The directory context for executing Postgres commands is postgres-install-dir/pgsql/bin.
Create the database idm.
For example, from the UNIX* command line, execute the command createdb: ./createdb idm
Install the plpgsql procedural language to database idm.
For example, from the UNIX command line, execute the command createlang: ./createlang plpgsql idm
From a Postgres client such as psql, log on as user postgres to the idm database.
For example, from the UNIX command line, execute the command psql: ./psql -d idm postgres
By default, the Postgres user has no password.
From inside psql, execute the script 1_install_7.sql.
For example: idm=# \i 1_install_7.sql
Update the pg_hba.conf file.
For example, add entries for the idm database user. Adjust the IP-ADDRESS and IP-MASK as necessary:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD# allow driver user idm to connect to database idm host idm idm 255.255.255.255 255.255.255.0 password
Restart the Postgres server to effect changes made to the pg_hba.conf file.
The directory context for PostgreSQL scripts is install-dir\jdbc\sql\postgres\install. The directory context for executing Postgres commands is postgres-install-dir/pgsql/bin.
From a Postgres client such as psql, log in as user postgres to the idm database.
For example, from the UNIX command line, execute the command psql: ./psql -d idm postgres
By default, the Postgres user has no password.
From inside psql, execute the script 1_install_8.sql.
For example: idm=# \i 1_install_8.sql
Update the pg_hba.conf file.
As of version 8, this can be done through pgAdminIII. After you start, go to pg_hba.conf. In the pgAdminIII pg_hba.conf editor, the IP-ADDRESS and IP-MASK columns in the file are combined into a single field: IP-Address. Place both the IP-ADDRESS and IP-MASK values in that field, separated by a single whitespace character.
> > >For example, add entries for the idm database user. Adjust the IP-ADDRESS and IP-MASK as necessary:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD# allow driver user idm to connect to database idm host idm idm 255.255.255.255 255.255.255.0 password
Restart the Postgres server to effect changes made to the pg_hba.conf file.
If you are using pgAdminIII, from the pg_hba.conf editor press the disk icon (save file) in the toolbar. When propted, press
.IMPORTANT:Ensure that you have JDBC metadata support installed on the database server. This is usually an issue for versions earlier than 12.5 only.
The directory context for Sybase SQL scripts is install-dir\jdbc\sql\sybase_ase\install.
From a Sybase client, such as isql, log in as the sa user and execute the 1_install.sql installation script.
For example, from the command line, execute: isql -U sa -P -i 1_install.sql
By default, the sa account has no password.