]> git.sur5r.net Git - openldap/blob - servers/slapd/back-sql/docs/install
added back-sql files
[openldap] / servers / slapd / back-sql / docs / install
1 1. Build
2 To build slapd with back-sql under Unix you need to build and install
3 iODBC 2.50.3 (later versions should probably work). Then, run 
4 "configure <options you need> --enable-sql [--with-iodbc-includes=<path>] [--with-iodbc-libs=<path>]",
5 this should build back-sql-enabled slapd.
6
7 Under Win32/MSVC++, I modified the workspace so that back-sql is built into
8 slapd automatically, since MS odbc32 is included in standard library pack,
9 and it does no bad even if you don't plan to use it. I also could provide
10 precompiled executables for those who don't have MSVC later (when back-sql
11 comes into some stable state).
12
13 2. Tune datasources and slapd.conf
14 Next, you need to define ODBC datasource with data you want to publish
15 with help of back-sql. Assuming that you have your data in some SQL-compliant
16 RDBMS, and have installed proper ODBC driver for this RDBMS, this is as simple
17 as adding a record into odbc.ini (for iODBC), or using ODBC wizard in
18 Control Panel (for odbc32). Next, you need to add appropriate "database"
19 record to your slapd.conf. See
20 sample provided in "back-sql/RDBMS_DEPENDENT/" subdirectory. The only thing
21 worth noting about this is that "dbname" directive stands for ODBC datasource
22 name, not the name of your database in RDBMS context.
23
24 3. Creating and using back-sql metatables
25 See SQL scripts and slapd.conf files in sample directory .
26 Create db/user whatever for test, execute create.sql, create_testdb.sql,
27 test_data.sql,test_metadata.sql from appropriate directory (use 
28 "mysql < xxx.sql" for mySQL, Query Analyzer+Open query file for MS SQL,
29 sqlplus and "@xxx.sql" for Oracle)
30
31 4. Testing
32 To diagnose back-sql, run slapd with debug level TRACE ("slapd -d 5" will go).
33 Then, use some LDAP client to query corresponding subtree (for test database,
34 you could for instance search one level from "o=sql,c=RU"). I personally used
35 saucer, which is included in OpenLDAP package (it builds automatically under
36 Unix/GNU configure and for MSVC I added appropriate project to workspace).
37 And also Java LDAP browser-editor (see link somewhere on OpenLDAP site) to
38 test ADD/DELETE/MODIFY operations on Oracle and MS SQL