Installation guidelines IQ 12.6 and 12.7

From SybaseWiki
Revision as of 21:23, 18 June 2008 by Psap (Talk | contribs) (Create a database)

Jump to: navigation, search

This page describes how to install and configure a Sybase IQ server.

Get the software

First download IQ.

For a licensed version you need to go http://sybase.subscribenet.com (account required) or to the Sybase eShop http://eshop.sybase.com/eshop/buy?id=48151

Members of ISUG are entitled to a free download of a developers edition of Sybase IQ 12.6 and 12.7.

Prepare the Operating System

Make sure that the filesystem for the Sybase software is big enough. A full installation needs approx. 500 Mb so 1.2 Gb should give you enough room to handle upgrades too. In this case we install the software in /opt/sybase/iq127. Database files will be stored on raw devices and in /var/sybase.

Become root and add a group "sybase" and a user "sybase" to the system. Also create the needed directories.

mkdir -p /opt/sybase
mkdir -p /var/sybase
groupadd sybase
useradd -g sybase -d /opt/sybase sybase
chown sybase:sybase /opt/sybase
chown sybase:sybase /var/sybase

The shell script to start Sybase iq (start_asiq) also needs "csh" so make sure it is installed. When you install IQ on a Debian type system (like Ubuntu) you need to create a /usr/tmp directory. When the directory does not exists, or is not writeble by the IQ installation software, the installation will fail.

Prepare the Installation

Now, switch to the newly created user:

su - sybase

You should now be in the directory /opt/sybase. Make a work directory and put the downloaded Sybase software in it.

mkdir work
mkdir iq127
cd work
<put the software in this directory>
tar -xf <software-distro>

Installation

Set the SYBASE variable before installation to the directory where the software will be installed.

export SYBASE=/opt/sybase/iq127

Start the installation by running sybinstall. When you have the option on the first screen to choose "Sybase IQ ETL Server", then do not choose that option, but select "Sybase IQ server". During installation you can specify a new password for the DBA account.

./sybinstall

When the installation has finished succesful you can safely remove the work directory.

cd ..
rm -Rf work

Setup your environment

In /opt/sybase/iq127/ASIQ-12_7 you will find a few files, like ASIQ-12_7.csh and ASIQ-12_7.sh. Depending on the type of shell you use, you need to source in one of these. For instance, when your default shell is bash you should do this:

. $SYBASE/ASIQ-12_7/ASIQ-12_7.sh

Is is fairly common to activate such a script from your login script.

Install optional EBF's

At the time of writing a few EBF's have already been released for IQ 12.7 You can download these from http://downloads.sybase.com To install an EBF just untar the file and run sybinstall.

Install OpenClient software

When you have installed Sybase IQ, check if the OpenClient software is also installed. You should see a directory called "OCS-15_0" in $SYBASE. When it's not there, follow these steps to install it.

  • Get hold of an ASE installation package. Linux users may retrieve one at http://www.sybase.com/linuxpromo
  • Put the software in a work directory and untar (tar -xf <file>)
  • ./setup -console
  • Within "setup" choose "Custom" as type to setup, then deselect all features except connectivity and Language modules. Finish setup.

You should now see some extra directories and files in $SYBASE

Create raw devices

For performance reasons you should use raw devices for the IQ Main and Temporary store. For testing purposes use 2Gb for the Main store and 1 Gb for the Temporary store. You can always add more when needed. Do not forget to chown the raw devices to the sybase user. Check if this setting is persistent after a reboot. Note: contrary to Sybase ASE behaviour, Sybase IQ will only accept raw devices and not "block special". Check the filetype with the "file" command. When needed, bind a block special device to a raw device with the "raw" command.

Start the IQ server (utility database only)

Before you can create a database the IQ server must be started with only the utility database active.

start_asiq -n IQ1

Create a database

Create a directory where server specific files will be stored

cd /var/sybase
mkdir IQ1
cd IQ1

Create a connection to the IQ server with dbisqlc.

dbisqlc

On the first screen do "Cancel"

Dbisqlc1.gif

On the next screen click on "Command" and "Connect…". Fill in the username / password combination as specified during sybinstall, use "utility_db" as database name.

Dbisqlc2.gif

In the command section of the screen you can now type the command to create a database. See screenshot below for the beginning of the command, see text further down for full command.

Dbisqlc3.gif

This example creates a database of 2000 Mb and a temporary store of 1000 Mb.

create database '/var/sybase/IQ1/IQ1.db'
transaction log on '/var/sybase/IQ1/IQ1.log'
mirror '/var/sybase/IQ1/IQ1_mirror.log'
iq path '/var/sybase/IQ1/IQ1_01.iq'
iq size 2000
message path '/var/sybase/IQ1/IQ1.iqmsg'
temporary path '/var/sybase/IQ1/IQ1_01.iqtmp'
temporary size 1000

When the database has been successfully created, exit from dbisqlc.

Then shutdown the IQ server.

stop_asiq

Create a configuration file

In the directory /var/sybase/IQ1 create a configuration file called IQ1.cfg with at least the following content

-n IQ1
-iqmc 60
-iqtc 140
-x tcpip{port=4000}

This configuration file sets the name of the server, the main cache size to 60Mb, the temp cache size to 140Mb and a port number for TCP/IP traffic. Specify as much memory as you can. Sybase recommends to keep the ration between main and temp cache 3:7.

Then start the database

start_asiq @IQ1.cfg IQ1.db

Notes

  • In this example the mirror of the IQ transaction log is on the same physical device at the transaction log itself. Do not create such a situation on a production system.
  • The Sybase IQ logfiles are created in the directory $ASDIR/logfiles. Since the logfiles can become very big, its best to set the variable ASLOGDIR to /var/sybase/IQ1 before starting the IQ server.