Home » Databases » Sybase » ASE » HOWTO: Installing and running SAP / Sybase SQL Server 11.0.3.3 esd 6 on Ubuntu Linux using KVM

HOWTO: Installing and running SAP / Sybase SQL Server 11.0.3.3 esd 6 on Ubuntu Linux using KVM

You can run KVM on just about any modern Linux distribution provided that your host is capable of providing virtualization. The folks over at HowtoForge go through the steps for Ubuntu 12.10.

What you will need for the KVM virtual machine:

  • Ubuntu Server 6.06.2 for Intel x86
  • Sybase SQL Server 11.0.3.3 esd 6 for Linux 32bit (if anyone knows of a location to legally download these let me know)

I used virt-viewer to create the virtual machine but you can create the xml file yourself if you want to. Make sure you specify:

  • Disk bus: IDE using native threads and no caching
  • 1GB of RAM or more
  • VNC or Spice display

my Sybase_11033.xml file:

<domain type='kvm'>
  <name>Sybase_11033</name>
  <uuid>85ffed98-fd6e-8475-37b0-219359c89c25</uuid>
  <description>Sybase SQL Server 11.0.3.3 on Ubuntu 6.06.02 (Dapper Drake)</description>
  <memory unit='KiB'>1048576</memory>
  <currentmemory unit='KiB'>1048576</currentmemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-1.2'>hvm</type>
    <boot dev='hd'></boot>
  </os>
  <features>
    <acpi></acpi>
    <apic></apic>
    <pae></pae>
  </features>
  <clock offset='utc'></clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='threads'></driver>
      <source file='/var/lib/libvirt/images/Sybase_11033.img'/>
      <target dev='hda' bus='ide'></target>
      <address type='drive' controller='0' bus='0' target='0' unit='0'></address>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'></driver>
      <source file='/home/jason/iso/ubuntu-6.06.2-server-i386.iso'/>
      <target dev='hdb' bus='ide'></target>
      <readonly></readonly>
      <address type='drive' controller='0' bus='0' target='0' unit='1'></address>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'></address>
    </controller>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'></address>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'></address>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:59:e1:78'></mac>
      <source bridge='br0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'></address>
    </interface>
    <serial type='pty'>
      <target port='0'></target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'></target>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'></target>
      <address type='virtio-serial' controller='0' bus='0' port='1'></address>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'></graphics>
    <video>
      <model type='qxl' vram='65536' heads='1'></model>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'></address>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'></address>
    </memballoon>
  </devices>
</domain>

Go through the install of Ubuntu Server 6.06.2. After it is completed, you will need to modify a few files:

Replace /etc/apt/sources.list with:

deb http://old-releases.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install alien

Modify /boot/grub/menu.lst adding elevator=deadline:

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
 defoptions=quiet splash elevator=deadline

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title		Ubuntu, kernel 2.6.15-51-server
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-51-server root=/dev/hda1 ro quiet splash elevator=deadline
initrd		/boot/initrd.img-2.6.15-51-server
savedefault
boot

Modify /etc/fstab to increase the size of tmpfs and to set noatime,nodiratime:

/dev/hda1       /               ext3    rw,async,noatime,nodiratime,errors=remount-ro 0       1
tmpfs		/dev/shm        tmpfs   size=900M   0 0

Modify /etc/sysctl.conf to set up the shared memory and virtual memory settings:

vm.overcommit_memory=1
vm.swappiness=5
kernel.shmmax=1073741824
kernel.shmall=1073741824

OPTIONAL: Install samba and winbind so you want to connect to your vm by name but don’t want to set up dns:

sudo apt-get install samba winbind

Modify /etc/nsswitch.conf:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns mdns wins
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

OPTIONAL (needed for samba/winbind) Modify /etc/samba/smb.conf:

# add netbios name
netbios name = sybase-11033
# modify name resolve order
   name resolve order = bcast lmhosts host wins

*RESTART* the VM

Convert the Sybase RPMs to debian packages (dpkg):

sudo alien -d *.rpm

Install Sybase SQL Server:

sudo dpkg -i *.deb

This will install the software into /opt/sybase.

Add a sybase os user and change the owner of /opt/sybase to the sybase user:

sudo adduser --home /opt/sybase --shell /bin/bash --no-create-home sybase
sudo chown -R sybase:sybase /opt/sybase

I created a /opt/sybase/.bash_profile script but you can also put this in /etc/profile if you wish:

export SYBASE=/opt/sybase

export SYBPLATFORM=linux
export LD_LIBRARY_PATH=$SYBASE/lib
export LC_ALL=default
unset LANG

export PATH=$SYBASE/bin:$PATH

Start the Sybase configuration by running as the sybase user:

$SYBASE/install/sybinit

I would recommend a 100MB or larger master device and sybsystemprocs device for 11.0.3.3. It will install just fine but if you try to start Sybase with more the 32MB of memory, it will fail. If you want to increase it you need to do two things:

  1. Increase max shared memory (kernel.shmmax and kernel.shmall) in /etc/sysctl.conf – which we already did
  2. Set the stack size to unlimited

Setting the stack size to unlimited is easy so in your RUN_server file:

#!/bin/sh
#
# Adaptive Server Information:
#  name:                          SYBASE_11033
#  master device:                 /opt/sybase/master.dat
#  master device size:            76800
#  errorlog:                      /opt/sybase/install/errorlog
#  interfaces:                    /opt/sybase
#

ulimit -s unlimited

/opt/sybase/bin/dataserver -d/opt/sybase/master.dat -sSYBASE_11033 \
-e/opt/sybase/install/errorlog -i/opt/sybase -c/opt/sybase/SYBASE_11033.cfg 

Since this is SQL Server 11.0.3.3, we don’t have to mess with LD_POINTER_GUARD.

Screenshot from 2013-03-10 16:05:31

Why you would use such an old DBMS version? You might have software that requires this version and the software vendor went out of business or discontinued the software with no upgrade path. In any case, Sybase’s SQL Server 11.0.3.3 is still useful.

Share Button

Comments

  1. Switching the disk ‘format’ from qcow2 to raw will increase performance slightly. Sadly, the virtio drivers are not available for such an old release of the kernel. The minimum kernel version for the drivers is 2.6.25. http://www.linux-kvm.org/page/Virtio

    I will test it on the same os release but a newer kernel in the next few days.

  2. Unfortunately, according to Mark Kusma (Sybase Engineering), SAP/Sybase will not be providing the 11.0.3.3 esd 6 files for Linux largely due to the SAP buy out of Sybase.

    So.. if you want to run it, you will have to search the usual places to download them. Please don’t ask me to provide the files as I haven’t been given permission to distribute the files.

    http://scn.sap.com/thread/3336080

  3. Jay says:

    It brings back good memories :O)
    what a nice version that was!
    my first major project: migration from 4.9 to 11.0.3

    to show that currently this is not just fantasy, few months ago I was working for a big telco that has still part of it’s business running on oracle 7 and 8i…

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect