Connecting from a UNIX System

Connect to a running database from the command line on a UNIX system.

Prerequisites
Make sure that your PATH and other environment variables are correctly set.
Task
  1. To ensure that the demo database is loaded on a running server, at the UNIX prompt, enter:
    ps -eaf | grep iqdemo
    cd $IQDIR16/demo
  2. To start the demo database, enter:
    start_iq @iqdemo.cfg iqdemo.db
  3. Start Interactive SQL:
    dbisql -c "uid=DBA;pwd=sql;eng=servername;links=tcpip"

    Replace servername with the same server name that was supplied in the start_iq command to start the server.

    Note: If you prefer the older utility Interactive SQL Classic to the Java-based version, enter dbisqlc instead of dbisql. However, dbisqlc does not contain all the features of dbisql.

    The –c parameter specifies connection parameters. You can also specify these parameters in a data source, as described later in this chapter.

    Note: The links=tcpip (or CommLinks=tcpip) parameter is only required if you use TCP/IP to connect to the database. If you use the shared memory port to connect to a local database you can omit the links parameter; however, it is always safer—and required on some platforms—to include complete network parameters.

    To connect to a database on a remote host, you must add the host name and port number. For example:

    dbisql -c "uid=DBA;pwd=sql;eng=SERV1_iqdemo;
    links=tcpip(port=1234)"