Accessing ODBC Databases from Lotus Notes/Domino

Contents

Introduction

Domino Enterprise Connection Services (DECS) lets Lotus Domino applications access data in non-Domino databases. The external data is then available to Lotus Notes client applications. By using DECS with an Easysoft ODBC driver, your Notes/Domino applications can access data in databases such as Microsoft SQL Server, Microsoft Access, Oracle, DB2, InterBase and Sybase ASE. For example, access SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2012, SQL Server 2014 and SQL Server Express databases from Notes/Domino applications on Linux by using DECS with our SQL Server ODBC driver.

Use DECS with our Oracle, Salesforce.com, DB2, Derby, InterBase, Sybase drivers to access those databases.

To access other databases for which an ODBC driver is available, for example MS Access, use the ODBC-ODBC Bridge (OOB).

For relational ODBC access to Domino databases from Linux and UNIX platforms, use the OOB with the Lotus NotesSQL ODBC driver.

Easysoft ODBC drivers have been tested with Notes/Domino 6 beta 3, the final Domino 6 release and Domino 7. We believe our ODBC drivers should also work with version 5 too. We tested on Linux.

Note that information about developing Notes/Domino applications is beyond the scope of this article. Technical resources for Notes and Domino developers are available from this web page:

http://www.ibm.com/developerworks/lotus

Installing Easysoft ODBC Drivers

Download the Easysoft ODBC driver for your database. (Registration required.)

Note If you are using a 64-bit version of Domino, you need to use it with a 64-bit Easysoft ODBC driver. If you are using a 32-bit version of Domino on a 64-bit platform, download the 32-bit Easysoft ODBC driver even if there is a 64-bit version available. 32-bit drivers will function correctly on a 64-bit platform.

For installation instructions, see the documentation for your Easysoft ODBC driver. Refer to the documentation to see which environment variables you need to set.

Note When installing an Easysoft ODBC driver to run under Notes/Domino, Easysoft strongly recommend that you install the unixODBC Driver Manager that is included in the Easysoft distribution. Domino needs an ODBC Driver Manager. During the installation, make sure that you choose to install the Easysoft ODBC driver into unixODBC.

