LFD

Aus Admin Kuhn GmbH
Zur Navigation springen Zur Suche springen

Software installation

As usual first install the needed SISIS-SunRise packages, at least

  • package
  • sisis-pap
  • sisisbase

Be sure to install the needed versions!

For more information about this read the release notes ("Freigabemitteilung") and the how-to "unixForSISIS.txt".

Of course you must choose the Sybase trunk and provide the necessary password information for Sybase during the installation process of SISISBASE; you will be asked for

  • approval to install Sybase at all
  • the full path of $SYBASE (preferred "/opt/sybase")
  • the name of the Sybase user under SISIS-SunRise (preferred "sisis")
  • the Sybase password of that Sybase user
  • the Sybase password of the Sybase administrator "sa"

The information will be stored read-only for the Linux user "sisis" into the file "/opt/lib/sisis/etc/syb/syb.pw".

If you change the information later by hand keep in mind that the information is also stored in Sybase (the passwords for users "sa" and "sisis") and even in the created SISIS-SunRise database (i. e. that Sybase user "sisis" is allowed to connect to the database).

Creating database "sisis"

After the installation of sisisbase create the database with these SQL files:

  • "DiskInit.sql" creates the devices for ASE
  • "CreatDb.sql" creates the database, gives the devices to the database and add segments, set some parameters

You have to fit these files to your environment and to the structure of your database. Please insert the values of the device_fragments in "pages" ( value = 1024 * device_fragments [MB] / 2 ). If your connection is unreliable you can also run them in the nohup-mode.

Don't run these files unmodified - this can accidentally override files in your filesystem.

The actual standard file "DiskInit.sql.orig" for SISIS-SunRise V4.0 looks like this.

/* $Id: DiskInit.sql 237392 2009-07-22 14:11:02Z bajdalaj $ */

disk init                                /* explanation:                   */
name="datadev",                          /* logical name                   */
physname="/dev/sybaseDatabase/datadev",  /* file  or link to raw device  */
size="4G",                               /* size in M or G */
dsync=false                              /* for files for better performance */
go

disk init                                /* explanation:                   */
name="logdev",                           /* logical name                   */
physname="/dev/sybaseDatabase/logdev",   /* file  or link to raw device  */
size="2G",                               /* size in M or G */
dsync=false                              /* for files for better performance */
go

The actual standard file "CreateDb.sql.orig" for SISIS-SunRise V4.0 looks like this.

sp_configure "lock scheme", 0, datarows
go

create database sisis
on DBsisisdev=10240
log on logdev=4096
go

sp_dboption "sisis","select into/bulkcopy","true"
go

sp_dboption sisis,"auto identity","true"
go

sp_dboption sisis,"trunc. log on chkpt.", true
go

use sisis
go

checkpoint
go

execute sp_adduser "sisis"
go
if @@error != 0
begin
 print "Error in adding the user $USER in database."
 rollback transaction
end
go

grant ALL to sisis
go
if @@error != 0
begin
 print "Error in granting the permissions to $USER."
 rollback transaction
end
go

use master
go

Configure the files "DiskInit.sql" and "CreatDb.sql" and execute them as user "sisis".

$ . /opt/lib/sisis/etc/syb.rc && export LANG=de
$ $SYBASE/OCS-12_5/bin/isql -Usa -Pxxxxxx -SsisisSYB -i /home/sisis/sc/DiskInit.sql
$ $SYBASE/OCS-12_5/bin/isql -Usa -Pxxxxxx -SsisisSYB -i /home/sisis/sc/CreatDb.sql

Don't worry - processing of both scripts will take some time without output!

Check Sybase disk allocations

Check the disk allocations of Sybase

$ $SYBASE/OCS-12_5/bin/isql -Usisis -Psisis123 -SsisisSYB
1> sp_helpdb sisis
2> go

In the case of Waregem the output looked like this:

 device_fragments               size          usage
         created                   free kbytes
 ------------------------------ ------------- --------------------
         ------------------------- ----------------
 DBsisisdev                        10240.0 MB Nur Daten
         Sep 12 2006 11:18AM               10443606
 logdev                             4096.0 MB Nur Log
         Sep 12 2006 11:18AM       nicht zutreffend

 --------------------------------------------------------------
 Nur Log free kbytes = 4177918

Become user "root" and create a symbolic link to avoid perl error messages. Note: Check, whether the package "glibc-locale-2.2.5-163.i586.rpm" is already installed - otherwise install it first!

# cd /usr/lib/locale
# ln -s de_DE@euro de

Backup

# mkdir -p /backup/sybase
# chmod 777 /backup/sybase

Backup your (still completely empty) database:

# su - sisis
$ . /opt/lib/sisis/etc/syb.rc && export LANG=de
$ $SYBASE/OCS-12_5/bin/isql -Usa -Pxxxxxx -SsisisSYB
1> dump database sisis to "compress::/backup/sybase/DBSAVEsisis.20060911.cdmp"
2> go

If you need to configure your database for SISIS-SunRise the document Configuration of database "sisis" for SISIS-SunRise may be useful to you.

Easy login

For an easy login as Sybase user "sa" create the file "/home/sisis/bin/SybSQLsa" with rights "700".

#!/bin/bash
# Name          SybSQLsa
# Date          2010.02.02
# Author        Michael Kuhn, OCLC AG
# Description   Automatic login as user "sa"

##### AUTOMATIC CONFIGURATION #####

. $(pkgparam sisisbase SISISROOT)/etc/syb.rc
if   [ "$(echo ${SC_SQL} | grep -q 12_5 ; echo $?)" = 0 ]; then
  export LANG=de
elif [ "$(echo ${SC_SQL} | grep -q 15_0 ; echo $?)" = 0 ]; then
  export LANG=de_DE.UTF-8
else
  echo "Unknown Sybase version. No connection possible"
  exit 1
fi
SYBASEUSER=sa
PASSWORD=$(cat ${SISISROOT}/etc/syb/syb.pw | \
  grep ^${SYBASEUSER}: | awk -F: '{ print $2 }' | tr -d '\012')

##### MANUAL CONFIGURATION #####

SYBASESERVER=sisisSYB

##### MAIN #####

${SC_SQL} -U${SYBASEUSER} -P${PASSWORD} -S${SYBASESERVER}

For an easy login as Sysbase user "sisis" and database "sisis" create the file "/home/sisis/bin/SybSQLsisis_DBsisis" with rights "700".

#!/bin/bash
# Name          SybSQLsisis_DBsisis
# Date          2010.02.02
# Author        Michael Kuhn, OCLC AG
# Description   Automatic login as user "sisis" into database "sisis"

##### AUTOMATIC CONFIGURATION #####

. $(pkgparam sisisbase SISISROOT)/etc/syb.rc
if   [ "$(echo ${SC_SQL} | grep -q 12_5 ; echo $?)" = 0 ]; then
  export LANG=de
elif [ "$(echo ${SC_SQL} | grep -q 15_0 ; echo $?)" = 0 ]; then
  export LANG=de_DE.UTF-8
else
  echo "Unknown Sybase version. No connection possible"
  exit 1
fi
SYBASEUSER=sisis
PASSWORD=$(cat ${SISISROOT}/etc/syb/syb.pw | \
  grep ^${SYBASEUSER}: | awk -F: '{ print $2 }' | tr -d '\012')

##### MANUAL CONFIGURATION #####

DATABASE=sisis
SYBASESERVER=sisisSYB

##### MAIN #####

${SC_SQL} -U${SYBASEUSER} -P${PASSWORD} -S${SYBASESERVER} -D${DATABASE}