Connect to the sample database on Unix

The following procedure describes how to connect to the sample database from Interactive SQL, and how to execute a query.

 To connect to the sample database from Interactive SQL (Unix)
  1. In a typical Unix installation, the SQL Anywhere software, including the sample database, is installed into a directory that you do not have permissions to write to. Before you begin, in a terminal window, change to a writable folder. Copy the sample database file into the folder by using the following command:

    cp install-dir/demo.db  .

    install-dir is the directory where SQL Anywhere 12 is installed, for example, /opt/sqlanywhere12.

  2. Start the sample database on a database server:

    dbeng12 demo.db
  3. In another terminal window, start Interactive SQL:

    dbisql

    If you have not installed the JRE or if you are using the Deployment option, you can run the character-based version of Interactive SQL by running the following command:

    dbisqlc

    A connection window appears.

  4. Type DBA as the User ID, sql as the Password, and demo as the Database Name. Leave the other fields blank. Press Enter to connect to the database.

 See also