Connecting to databases from DBISQL

Once a database server is running, you can connect to it from an application. In this example, we'll connect to the sample database, asiqdemo.

StepsConnecting from the command prompt

  1. Ensure that the sample database is loaded on a running server, as described in “Starting the database server”.

  2. Open a command prompt on your UNIX or Windows system.

  3. Start DBISQL by typing the following:

    dbisql -c "uid=DBA;pwd=SQL" -host fiona -port 1870
    

    The –c parameter specifies connection parameters. For a complete list of connection parameters, see Chapter 4, “Connection and Communication Parameters,” in the Sybase IQ System Administration Guide.

    NoteThe default user ID and password for the asiqdemo database and other Sybase IQ databases are “DBA” and “SQL.” If you have trouble connecting to a database, try changing the case of the user ID and password that you supply; the case sensitivity for that database may be set ON.

StepsConnecting from a Windows program group

  1. Start the server, as described in “Starting the database server”

    Select Start > Programs > Sybase > Adaptive Server IQ 12.7 > Interactive SQL Java

    The DBISQL logon window appears.

  2. On the Identification tab, type the user ID

    DBA
    

    and the password

    SQL
    

    This is the default user ID and password for Sybase IQ databases when they are created. (The password does not appear when you type it. This prevents someone else from seeing your password.)

    On the Identification tab, you may also specify connection parameters stored in an ODBC data source to connect a client application. For more information about creating an ODBC data source and connecting using ODBC data sources, see “Working with ODBC data sources,”Sybase IQ System Administration Guide.

  3. Click the Database tab and type the server name (for example, “hostname_asiqdemo” for the demo database). If the server is remote, type host:port instead of the server name.

  4. Click the Advanced tab and choose a JDBC driver, for example, jConnect5.

    On this tab, you can also type connection parameters, for example:

    “links=tcpip{host=name,port=####}”
    

    This information could be substituted for the server name on the Database tab.

  5. Click OK to connect to the database.

    If Interactive SQL cannot connect to your database, click the Database tab and type “host=servername:nnnn” where servername is the name of your system and nnnn is your port number. (The default port number is 2638, but if the host was started with a different number, use that instead.)

Other applications connect to the database server in much the same way. To make the connection, they must submit both user ID and password.

The Sybase IQ Utility Guide gives more details about how to use DBISQL.