When a database server is running, you can connect to it from an application. In this example, we'll connect to the demo database, iqdemo.
Connecting from the command line
Ensure that the demo database is loaded on a running server, as described in “Starting the database server.”
Open a command prompt on your UNIX or Windows system.
To start dbisql, enter:
dbisql -c "uid=DBA;pwd=SQL" -host localhost -port 1870
The –c parameter specifies connection parameters. For a complete list of connection parameters, see Chapter 4, “Connection and Communication Parameters”in the System Administration Guide: Volume 1.
The default user ID and password for the iqdemo database and other Sybase 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 the Windows program group
Start the server, as described in “Starting the database server”
Select Start | Programs | Sybase | Sybase IQ 15.2 | Interactive SQL.
On the Identification tab, enter DBA
in
the User box, and sql
in the Password
box.
This is the default user ID and password for Sybase IQ databases. DBA is not case-sensitive; sql is case-sensitive, and must appear in all lowercase letters.
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 in the System Administration Guide: Volume 1.
On the Database tab, choose a server from the Server name box. Click Find to search for running servers.
Server names appear in this format <hostname>_dbname. If the host name is localhost-xp and you are running the sample iqdemo database, the server name would be localhost-xp_iqdemo. If the server is remote, type host:port instead of the server name.
Choose a database from the Database name box. When there is only one database running, you can leave this field blank.
What you do next depends on the server location:
If you are running dbisql against a server installed on the same machine, you must also choose an appropriate Database file.
If you are running dbisql against a network server, click the Network tab, click the TCP/IP box, then specify the Host name and Port number.
Click OK to open Interactive SQL.
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 Utility Guide gives more details about how to use dbisql.