Windows: Objectivity/SQL++ Configuration

Printer-friendly version

To configure Objectivity/SQL++, refer to the following:

Creating an Account

Create an account with the username systpe and a password of your choice. The Objectivity/SQL++ database administrator will use this account. For more information about systpe, see Objectivity/SQL++.

Setting Your OO_SQL_DIR

With a default installation with adminstrative privileges, the installer adds the OO_SQL_DIR system environment variable. Objectivity/SQL++ uses this environment variable to find help files and error-code files.

Variable Value
OO_SQL_DIR Set to installDir.

If you chose not to set environment variables when you installed, you must manually update the OO_SQL_DIR variable. Alternatively, you can execute the installDir/setup.cmd script to set needed environment variables temporarily in a shell window.

Checking and Setting Up the ODBC Server

Objectivity/SQL++ provides an ODBC server, which enables ODBC-compliant applications to connect to a federated database. For information about the ODBC server, see "Getting Started With ODBC" in Objectivity/SQL++.

After a default installation with administrative privileges, the ODBC server is installed as a Windows service with an Automatic startup type. With this startup type, the ODBC server starts automatically whenever the computer boots and runs even when no user is logged in. A running ODBC server is required only when you are accessing Objectivity/DB federated databases with ODBC-compliant applications that use the Objectivity/SQL++ ODBC Driver. A running ODBC server is not required if you are accessing Objectivity/DB federated databases with Interactive SQL++.

You manage the ODBC server using the Objectivity Network Services (ONS) tool, which is described in "Running Objectivity Servers on Windows" in Objectivity/DB Administration. You must log in as administrator or as a user with equivalent privileges to make any changes through ONS.

For security purposes, you should consider configuring the ODBC server to use a special-purpose account that can be granted the minimum necessary permissions.

Checking ODBC Server Status

After installation, check the status of the ODBC server:

 Click Start > Programs (or All Programs) > Objectivity version > Objectivity Network Services .

The status of the ODBC server is listed next to its name.

If the ODBC Server is Stopped

If the ODBC server is listed as stopped, you should check whether another process is already running on port 1990, which is the default port for the ODBC server. If another service already uses the default port, either reassign that service to a different port (recommended) or change the port for the ODBC server.

Note: If you change the port number for the ODBC server, you must assign the same port to the oosqlnw service on each Objectivity/SQL++ ODBC Driver host.

To confirm that a port conflict exists or to change the default port for the ODBC server, see "Getting Started With ODBC" in Objectivity/SQL++.

Choosing a User Account for the ODBC Server

At installation, the ODBC server is started under the local system account. For security purposes, you should consider running the ODBC server under a special-purpose user or group account that can be granted the minimum necessary permissions.

For information about starting an ODBC server with the required permissions, see "Getting Started With ODBC" in Objectivity/SQL++.

Alternatively, you can run a custom installation to install the ODBC server under a given user account.

Configuring Windows Firewall

The ODBC server on a particular computer can serve ODBC-compliant applications running anywhere on the same network. If the ODBC server is on a computer that has Windows Firewall turned on, you must configure Windows Firewall to enable traffic to the Objectivity server. See "Running Objectivity Servers on Windows" in Objectivity/DB Administration.

(Optional) Changing the Log Directory

A running ODBC server creates temporary error-log files and cache files. By default, these files are written to the directory specified by the TEMP environment variable, if one is defined for your user account; otherwise to C:\winnt .

You can specify a nondefault log directory. To do so:

  1. Log on as administrator or as a user with equivalent privileges.
  2. Click Start > Programs (or All Programs) > Objectivity version > Objectivity Network Services .
  3. Select the Objectivity/SQL++ ODBC server and click Stop.
  4. When the ODBC has stopped, click Configure.
  5. Enter or select the pathname of the log directory and click OK.
  6. Restart the Objectivity/SQL++ ODBC server.

Testing Interactive SQL++

You can test whether the Interactive SQL++ component of Objectivity/SQL++ has been set up correctly by building and running the provided sample application. This sample application builds a sample Objectivity/DB federated database that is then queried through Interactive SQL++.

