Configuring and verifying installation of Sybase 12

Before you can run WebSphere Application Server, you must create a Sybase database named WAS, which 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 appears as $, rather than #, to indicate your login identity.
  2. Ensure that your DISPLAY, TERM, and JAVA_HOME environment variables are set properly. Additionally, check that your PATH environment variable includes the path to your Java installation.
  3. Start the Sybase Adaptive Server setup and configuration utility by entering the following: $ asecfg

    The ASE Setup and Configuration window displays.

  4. Click Configure a new server. The srvbuild-Select Servers to Build window displays.
  5. Click the radio button beside the Adaptive Server option and enter the server name. This name must match the value that you defined for the $DSQUERY environment variable.
  6. Click OK. The srvbuild-Server Attribute Editor window displays.
  7. In the Master device path field, enter the following (where <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 following:
    <home_directory>/sybsystemprocs
  10. Accept the default values for the other fields and click Edit Advanced Adaptive Server Attributes. The srvbuild-Server Attribute Editor window displays.
  11. In the Sybsystemdb (two-phase commit) device path field, enter the following:
    <home_directory>/sybsystemdb
  12. Accept the default values for the other fields and click Build Server!. The srvbuild-Status Output window opens, which shows the status of the various installation tasks as they execute.
  13. Near the end of the installation process, the srvbuild-question window 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. Refer to the Sybase installation documentation for more information.)
  14. If the installation is successful, on the srvbuild-Status Output window, the following message appears:
    Server '<server_name>' was successfully created.
    Done
  15. Click OK to exit from the srvbuild-Status Output window. The srvbuild-Select Servers to Build window displays.
  16. Click Exit to exit from this window. A srvbuild-question window displays, asking if you want to exit from the utility.
  17. Click Yes.
  18. If the ASE Setup and Configuration window continues to display, click Exit to exit from this window.
  19. As user sybase, use the following command to log into the Adaptive Server as user sa and check to see if the server <server_name> is running (where <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>

    If server <server_name> is running, the isql prompt displays (1>).

    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.

    After the initial Sybase install, the password for user sa is NULL. As user sybase, set the password:

    isgl -Usa -P -S<server_name>
    1> sp_password null, <new_password>
    2> go
  20. Type quit.
  21. 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.
    $ <home_directory>/OCS-12_0/bin/isql -Usa -P -S<server_name> -n \
     -i<home_directory>/ASE-12_0/scripts/instmsgs.ebf -o<output_file>
  22. To create the database WAS, perform the following steps:
    1. Enter the command:
      $ <home_directory>/OCS-12_0/bin/isql -Usa -P -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
  23. To use the jConnect 5.2 Java Database Connectivity (JDBC) driver, update the .profile file by setting the JDBC_HOME and CLASSPATH environment variables. Set these 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.
  24. 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. Log in as the user sybase. Note that when you log in as user sybase, the command prompt appears as $, rather than #, to indicate your login identity.
  2. Use the following command to check to see if the server <server_name> is running (where <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>

    If server <server_name> is running, the isql prompt displays (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 the following:
      $ cd <home_directory>/ASE-12_0/install
    3. Start the server by entering the following:
      $ startserver -f RUN_<server_name>
      where <server_name> is the value that you set for the DSQUERY 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 JDBC_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 window displays, showing the source code for the Version program 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. . .
    4. On the File menu, click Close to exit from the SybSample window.