If you are running a UNIX client, an .odbc.ini file on your system stores the information used to access each database. (Note that the filename begins with a period.)
To connect with ODBC data sources, your .odbc.ini file must be located in one of the following directories. Sybase IQ searches the directories in the order listed:
Current directory
$ODBCINI
Directory specified by the $ODBCHOME environment variable
Directory specified by the $HOME environment variable
Sybase IQ ignores the following environment variables:
$ODBC_HOME
$ODBC_INI
Once you have created a data source entry, you can connect to your database, by entering the dbisql command at the command prompt and specifying the data source entry name in a connection string. Sybase IQ finds the rest of the connection information in the .odbc.ini file. For example:
% dbisql -c "dsn=sample_dsn"
For more information about dbisql and its options, see Sybase IQ Utility Guide.
For Sybase IQ Version 12.5 and higher, by default any
server that is started from a connection string is stopped when
there are no more connections to it, and any database that is loaded
from a connection string is unloaded as soon
as there are no more connections to it. (This does not apply in
the case of multiplex IQ databases, which are started with Sybase
Central.)
To have the database continue running after connections disconnect, as in Sybase IQ releases prior to 12.5, you must specify the connection parameter AutoStop=No in your connection string or data source.
For example, the following data source fragment instructs the client library to keep the database loaded after the connection is dropped:
[dbcli7 Connection Parameters] ServerName=testsrv Autostop=No UserID=DBA Password=SQL
If you want to connect without using .odbc.ini, you can enter an Interactive SQL command that specifies the entire entry, like the following. While it is shown here on multiple lines, you must enter the entire command at the command prompt on one line.
dbisql -c "UID=DBA;PWD=SQL;AutoStop=no;DBF=$ASDIR/demo/asiqdemo.db"