[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: error loading ucdata (error -127)



Hello,

I don't know if you've received a response to your question yet.  If not: I suspect you have not created a ucgendat directory.  There is good info at this URL: http://www.codeproject.com/dotnet/dotnetopenldap.asp  (go there , then Ctrl+F for  "ucgendat.exe").  This will lead you to a description of the steps for creating a ./ucgendat directory.  Another useful link (talks about building an older version of OpenLDAP, but still mostly applies) is http://www.fivesight.com/downloads/openldap.asp)

There are some other slapd.conf switches that you might find helpful (essential) for use with back-SQL.  Following is a copy of a slapd.conf file that works for me with the small test database you can create by running the *.sql scripts that come with the OpenLDAP 2.1.16 back-sql distribution. These test scripts create tables for an LDAP directory with top DN o=sql,c=ru. Note that I've successfully tested this with a Microsoft SQL Server installation. Don't know what you'll encounter with Oracle.

Also, following are some notes on the slapd.conf switches I found important for my MS SQL implementation (Windows 2000 Advanced Server, OpenLDAP 2.1.16, back-SQL with MS SQL Server 8.0.).  

Good luck,

Ken Turley
Invizeon Corp.

IMPORTANT SLAPD.CONF SWITCHES FOR 2.1.16 BACK-SQL
=================================================

ucdata-path "./ucgendat"  
------------------------
     --goes at the top as the first non-commented statement. My uc data is in a subdir of the directory from which I'm running slapd.exe


schemacheck off   
---------------
     --place this line before any schema "includes" 


suffix "o=sql,c=RU" 
-------------------
     --this corresponds to the root DN (distinguished name) which exists as the First Row in the ldap_entries table (as populated by the ...\servers\slapd\back-sql\rdbms_depend\mssql\testdb_metadata.sql script that distributes with 2.1.16).


rootdn "cn=root,o=sql,c=RU"  
---------------------------
    --similar correspondence. 


dbname OpenLDAP  
---------------
    --this is the name I gave the SQL Server database source in my Win2k Data Sources (ODBC) configuration.  "dbuser" line following it equates to the user to log in with as supplied during the ODBC setup in Win2k. Password can also be specified. I set up ODBC access with no password for initial testing.


has_ldapinfo_dn_ru "no"  
-----------------------
    --If this line isn't in there, bad things happen. See http://www.openldap.org/lists/openldap-software/200209/msg00599.html


at_query . . .  
---------------
    --The default "attribute query" in slapd expects a column "sel_expr_u" in ldap_attr_mappings table that doesn't exist.  This line defines a new SELECT statement used by slapd to query the ldap_attr_mappings table. Another workaround might be to add the column to the table and not define a new SELECT statement.


==============================================
Sample [slapd.conf]
==============================================

#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#

# ucdata support --new to version 2.1.x. following line per
#   www.codeproject.com/dotnet/dotnetopenldap.asp

# New setting for 2.1
ucdata-path "./ucgendat"

# Essential Setting! Schema checking off (per e-mail in openldap mailing list) 
schemacheck off

# include schemas per distribution recommendations

include		./schema/core.schema
include		./schema/cosine.schema
include		./schema/inetorgperson.schema


pidfile		./slapd.pid
argsfile	./slapd.args

#######################################################################
# sql database definitions
#######################################################################
backend		sql
database	sql

suffix		"o=sql,c=RU"
rootdn		"cn=root,o=sql,c=RU"

#rootpw		root
# name of the ODBC Data Source as set up (in Win2k Server Edition) Data Sources (ODBC)
dbname		OpenLDAP
# use SQL Server Authentication
dbuser		sa

################################
# MSSQL specific syntax
################################
subtree_cond	"ldap_entries.dn LIKE '%'+?"
#insentry_query	"INSERT INTO ldap_entries (dn,oc_map_id, parent, keyval) VALUES (?,?,?,?)"
upper_func		"upper"
lastmod			on

has_ldapinfo_dn_ru	"no"


#######################################################################
# at_query command fix --default command references 
#                        non-existing column "sel_expr_u"
#######################################################################
at_query "SELECT name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return FROM ldap_attr_mappings WHERE oc_map_id=?"


==============================================
[End of sample SLAPD.CONF file]
==============================================
-----Original Message-----
From: Ha Minh NGUYEN [mailto:haminh.nguyen@cgey.com]
Sent: Tuesday, April 01, 2003 2:29 AM
To: openldap-software@OpenLDAP.org
Subject: error loading ucdata (error -127)


Hello everybody,
I'm very novice in openldap. I would like to run a prebuilt for Win32 version of openldap with the command
slapd -d 5 -f slapd.conf
and I meet
error loading ucdata (error -127)

Do you know what happens?

Thank you very much,

Ha Minh NGUYEN