Configuring and verifying installation of Sybase 12

Before you can effectively run WebSphere Application Server, you must create a Sybase database named WAS, which WebSphere Application Server uses.

Creating and configuring a database for WebSphere Application Server

Create a database named WAS by performing the following steps:

  1. Log in as the user sybase. Note that when you log in as user sybase, the command prompt changes from # to $ to indicate your login identity.
  2. Ensure that your DISPLAY, TERM, and JAVA_HOME environment variables are set properly.
  3. Start the Sybase Adaptive Server setup and configuration utility by entering the following:
    $ asecfg
  4. On the ASE Setup and Configuration screen, click Configure a new server.
  5. On the srvbuild-Select Servers to Build screen, click the radio button Adaptive Server and enter the server name. The name must match the value that you defined for the $DSQUERY environment variable.
  6. Click OK. The srvbuild-Server Attribute Editor screen displays.
  7. In the Master device path field, enter the command below. <home_directory> is the installation directory of the Sybase software and, in this example installation, the home directory of user sybase:
    <home_directory>/master
  8. Accept the default values for the Master device size (MB) and Master database size (MB) fields.
  9. In the Sybsystemprocs device path field, enter the command below. As before, <home_directory> is the installation directory of the Sybase software and the home directory of user sybase:
    <home_directory>/sybsystemprocs
  10. Accept the default values for the other fields and click Edit Advanced Adaptive Server Attributes. The srvbuild-Server Attribute Editor screen displays.
  11. In the Sybsystemdb (two-phase commit) device path field, enter the command:
    <home_directory>/sybsystemdb
  12. Accept the default values for the other fields and click Build Server!. The srvbuild-Status Output screen displays, showing the status of the various installation tasks as they execute.
  13. Near the end of the installation process, the srvbuild-question screen displays, asking if you want to localize your Adaptive Server to use a language other than U.S. English or to use a different default character set or sort order. For this example installation, click No. (If you need to change these parameters, click Yes and refer to the Sybase installation documentation for more information.)
  14. If the installation is successful, on the srvbuild-Status Output screen, the following message appears:
    Server '<server_name>' was successfully created.
    Done
  15. Click OK to exit from the srvbuild-Status Output screen.
  16. On the srvbuild-Select Servers to Build screen, click Exit.
  17. A srvbuild-question screen displays, asking if you want to exit from the utility. Click Yes.
  18. If the ASE Setup and Configuration screen continues to display, click Exit.
  19. As user sybase, use the following command to log into the Adaptive Server as user sa and create a password for user sa. The variable <home_directory> is the installation directory of the Sybase software and, in this example installation, the home directory of user sybase.
    $ <home_directory>/OCS-12_0/bin/isql -Usa -P \
    -S<server_name>> sp_password null, <new_sa_password>

    Note: The Adaptive Server installation and setup processes require certain user roles. Different user roles own different responsibilities and privileges. User sybase is the UNIX login account that owns all of the Sybase installation directories and files, sets permissions on those directories and files, and performs the installation and upgrading of Adaptive Server. User sa, created when you install the Sybase software, is not a UNIX login account; it is specific to Adaptive Server and is used to log in to Adaptive Server with the isql command. It is the Sybase System Administrator in charge of creating user accounts, assigning permissions on databases, and creating new databases. Immediately after a new installation, there is no password on the sa account, and one must be created.

  20. Use the following command to check to see if the server <server_name> is running. As before, <home_directory> is the installation directory of the Sybase software and the home directory of user sybase:
    $ <home_directory>/OCS-12_0/bin/isql -Usa -P<new_sa_password> -S<server_name>

    If server <server_name> is running, you will see the isql prompt:

    1>

  21. Type quit.
  22. Run the instmsgs.ebf script to update your SQL Server Messages to the latest installed fix level. Save the output of this step to an operating system output file.
    $ isql -Usa -P<new_sa_password> -S<server_name> -n \
    -i<home_directory>/ASE-12_0/scripts/instmsgs.ebf -o<output_file>
  23. To create database WAS, perform the following steps:
    1. Enter the command:
      $ <home_directory>/OCS-12_0/bin/isql -Usa -P<new_sa_password> \
      -S<server_name>
    2. Enter the commands:
      disk init name = 'WASDEV',
                physname = '/<home_directory>/was.dat',
                vdevno = 3,
                size = 5000  

      vdevno must be set to the next available (unused) device. To list devices in use, enter the commands:

      isql -Usa -P
      1> sp_helpdevice

      size = 5000 is equivalent to 10 MB. You might need to specify a higher value for production use. The Sybase default is 2 MB, which is too small for WebSphere Application Server. You can use the alter database command.

    3. Enter the following commands to create the database:
      go
      create database WAS on WASDEV = 10  
      go
      use WAS

      The database will be your WebSphere Application Server administrative repository specified during installation of Application Server. The database name must be in uppercase.

    4. Enter commands to create the Sybase user ID for WebSphere Application Server:
      go
      sp_addlogin EJSADMIN, <6-or-more-character_password>, WAS
      go
      sp_adduser EJSADMIN

      These commands give the database user ID and password you will use when installing WebSphere Application Server. The user ID must be in uppercase. The password must be a minimum of 6 characters.

    5. Create a Sybase user ID for EJBs:
      go
      sp_addlogin EJB, <6-or-more-character_password>, WAS

      These commands give the user ID and password you will use to access your data source for EJBs in WebSphere Application Server. The user ID must be in uppercase. The password must be a minimum of 6 characters.

    6. Enter the following commands:
      go
      sp_adduser EJB
      go
      grant all to EJSADMIN, EJB
      go
      grant role dtm_tm_role to EJB
      go
      COMMIT
      go
      use master
      go
      sp_dboption WAS, "trunc log on chkpt", true
      go
      COMMIT
      go
      use WAS
      go
      COMMIT
      go
      CHECKPOINT
      go
  24. To use the jConnect 5.2 Java Database Connectivity (JDBC) driver, set the JDBC_HOME and CLASSPATH environment variables by doing the following (for this example installation, assume the use of jConnect 5.x with JDK 1.2):
    1. Set JDBC_HOME to the directory where you have installed jConnect (in this example installation, <home_directory>/jConnect-5_2).
    2. Set CLASSPATH to the location of your jConnect JAR file (in this example installation, <home_directory>/jConnect-5_2/classes/jconn2.jar).
    3. To enable the jConnect verification steps in the section "Verifying installation of Sybase 12," append CLASSPATH with <home_directory>/jConnect-5_2/classes.
    4. Log out and log back in as user sybase to enable the changes to the environment.
  25. Enable DTM by entering the commands:
    isql -Usa -P -S<server_name>
    1> sp_configure "enable DTM", 1
    2> go

    Next, stop ASE:

    isql -Usa -P -S<server_name>
    1> shutdown
    2> go

    Finally, restart ASE:

    <Sybase_install_root>/ASE-12_0/install/startserver -f RUN_serverfile

    Later, grant dtm privileges to the user EJB.

