Cannot Connect to a Database

You may experience problems connecting to a database.

Possible Causes

  • Data source is not defined, or is defined incorrectly. Try connecting again with the correct user ID and password.

    A data source is a set of connection parameters, stored in the registry (on Windows) or in a file (Windows and UNIX).

  • An incorrect user name or password is specified.

  • User may not have permission to use the database.

  • You are connecting over TDS (for example, using jConnect) and the user ID or password is longer than 30 bytes. You see:
    Invalid user ID or password
    CT-LIBRARY error:
    ct_connect(): protocol specific layer: 
    external error: The attempt to connect to the server failed.
  • You provide an incorrect database file name. Try connecting again with the correct database file name.

    You must supply the DBF parameter and the database file name to connect when you use Interactive SQL and you have restored the database from backup while connected to utility_db.

  • Database files may be missing. The files dbname.db, dbname.iq, and dbname.iqmsg (where dbname is the name of the database) must all exist.

  • A limit on the number of connections or other DBA-defined login restrictions may be exceeded.

  • You have run out of disk space. Check the SAP Sybase IQ message file for messages related to disk space.

  • The server name specified is incorrect. Check the name of the server and try connecting again with the correct server name.

  • The server machine name or address has changed.

  • When connecting from a client for the first time and the server name is not specified, providing the wrong port number can cause a failure to connect to the database. The error messages returned are:
    Could not connect to the database.
    Database server not found.
    When connecting from Interactive SQL, ensure that the name in the Server Name field is spelled correctly, that the network options on the network tab are correct, and that the database server has been started. Either provide the server name when connecting, or use the correct port number. To determine the server name and the number of the port on which the server is listening, run stop_iq (UNIX), which displays this information.
  • Port number may be out of correct range or in use by another process.

  • If you receive the either the message:
    Unable to start — server not found
    or:
    Database server not running.
    when trying to start the client, the client cannot find the database server on the network. The connection string may be incorrect or the server name cache may contain incorrect or old connection information. For example, if the server is started with a different port number, even if the client application specifies the new port number at connect time, the connection information is still taken from the server name cache.
  • You specified a character set in the CharSet connection parameter and tried to connect to a server that does not support that character set.

    Try reconnecting without specifying CharSet. If the client's local character set is unsupported by the server, the connection succeeds, but with a warning that the character set is not supported.

Action

If you suspect that you cannot connect because there is a problem with the database, look in the dbname.iqmsg file to determine where the problem occurred.

Open Database Completed indicates that the database opened without error and the problem is related to the clients connecting. If the message does not appear, then the database may have failed while opening or recovering.