To build and run the Interactive SQL++ sample application:

  1. If you have not already done so, set up a default license file.
  2. (Optional) Make a backup copy of the Interactive SQL++ sample directory.
    installDir\samples\sql\ooisql
  3. Edit makefile in the Interactive SQL++ sample directory:
    • Set INSTALL_DIR to be the location of the Objectivity/DB installation directory—for example:
      INSTALL_DIR = C:\Program Files\Objectivity\version
    • Set LS_HOST to be the name of the host running the lock server—for example:
      LS_HOST = myLockServerHost
  4. Check whether the lock server is running; start it, if necessary.
  5. Build the executables and the demo federated database. At a command prompt, enter:
    nmake
    
  6. Run the sample application. At the command prompt, enter:
    demo

If Interactive SQL++ is set up correctly, you will see messages like these:

Creating the Objectivity/DB Database: .\create
Running OOISQL to create views:
        ooisql -input views.sql -user systpe -passwd dummy DEMO
Running OOISQL to test out various SQL statements:
        ooisql -input test.sql -user systpe -passwd dummy DEMO
Comparing the results.
Listing differences (if any). Null difference indicates - 
    test passed.
Comparing files log and OOISQLOK
FC: no differences encountered

Test completed
Listing errors (if any). Null listing indicated - test passed
End of error list
Deleting ...\samples\sql\ooisqliog
Deleting ...\samples\sql\ooisqldiffs
Deleting ...\samples\sql\ooisqlerr

Note: If you want to repeat this demo, you must first run nmake clean . However, you should not run nmake clean if you plan to perform the Objectivity/SQL++ ODBC Driver demo, because the same federated database is used by that demo.

Preparing the ODBC Server for Testing

At some sites, a database administrator or a system administrator is responsible for installing Objectivity/SQL++, while individual users of ODBC-compliant client applications install their own copies of the Objectivity/SQL++ ODBC Driver. If you are installing Objectivity/SQL++ at such a site, you probably need to set up the federated database and ODBC server so that other users can perform the Objectivity/SQL++ ODBC Driver demo.

To prepare for the Objectivity/SQL++ ODBC Driver demo, perform the following steps on the Objectivity/SQL++ ODBC server host:

  1. If you have not already done so, run the Interactive SQL++ demo above.
  2. Check whether the Objectivity/SQL++ ODBC server and the lock server are running; start them if necessary:
    • Log in as administrator or as a user with equivalent privileges.
    • Click the Windows Start > Programs (or All Programs) > Objectivity x.x > Objectivity Network Services.
    • Select the server and click Start.
  3. If the Objectivity/SQL++ ODBC Driver demo is to be performed by another user, give that user the TCP/IP name of the ODBC server host, the service name under which the ODBC server is running (oosqlnw), and the location and name of the boot file (installDir\samples\sql\ooisql\DEMO).
  4. Grant all access rights to all users for the tables in the demo federated database. If you omit this step, only the Objectivity/SQL++ database administrator (systpe) will have access to these tables. To grant access rights to all users:
    • Start Interactive SQL++ for the demo federated database:
      ooisql -user systpe -passwd adminpassword installDir\samples\sql\ooisql\DEMO
      where adminpassword is the password of the Objectivity/SQL++ administrator account (systpe)
    • Enter the TABLE statement to obtain a list of the demo tables:
      table;
    • For each table listed, grant all rights to every user with a login account on the Objectivity/SQL++ ODBC server host. Enter commands such as the following:
      grant all on tablename to public;
    • Commit the new access rights and exit from Interactive SQL++:
      commit work;
      exit

Users can now perform the Objectivity/SQL++ ODBC Driver demo described in Windows: Objectivity/SQL++ ODBC Driver Configuration. (This information can also be found in UNIX: Objectivity/SQL++ ODBC Driver Configuration)

The demo can be repeated as long as the lock server and the Objectivity/SQL++ ODBC server are both running, and the demo federated database exists.

Date: 
Monday, August 20, 2012
Product: 
Objectivity/DB
Version: 
11.0