openldap/servers/slapd/back-sql/docs/install
Dmitry Kovalev b8af4a67ea Summary of changes:
- filter -> SQL translation bugfixes
- several memory leaks fixups
- improved configurability:
    - allows definition of  uppercasing function to support CIS matching on databases that do
    case sensitive compares (this fixes up Oracle issues, example updated)
    - allows more flexibility in stored procedures interface (different parameter order, optional return
      codes - see samples, and comments in backsql.h)
- synchronize function interfaces to recent changes in prototypes ("const" clauses etc.) made for all backends
  (those changes led to compile-time errors)
2000-05-26 16:03:32 +00:00

39 lines
2.1 KiB
Plaintext

1. Build
To build slapd with back-sql under Unix you need to build and install
iODBC 2.50.3 (later versions should probably work). Then, run
"configure <other options you need> --enable-sql",
this should build back-sql-enabled slapd, provided that you have iODBC
libraries and include files in include/library paths.
Under Win32/MSVC++, I modified the workspace so that back-sql is built into
slapd automatically, since MS odbc32 is included in standard library pack,
and it does no bad even if you don't plan to use it. I also could provide
precompiled executables for those who don't have MSVC.
2. Tune datasources and slapd.conf
Next, you need to define ODBC datasource with data you want to publish
with help of back-sql. Assuming that you have your data in some SQL-compliant
RDBMS, and have installed proper ODBC driver for this RDBMS, this is as simple
as adding a record into odbc.ini (for iODBC), or using ODBC wizard in
Control Panel (for odbc32). Next, you need to add appropriate "database"
record to your slapd.conf. See
sample provided in "back-sql/RDBMS_DEPENDENT/" subdirectory. The only thing
worth noting about this is that "dbname" directive stands for ODBC datasource
name, not the name of your database in RDBMS context.
3. Creating and using back-sql metatables
See SQL scripts and slapd.conf files in sample directory .
Create db/user whatever for test, execute create.sql, create_testdb.sql,
test_data.sql,test_metadata.sql from appropriate directory (use
"mysql < xxx.sql" for mySQL, Query Analyzer+Open query file for MS SQL,
sqlplus and "@xxx.sql" for Oracle)
4. Testing
To diagnose back-sql, run slapd with debug level TRACE ("slapd -d 5" will go).
Then, use some LDAP client to query corresponding subtree (for test database,
you could for instance search one level from "o=sql,c=RU"). I personally used
saucer, which is included in OpenLDAP package (it builds automatically under
Unix/GNU configure and for MSVC I added appropriate project to workspace).
And also Java LDAP browser-editor (see link somewhere on OpenLDAP site) to
test ADD/DELETE/MODIFY operations on Oracle and MS SQL