Connecting to the sample database on Unix

Many of the examples throughout the documentation use the SQL Anywhere sample database. Connect to this database and explore SQL Anywhere.

Prerequisites

The following procedure uses Interactive SQL to connect to the database. Ensure that the Java Runtime Environment (JRE) is installed.

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. Run the following command to copy the sample database file into the folder:

cp "samples-dir/demo.db".

Start the sample database on a database server:

dbeng12 demo.db

Context and remarks

To connect using Mac OS X, see Connecting to the sample database on Mac OS X.

 Connect to the sample database from Interactive SQL (Unix)
  1. In a terminal window, start Interactive SQL:

    dbisql

    The Connect window appears by default.

  2. Provide the following information in the Connect window:

    1. In the User ID field, type DBA.

    2. In the Password field, type sql.

    3. In the Action dropdown list, click Connect To A Running Database On This Computer.

    4. In the Server Name field, type demo.

    5. Optional: To get a copy of the connection string that is created with this window, click Tools » Copy Connection String to Clipboard.

    6. Click Connect.

Results

Interactive SQL starts and connects to the sample database.

Next

None.

 See also