Verifying installation of Sybase 12

  1. If you have not done so, log in as the user sybase. Note that the command prompt changes from # to $ to indicate your login identity.
  2. Use the command below to check to see if the server <server_name> is running. <home_directory> is the installation directory of the Sybase software and, in this example installation, the home directory of user sybase:
    $ <home_directory>/OCS-12_0/bin/isql -Usa -P<new_sa_password> -S<server_name>

    If server <server_name> is running, you will see the isql prompt:

    1>

  3. Use the following commands to perform an additional verification check:
    1. Shut down the server by entering these commands:
      1> shutdown
      2> go
    2. Navigate to the <home_directory>/ASE-12_0/install directory by entering:
      $ cd <home_directory>/ASE-12_0/install
    3. Start the server by entering:
      $ startserver -f RUN_$DSQUERY
      where $DSQUERY is the value that you set for this environment variable.

      Check the messages that appear to ensure that no errors are reported.

    4. Press Return when a line similar to the following displays:
      00:00000:00001:2000/05/09 13:19:14.32 server    'iso_1' (ID = 1).
  4. To verify that the jConnect driver is operating correctly, test the installation by running the supplied Version program. The Version program connects to a demonstration database that Sybase makes available on the Internet. Therefore, you must have Internet access to run the program successfully. To run the Version program, do the following:
    1. Ensure that your JAVA_HOME, JDBC_HOME, and CLASSPATH environment variables are set properly.
    2. Navigate to the directory represented by the JDBS_HOME environment variable (in this example installation, <home_directory>/jConnect-5_2) by entering the following command:
      $ cd <home_directory>/jConnect-5_2
    3. Enter the following command to run the Java program:
      java sample2.SybSample Version

      The SybSample screen appears, which displays source code in the top pane, text in the middle pane, and status information in the bottom pane. If you see the following text in the middle Sample Output pane, jConnect has been installed correctly:

      Using JDBC driver version 5.2
      jConnect  (TM) for JDBC(TM)/5.2. . .