Initializing Sybase ASE 12.5 on Linux

Note...

I've never been able to get these instructions to work 100%. On Redhat 9, there appears to be a glibc incompatibility and asecfg won't finish successfully. On Redhat 7.3, asecfg alledgedly finishes successfully but doesn't appear to create the database storage files and I get license-related failures trying to run the server. Hopefully I'm making some obvious mistake that you'll be able to avoid. If you figure out what the problem is, let me know at david.muse@firstworks.com.

Installing a license for 12.5

Unlike previous versions of Sybase ASE, version 12.5 needs to be licensed before it can be installed. If you downloaded Sybase ASE, you should have received an email from sybase with a license code in it. If the email contains the following pieces of information, then you have a "real" license:

  • Order Number
  • Feature Name
  • Feature Count
  • Software Version
  • Authorization Code

Otherwise, you have a "demo" license. A demo license will have an expiration date.

Follow these instructions to license Sybase ASE.

Log in as root and run /opt/sybase-12.5/install/sybinstall.sh

Note: If you moved /opt/sybase-12.5 to some other directory to save space on the /opt partition and then symlinked it back to /opt/sybase-12.5, the sybinstall.sh script will fail and report errors. To solve the problem, modify it as follows and re-run it. Change:
chmod ug+w `find ${SYBASE} -type d -print`
to
chmod ug+w `find ${SYBASE}/ -type d -print`

Log in as the sybase user.

You're supposed to start the license manager daemon here, but it always fails, so skip this step and run the license manager client.

The license manager client is a Java program. If you are using a kernel that supports the Native Posix Thread Library (such as the one that ships with Redhat 9), you'll need to run the following command:

export LD_ASSUME_KERNEL=2.4.1

Run lmgr. A graphical license manager application should pop up.

If you have a "real" license: Leave the radio button for Ase checked and click Next. When the "Do you have a Sybase Software Asset Management Certificate to register?" dialog pops up, click Yes.

If you have a "demo" license: Check AseDemo and click Next. A dialog will pop up asking if you have upgraded to a real license. Click No.

On the screen titled "Enter the information provided on your Sybase License Certificate", enter the information from the email you received from Sybase when you downloaded the software. Click Done.

The program will bomb out, complaining that it tried to restart the license manager, but couldn't.

Start the license server by running startd.sh $SYBASE/$SYBASE_SYSAM manually.

Now that the software has been licensed, it can be initialized.

Initializing an 12.5 Server

After installing Sybase Adaptive Server Enterprise, you can initialize the server by following these steps.

Run asecfg. A dialog will appear. Click Configure a new server.

Another dialog will appear, prompting you to Click the check boxes for the types of servers to create and provide names for these servers.

select Adaptive Server
enter a server name, I usually use localhost but any name will do
select OK

A new dialog will appear, prompting you to enter filenames for Master and Sybsystemprocs device files, and device and database sizes for each.

enter /opt/sybase-12.5/ASE/master.dat for the Master device file
enter /opt/sybase-12.5/ASE/sybsystemprocs.dat for the Sybsystemprocs device file
Select Edit Advanced Adaptive Server Attributes

A new dialog will appear, prompting you to enter filenames for the Sybsystemdb device file, size and database sizes.

enter /opt/sybase-12.5/ASE/sybsystemdb.dat for the Sybsystemdb device file
Select Go Back

This should return you to the previous dialog.

Select Build Server!

A warning dialog may appear indicating that the files are not raw device files. Ignore this warning and select Yes to proceed.

A Status Output dialog will appear. As the database is built, the dialog provides feedback about the process. When it's done, select OK.

For me, this step always fails on Redhat 9. I've tried lots of different things to try to make it work, but it never does. Hopefully it will work for you. It succeeds on Redhat 7.3 but doesn't appear to actually cratate master.dat, sybsystemprocs.dat or sybsystemdb.dat.

You should now be returned to the original dialog. Click Exit.

Starting the Database at Boot Time

The RPM distribution of Sybase ASE installs a script in /etc/rc.d/init.d which starts the database at boot time. For non-RPM distributions, you may need to install a script like the following. Replace /opt/sybase-12.5 with whatever directory Sybase ASE is installed in.

#!/bin/sh

export SYBASE=/opt/sybase-12.5

export PATH=$PATH:$SYBASE/ASE-12.5/bin:$SYBASE/ASE-12.5/install

export LANG=en_US

case "$1" in
        start)
                for i in `ls $SYBASE/ASE-12.5/install/RUN_*`
                do
                        su -c "startserver -f $i" sybase > /dev/null 2>&1;
                done
                ;;
        stop)
                kill `ps -efa | grep sybase | grep -v grep | awk '{print $2}'`
                ;;
        *)
                echo $"Usage: $0 {start|stop}"
                exit 1
esac

exit 0

Install this script and run it with the "start" option to start up the database. Running it with the "stop" option shuts the database down. To access a database, it must be running.

No comments:

Post a Comment