Running Interactive SQL

Interactive SQL is a utility that ships with Sybase IQ that lets you execute SQL statements, build scripts, and display database data.

Prerequisites

Assume that iqdemo is running on a local host named localhost-xp.

Task
  1. Open a console, and run dbisql from the $SYBASE/DBISQL/bin directory.
    Starting Interactive SQL opens a dialog that lets you define the connection parameters to your server or database. If you need connection help, click the arrow in the top-right corner to display a Connect Assistant.
  2. On the Identification tab, type DBA in the User box, and sql in the Password box.
    DBA is not case-sensitive; sql is case-sensitive, and must appear in all lowercase letters.
  3. On the Database tab, choose a server from the Server name box. If there are no servers listed, click Find to search for running servers.

    Server names appear in this format <hostname>_dbname. If the host name is localhost-xp and you are running the demo iqdemo database, the server name is localhost-xp_iqdemo.

  4. Choose iqdemo as the database. If there is only one database running, you can leave this field blank.
  5. What you do next depends on the server location:
    • If the server is installed on the same machine, choose an appropriate database file.
    • For a networked server, click the Network tab, click the TCP/IP box, then specify the Host name and Port number
  6. Click OK to open Interactive SQL.
  7. In the SQL Statements window, enter: SELECT * FROM employees
  8. To execute the query, click the right-facing triangle on the toolbar.
Note:
  • Sybase Central and Interactive SQL no longer support jConnect. Sybase Central and Interactive SQL use the SQL Anywhere JDBC Driver. jConnect is provided with Sybase IQ 15 for customer application backward compatibility purposes.

  • As a general rule, the jConnect driver cannot use ODBC data sources. However, Sybase Central and Interactive SQL are special cases. When you use the jConnect driver in either of them, you can specify an ODBC data source to establish a connection.