Using isql from a command line

NoteIf you are using isql on the same machine on which you installed ECDA, you must add an access service entry to the interfaces file that points to the access service you are testing.

StepsTo verify the access service configuration using isql

  1. On the client machine, use dsedit to create an interfaces file entry for the access service.

    Be sure to enter the access service name exactly as you defined it in the configuration file or by using DirectConnect Manager.

  2. Set the environment variables from a command line prompt by running one of the following environment scripts, as appropriate for your platform:

    • DC_SYBASE.csh

    • DC_SYBASE.sh

  3. Run isql from the command line by entering the following:

    isql -SServiceName -Uuserid -Ppassword
    

    where:

    • ServiceName is the name of the access service exactly as you defined it in the interfaces file.

    • userid is a valid user ID for the target database.

    • password is a valid password for the user ID in the target database.

    If the connection is successful, a 1> prompt appears.

    NoteIf you cannot connect, the access service might not be running. Start the access service with DirectConnect Manager or edit the configuration file, and then verify that the Enable at Startup parameter is set to Yes. This starts the access service automatically when the server is started.

  4. At the 1> prompt, query a table in the target database by entering a select statement and pressing Return.

  5. At the 2> prompt, enter:

    go
    

    Press Return.

    The query should run and return a result set, followed by a >1 prompt.

  6. To exit isql, enter this at the 1> prompt:

    exit
    

    Press Return.

    A regular operating system command appears.

NoteAt this point, you can stop the DirectConnect server using the stopsvr utility, which shuts down the server and terminates all client connections. However, if you plan to perform post-installation tasks for the client and server, leave both the DirectConnect server and access service running.