Tag Archives: DBMS

HOWTO: Install SAP Sybase ASE 15.x and Linux Containers (LXC) – Ubuntu Server 13.04

Requirements:

Host OS:

  • Ubuntu Server 13.04 x86-64 (64bit)
  • At least 4GB RAM
  • 300GB available disk space

Sybase Patches:

  • If you’re going to run 32bit SQL Anywhere (or an embedded RSSD with Replication Server), you need to apply a SQL Anywhere patch: http://search.sybase.com/kbx/changerequests?bug_id=694479

Install LXC and the bridge-utils to support a network bridge:

aptitude install lxc debootstrap bridge-utils

Create the network bridge br0:

cd /etc/network

Edit interfaces:
replace:

  auto eth0
  iface eth0 inet dhcp

with:

  # LXC bridge
  auto br0
  iface br0 inet dhcp
      bridge_ports eth0
      bridge_stp off
      bridge_fd 0
      bridge_maxwait 0

  auto eth0
  iface eth0 inet manual

Restart networking:

service networking restart

Create lxc-default-sybase Apparmor profile:

cd /etc/apparmor.d/lxc
cp lxc-default lxc-default-sybase

Edit lxc-default-sybase:
replace:

  profile lxc-container-default flags=(attach_disconnected,mediate_deleted) {

with:

  profile lxc-container-default-sybase flags=(attach_disconnected,mediate_deleted) {

replace/add only if using you’re using LXC version LOWER than 0.7.5-3ubuntu60 – see LXC bug 1021411:

   deny @{PROC}/sys/kernel/** wklx,

with:

   deny @{PROC}/sys/kernel/(^shm)** wklx,

Update the kernel with the new lxc-default-sybase profile

apparmor_parser -r /etc/apparmor.d/lxc-containers

Replace /etc/lxc/lxc.conf with:

lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up

# cap the memory available to the container
lxc.cgroup.memory.limit_in_bytes = 2G

Assuming that volume group VG02 exists, let’s create the container with the name of “sybase”, and a logical volume of 100G using the xfs file system:

lxc-create -n sybase -t ubuntu -B lvm --lvname sybase --vgname VG02 --fstype xfs --fssize 100G

Before we start the ‘sybase’ container, we need to update the container configuration to use the lxc-container-default-sybase container:

cd /var/lib/lxc/sybase

Edit config:
replace:

  #lxc.aa_profile = unconfined

with:

  lxc.aa_profile = lxc-container-default-sybase

We’re ready to start the container in console mode (to start it as a daemon add -d):

lxc-start -n sybase

The default login credentials are ubuntu / ubuntu

Let’s switch to root so we can install the packages to support Sybase ASE 15.7:

sudo su - root

Enable up to 512MB of shared memory:

echo "kernel.shmmax = 536870912" >> /etc/sysctl.conf
sysctl -p

Install the packages (nmon is a great os monitoring tool but if you don’t want it, don’t include it):

dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs
apt-get install aptitude libaio1 xauth ia32-libs libstdc++5 nmon ncompress

If you want to install PPA repositories:

apt-get install python-software-properties

We need to set up the locale:

locale-gen en_US.UTF-8
echo 'LANG="en_US.UTF-8"' > /etc/default/locale

Copy the sybase software to your new Linux Container and extract it into a temporary directory.

Because Ubuntu seems to think that gzip can uncompress files compressed with the ‘compress’ command (it really can’t btw), you need to alias the uncompress with /usr/bin/uncompress.real:

alias uncompress='/usr/bin/uncompress.real'

From here, you would install and configure Sybase ASE 15.x as you normally would.

Determine ip address for eth0:

ifconfig|grep "inet addr"

In my case, the eth0 ip address is 192.168.0.115. You will either want to reserve this address with your DHCP server or setup a static ip in /etc/interfaces.

Assuming we want to keep the 192.168.0.115 address for this container, we need to modify the /etc/hosts file:
Replace:

  127.0.0.1 localhost sybase

with:

  127.0.0.1 localhost
  192.168.0.115 sybase
Share Button

How to install PostgreSQL 9 on Ubuntu Linux 10.04/10.10

Very easy, just add a repository and run apt-get install postresql-9.0 :)

Dctr Watson explains how:

Installing PostgreSQL 9.0 on Ubuntu 10.04

Share Button

Get your Sybase ASE 15.5 MDA table posters! Straight from Sybase’s Jeff Tallman

I asked Jeff Tallman if I could redistribute his excellent MDA posters for Sybase’s ASE 15.5 database server.  He said yes so …  here they are in both Adobe PDF and Sybase PowerDesigner PDM formats!

Jeff Tallman also provided us with the MDA posters for Sybase 15.0.3 last year.

Share Button

So you want to tweet to Twitter from *WITHIN* Oracle 11g? Here’s how!

Lewis Cunningham Twitterhas once again given us a gem from the world of Oracle’s relational DBMS!  This time, he has written ORA_Tweet, an API to send/receive Tweets (microblog posts) from within Oracle 11g.  Major kudos to Lewis Cunningham for writing and releasing ORA Tweet to Sourceforge.net :)

Call the Twitter API from within an Oracle database. ORA_Tweet uses the UTL_HTTP API within Oracle to call the update_status API. It is written completely in PL/SQL.

So, my question is…  Will someone write a Flickr API for Sybase ASE?

Share Button

Borderline Scamming being done by software companies

The latest craze from software vendors to companies is to charge for each and every core a machine has regardless of whether or not you’re going to use it.

Get this, if you want to buy a production license for your database/middleware/web server, the vendor (starts with an “S”) wants you to send them the hardware specs of the box.  If you tell them it is a Dell superduper server with 8 quad core CPUs and 96GBytes of RAM but you only will be using a single core for the database and devoting the rest to the middleware/webserver, you STILL have to pay the vendor for all 32 cores (8 CPUs X 4 cores).  Your software license costs is now 32 times MORE what you should have to pay IMHO.

Lots of software companies are now doing this anti-customer practice just to beef up their short term revenues.

What makes them think that you won’t go to another vendor?

  1. Their competitors are probably doing the same sales tactic
  2. They have you by the family jewels, vendor lock in, and it will cost you far too much $$$ to migrate
  3. They think that you’re too stupid and/or timid to call their bluff
  4. FUD that is spread by well meaning and well known folk that don’t know jack about the open source alternatives

Who the hell do they think they are?

Share Button