Domino 6 and 7

  1. Create your Easysoft ODBC driver DSNs in /etc/odbc.ini. Make sure to include the appropriate Driver attribute setting in each DSN you define so unixODBC knows which driver to use. For example, include the following setting for the OOB:
    Driver = OOB

    For information about creating Easysoft ODBC data sources, see the documentation for your Easysoft ODBC driver.

  2. Test the DSNs locally first with unixODBC’s isql command.
  3. Use Domino’s dctest to test the database connection from Domino. You can find more information about this in IBM’s "Lotus Domino 6 For Linux" red book.

    For our install, dctest was installed in /opt/lotus/notes/latest/linux. You may need to make sure libodbc.so is available in your dynamic link path. (For Linux/FreeBSD, the Easysoft ODBC driver install will do this for you if you installed it as root). IBM recommend symbolically linking /opt/lotus/notes/latest/linux/libodbc.so to the real unixODBC’s libodbc.so, which will be in /usr/local/easysoft/unixODBC/lib for an Easysoft ODBC driver install. For example:

    ln -s /usr/local/easysoft/unixODBC/lib/libodbc.so /opt/lotus/notes/latest/linux/libodbc.so
    

    We did not need to do this as the Easysoft ODBC driver install for Linux adds /usr/local/easysoft/unixODBC/lib to /etc/ld.so.conf and runs /sbin/ldconfig to inform the dynamic linker of a new directory to look in for shared objects.

    However, when we ran dctest during Domino 6 testing, we did get a dynamic linker error for libnotes.so which appeared to be in /opt/lotus/notes/60000/linux. To work around this, we set the LD_LIBRARY_PATH environment variable to /opt/lotus/notes/60000/linux and exported LD_LIBRARY_PATH. For example:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lotus/notes/60000/linux/;
    export LD_LIBRARY_PATH
    

    After that dctest started successfully. You can choose ODBC and enter a DSN, database username and database password. dctest then tests the connection. Make sure you test the ODBC connectivity with dctest before moving on to Lotus Notes.

  4. Make sure the DECS server is running.

    If the DECS task is not running, the design view in Lotus Notes for a Data Connection will not allow the browsing of metadata.

    In the Web Administrator (http://domino_server/webadmin.nsf), select Server then tasks. If you do not see a DECS task, select Tools, Task, Start, select DECS server from the list and click Start.

    This failed to start for us and an error was output in Domino server saying "EXTMGR_ADDINS=decsext" had to be added to the notes.ini file (which was in /local/notesdata for us). After we had done this and restarted Domino, the DECS task started.

  5. When working in the Domino Designer in Lotus Notes, you should now be able to create a database with a Data Connection using ODBC. In the Data Connection dialogue, select Class:RDBMS, Type:ODBC and type your DSN name into the Data Source field. You may also need to provide a database username and password in the Connectivity section.

Domino 6 beta 3

  1. The Lotus Notes installation is already set up to support ODBC. It only requires that a symbolic link called libodbc.so is added to the /opt/lotus/notes/latest/linux directory that points to the unixODBC Driver Manager.

    For the default Easysoft ODBC driver, unixODBC and Lotus Notes install, the following lines show the commands that you need to type to do this:

    cd /opt/lotus/notes/latest/linux
    ln -s /usr/local/easysoft/unixODBC/lib/libodbc.so libodbc.so
    
  2. Create your Easysoft ODBC driver DSNs in /etc/odbc.ini. Make sure to include the appropriate Driver attribute setting in each DSN you define so unixODBC knows which driver to use. For example, include the following setting for the OOB:
    Driver = OOB

    For information about creating Easysoft ODBC data sources, see the documentation for your Easysoft ODBC driver.

ODBC Access to Domino Databases from UNIX/Linux by using NotesSQL

NotesSQL is an ODBC driver for Notes and Domino that allows ODBC-enabled applications to access and update data stored in Domino databases. A Domino database is not relational, but with NotesSQL, a Domino database looks like a relational data source to an OBDC-enabled application. You can then use the application to query and update your Domino data by using SQL.

The NotesSQL ODBC driver is only available on Windows platforms. For ODBC/SQL access to Domino databases from UNIX and Linux platforms, use the OOB to connect to the NotesSQL driver on Windows.

  1. On the machine where the NotesSQL ODBC driver is installed, add a NotesSQL System ODBC data source.

    For information about adding Lotus Notes ODBC data sources, see the NotesSQL documentation.

  2. Download the OOB Client for your UNIX/Linux platform and the Windows OOB Server (registration required).

    For installation instructions, see the OOB documentation. You should also refer to the OOB documentation for information about the environment variables you need to set (LD_LIBRARY_PATH, LIBPATH, LD_RUN_PATH or SHLIB_PATH depending on the platform and linker).

  3. Create an OOB Client data source in /etc/odbc.ini that points to your NotesSQL system data source:
    [OOB_notessql]
    Driver = OOB
    ServerPort = mywindows_server:8888
    LogonUser = mywindows_username
    LogonAuth = mywindows_password
    TargetDSN = notessql_systemdsn
    TargetUser = notes_username
    TargetAuth = notes_password

    where:

    • mywindows_server is the hostname or IP address of the machine where the OOB server is running.
    • mywindows_username and mywindows_password are a valid Windows username and password that can be used to log into this machine.
    • notessql_systemdsn is the name of your NotesSQL System ODBC data source.
    • notes_username and notes_password are a valid Notes user ID and password that can be used to access the database.
  4. Use isql to test the new data source:
    cd /usr/local/easysoft/unixODBC/bin
    ./isql -v OOB_notessql

    At the prompt, type "help" to display a list of tables. To exit, press return in an empty prompt line.

Appendix A: Resources

Article Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)