Connecting to Adaptive Server Anywhere  Connecting to a server using JNDI

Chapter 2: Programming Information

Connecting to Adaptive Server Anywhere 5.x.x

If you have to connect to Adaptive Server Anywhere version 5.x.x through jConnect, you must run the Adaptive Server Anywhere Open Server Gateway dbos50, which is distributed with Adaptive Server Anywhere.

  1. Install Open Server Gateway 5.5.x3 or later and the Open Server DLLs. Use Open Server DLLs, version 11.1.

  2. Add an entry for the gateway to your %SYBASE%\ini\sql.ini file (using, for example, sqledit).

  3. Start the gateway by entering:

    start dbos50 gateway-demo 
    

    where gateway-demo is the gateway name defined in step 2.

  4. When the Open Server Gateway is running, you can define a connection as follows:

    jdbc:sybase:Tds:host:port
    

    host is the host name where the Adaptive Server Anywhere and Open Server gateway is running, and port is the port number defined in sql.ini.

NoteTo support multiple Adaptive Server Anywhere databases, use sqledit to add an entry with a different port for each database, then run the Open Server Gateway for each database.





Copyright © 2003. Sybase Inc. All rights reserved. Connecting to a server using JNDI

View this book as PDF