Softerra LDAP Administrator HelpShow AllHide All

LDAP-SQL Overview

With the help of the LDAP-SQL Query dialog, you can perform various operations on LDAP servers by using SQL.

The LDAP-SQL dialect is based on the SQL language that is the most popular and widely used query language for relational databases. So, if you are acquainted with SQL, it will be very easy for you to use the LDAP-SQL dialect to work with LDAP directories.

LDAP-SQL is based on four main statements: SELECT, INSERT, UPDATE, DELETE. With the help of these statements, you can perform LDAP searches, create and delete LDAP entries, perform bulk modifications, etc. For example, to find all users with the sn attribute set to Jackson in container DC=company,DC=com, you can use the following query:

SELECT * FROM "DC=company,DC=com"
WHERE $objectClass="user" AND $sn="Jackson"

The following SQL statement updates the description attribute of all users located under container DC=company,DC=com. The description is built using the values of the title and department attributes of each user.

UPDATE "DC=company,DC=com"
SET $description = $title || " of thte " || $department
WHERE $objectClass="user"

In order to make the creation of LDAP-SQL statements simple and effective, the SQL Query editor provides syntax highlighting and IntelliSence, supports drag-and-drop operations, keeps the history of executed SQL queries and is equipped with other useful IDE features that make creating and editing of LDAP-SQL statements significantly easier.

See Also