Installing stored procedures

For jConnect to function properly, you must install stored procedures and tables on the Adaptive Server Enterprise or Adaptive Server® Anywhere database to which your application will be connecting. jConnect provides the these scripts to install the required stored procedures and tables:

NoteIf you use Adaptive Server 12.5.3 or later, or ASA 9.0.2 or later, the scripts come pre-installed on the server. You need to install these scripts only if you have a later version of the driver than the one that shipped with Adaptive Server. In addition, for backward compatibility, sql_server.sql and sql_server12.sql are included on Adaptive Server 11.9.2 and 12.0 respectively, although these versions are no longer supported.

StepsRunning stored-procedure installation scripts

  1. Verify that your JAVA_HOME, JDBC_HOME, and CLASSPATH environment variables are set.

  2. Use the IsqlApp sample application. For more information on IsqlApp, see “Installing stored procedures on an Adaptive Server database”.

StepsInstalling stored procedures on an Adaptive Server database

  1. Go to the $JDBC_HOME/classes directory and enter:

    • For Adaptive Server version 15.x:

      java IsqlApp -U sa -P password -S jdbc:sybase:
       	Tds:[hostname]:[port] -I $JDBC_HOME/sp/sql_server15.0.sql -c go
      
    • For Adaptive Server version 12.5.x:

      java IsqlApp -U sa -P password -S jdbc:sybase:
       	Tds:[hostname]:[port] -I $JDBC_HOME/sp/sql_server12.5.sql -c go
      

StepsInstalling stored procedures on a SQL Anywhere or Adaptive Server Anywhere database

  1. Go to the $JDBC_HOME/classes directory and enter:

    java IsqlApp -U dba -P password -S jdbc:sybase:
     	Tds:[hostname]:[port] -I $JDBC_HOME/sp/sql_asa.sql -c go