Starting Interactive SQL

There are several ways you can start Interactive SQL: at a command prompt, from the Windows Start menu, and from within Sybase Central. You can use Interactive SQL to connect to a SQL Anywhere database, a Sybase IQ database, an UltraLite database, or a generic ODBC database.

 Start Interactive SQL (command line)
  • Run the following command:

    dbisql

    If you do not include the -c option, which specifies the connection parameters for the database, or if you supply insufficient connection parameters, the Connect window appears, where you can enter connection information for the database. See Connection parameters.

    To start Interactive SQL and connect to the sample database, run the following command:

    dbisql -c "UID=DBA;PWD=sql;DSN=SQL Anywhere 12 Demo"

    For information about the supported options, see Interactive SQL utility (dbisql).

 Start Interactive SQL (Windows)
  1. Click Start » Programs » SQL Anywhere 12 » Administration Tools » Interactive SQL.

  2. Click Change Database Type and choose the type of database to connect to. You can connect to a SQL Anywhere database, a Sybase IQ database, an UltraLite database, or a generic ODBC database.

    For example, to connect to a SQL Anywhere database, click Change Database Type and click SQL Anywhere.

  3. Enter the connection information for your database in the Connect window.

    For example, to connect to the SQL Anywhere sample database:

    1. In the Authentication field, click Database.

    2. In the Action dropdown list click Connect With An ODBC Data Source.

    3. Click ODBC Data Source Name, and then in the box below type SQL Anywhere 12 Demo.

  4. Click Connect.

 Start Interactive SQL (Sybase Central)
  1. Click Tools » SQL Anywhere 12 » Open Interactive SQL.

  2. Enter the connection information for your database in the Connect window.

    For example, to connect to the SQL Anywhere sample database:

    1. In the Authentication field, click Database.

    2. In the Action dropdown list click Connect With An ODBC Data Source.

    3. Click ODBC Data Source Name, and then in the box below type SQL Anywhere 12 Demo.

  3. Click Connect.

Tip

You can also use one of the following methods to access Interactive SQL from Sybase Central:

  • Selecting a database, and clicking File » Open Interactive SQL.

  • Right-clicking a database, and clicking Open Interactive SQL.

  • Right-clicking a stored procedure, and clicking Execute From Interactive SQL. Interactive SQL opens with a CALL to the procedure in the SQL Statements pane and executes the stored procedure.

  • Right-clicking a table or view and clicking View Data In Interactive SQL. Interactive SQL opens with a SELECT * FROM table-name and executes the query.

 Start Interactive SQL (Unix command line)
Note

The following steps assume that you have already sourced the SQL Anywhere utilities. See Unix and Mac OS X environment variables.

  1. In a terminal session, run the following command:

    dbisql
  2. Enter the connection information for your database in the Connect window.

  3. Click Connect.

 Start Interactive SQL (Mac OS X)
  1. In the Finder, double-click Interactive SQL in /Applications/SQLAnywhere12.

  2. Enter the connection information for your database in the Connect window.

  3. Click Connect.

 Start Interactive SQL (Linux desktop icons)

The following steps can be used if you are using a version of Linux that supports the Linux desktop icons and if you chose to install them when you installed SQL Anywhere.

  1. Click Applications » SQL Anywhere 12 » Administration Tools » Interactive SQL.

  2. Enter the connection information for your database in the Connect window.

  3. Click Connect.

 See also