Once a database server is running, you can connect to it from an application. In this example, we'll connect to the sample database, asiqdemo.
Connecting from the command prompt
Ensure that the sample database is loaded on a running server, as described in “Starting the database server”.
Open a command prompt on your UNIX or Windows system.
Start DBISQL by typing the following:
dbisql -c "uid=DBA;pwd=SQL" -host fiona -port 1870
The –c parameter specifies connection parameters. For a complete list of connection parameters, see the Sybase IQ System Administration Guide, Chapter 4, “Connection and Communication Parameters.”
The default user ID and password for the asiqdemo database and other IQ databases are “DBA” and “SQL.” If you have trouble connecting to a database, try changing the case of the user ID and password that you supply; the case sensitivity for that database may be set ON.
Connecting from a Windows program group
Start the server, as described in “Starting the database server”
Select Start > Programs > Sybase > Adaptive Server IQ 12.6 > Interactive SQL Java
The DBISQL logon window appears.
On the Identification tab, type the user ID
DBA
and the password
SQL
This is the default user ID and password for Sybase IQ databases when they are created. (The password does not appear when you type it. This prevents someone else from seeing your password.)
On the Identification tab, you may also specify connection parameters stored in an ODBC data source to connect a client application. For more information about creating an ODBC data source and connecting using ODBC data sources, see “Working with ODBC data sources,”Sybase IQ System Administration Guide.
Click the Database tab and type the server name (for example, “hostname_asiqdemo” for the demo database). If the server is remote, type host:port instead of the server name.
Click the Advanced tab and choose a JDBC driver, for example, jConnect5.
On this tab, you can also type connection parameters, for example:
“links=tcpip{host=name,port=####}”
This information could be substituted for the server name on the Database tab.
Click OK to connect to the database.
If Interactive SQL cannot connect to your database, click the Database tab and type “host=servername:nnnn” where servername is the name of your system and nnnn is your port number. (The default port number is 2638, but if the host was started with a different number, use that instead.)
Other applications connect to the database server in much the same way. To make the connection, they must submit both user ID and password.
The Sybase IQ Utility Guide gives more details about how to use DBISQL.