Sybase 12.4.2 manual Connecting to a database from Dbisql, Simple connection examples

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 74
Image 74

Simple connection examples

For steps in connecting to a database using Sybase Central, see the Introduction to Adaptive Server IQ. For more detailed information on available connection parameters and their use, see “Connection parameters” on page 73.

Connecting to a database from DBISQL

Many examples and exercises throughout the documentation start by connecting to the sample database from Interactive SQL, also called DBISQL. Here is how to carry out this step.

Note To avoid ambiguity, specify connection parameters for DBISQL instead of relying on defaults. You can specify connection parameters in a command line or an initialization file such as .odbc.ini or odbc.ini. For a complete list, see Chapter 3, “Connection and Communication Parameters” in Adaptive Server IQ Reference Manual.

If more than one database is started on a server, for example, you should specify the database name. In a network with subnets, specify the CommLinks parameter with protocol options including the host number.

In the .odbc.ini file, you must use the long form of each parameter. For example, use DatabaseFile instead of DBF.

If your parameters are incomplete or incorrect, you may see an error such as

Database name required to start engine

To connect from a UNIX system:

1Make sure that your PATH and other environment variables are correctly set, as described in Chapter 1, “File Locations and Installation Settings” in the Adaptive Server IQ Reference Manual.

2To ensure that the sample database is loaded on a running server, at the UNIX prompt enter:

ps -eaf grep asiqdemo

If you need to start the sample database, enter:

cd $ASDIR/demo

start_asiq @asiqdemo.cfg asiqdemo

3If you have not already done so, change to your home directory ($HOME) and issue the following command to copy the terminfo extension file default.tix into it:

54

Page 74
Image 74
Sybase 12.4.2 manual Connecting to a database from Dbisql, Simple connection examples, To connect from a Unix system