LFD: Unterschied zwischen den Versionen

Aus Admin Kuhn GmbH
Zur Navigation springen Zur Suche springen
(Die Seite wurde geleert.)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
Information as collected from documents "InstSybServerLinux12.5.1.txt" and "InstSybServerLinux12.5.4.txt" as well as from actual experience installing the new server for Waregem on 11 September 2006 (under SLES 9) resp. for Altdorf on 12 March 2008 (under SLES 10).


Last updated: [[User:Kuhn|mkuhn]] 06:07, 23 July 2008 (EDT)
==1. Pre-installation tasks==
Add user "sybase"
# groupadd sybase
# useradd -g sybase -d /home/sybase -s /bin/bash -c "Sybase user" -m sybase
# passwd sybase
Password:
Unzip the installation software
# cd /backup/software/SybaseASE-12.5.4
# tar xzf ase1254linux32.tgz
Create essential directories (Note: if possible the directories "/SunRiseDatabase" and "/SunRiseDatabaseLog" should reside on different hard disks to improve performance)
# mkdir /opt/sybase      && chown sybase:sybase /opt/sybase
# mkdir /var/spool/sybase && chown sybase:sybase /var/spool/sybase
# mkdir /SunRiseDatabase && cd /SunRiseDatabase
# mkdir sybaseDatabase  && chown sybase:sybase sybaseDatabase
# mkdir /SunRiseDatabaseLog && cd /SunRiseDatabaseLog
# mkdir sybaseDatabase      && chown sybase:sybase sybaseDatabase
resp. (as an example)
# mkdir /opt/sybase      && chown sybase:sybase /opt/sybase
# mkdir /var/spool/sybase && chown chown sybase:sybase /var/spool/sybase
# ln -s /datenbank /SunRiseDatabase && cd /SunRiseDatabase
# mkdir sybaseDatabase              && chown sybase:sybase sybaseDatabase
# ln -s /logs /SunRiseDatabaseLog && cd /SunRiseDatabaseLog
# mkdir sybaseDatabase            && chown sybase:sybase sybaseDatabase
==2. Installation of Sybase ASE==
=== Installation under SLES 8 and SLES 9 and SLES 10 ===
Set shared memory. (Example: For Basel a value of "2097152000" was configured)
# <b>/sbin/sysctl -w kernel.shmmax=121634816</b>
Become user "sybase" and start the installation
# <b>su - sybase</b>
$ <b>cd /backup/software/SybaseASE-12.5.4</b>
$ <b>./setup -console</b>
InstallShield Wizard
Initializing InstallShield Wizard...
Searching for Java(tm) Virtual Machine...
Running InstallShield Wizard...
-------------------------------------------------------------------------------
Welcome to the InstallShield Wizard for Sybase Adaptive Server Enterprise Suite
version 12.5.4 GA
The InstallShield Wizard will install Sybase Adaptive Server Enterprise Suite
on your computer.
To continue, choose Next.
Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
  31) Switzerland(German)
    Please enter the number of the location you are installing. (1-37) [1] <b>31</b>

LICENSE AGREEMENT
BELGIUM
...
Press ENTER to read the text [Type q to quit] <b>q</b>
I agree to the terms of the Sybase license for the install location
specified.(Y/N) [N]<b>Y</b>
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
Please enter the directory where you would like to install the products or
press ENTER to accept the default.
    Destination Directory [/opt/sybase]
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
Choose the setup type that best suits your needs.
To select an item enter its number, or 0 when you are finished: [0] <b>2</b>
[X] 2 - Full
        The program will be installed with all the products and features.
To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
Please wait while the installer checks your system information...
-------------------------------------------------------------------------------
Sybase Adaptive Server Enterprise Suite will be installed in the following
location:
...
Press ENTER to read the text [Type q to quit] <b>q</b>
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
Installing Sybase Adaptive Server Enterprise Suite. Please wait...
|-----------|-----------|-----------|------------|
0%        25%        50%        75%        100%
||||||||||||||||||||||||||||||||||||||||||||||||||
Creating uninstaller...
-------------------------------------------------------------------------------
The InstallShield Wizard has successfully installed Sybase Adaptive Server
Enterprise Suite. Choose Next to continue the wizard.
Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]
===Installation under SLES 8 and SLES 9===
<pre>
-------------------------------------------------------------------------------
The Adaptive Server Enterprise suite contains a number of programs in addition
to the Adaptive Server Enterprise database server. At this point in the
installation you can choose to configure various products. If you select the
options on this screen, you will be given the option of specifying
configuration options for each product or to allow the installer to set default
values for these on the next screen. If you do not choose to configure the
products at this time, you can configure them using the ASE configuration
utility at a later time.
Please deselect any products that you do not want to configure now :
      To select an item enter its number, or 0 when you are finished: [0] 3
      To select an item enter its number, or 0 when you are finished: [0] 4
      To select an item enter its number, or 0 when you are finished: [0] 5
      To select an item enter its number, or 0 when you are finished: [0] 6
      To select an item enter its number, or 0 when you are finished: [0] 7
  [X]  1  -  Configure new Adaptive Server
  [X]  2  -  Configure new Backup Server
  [ ]  3  -  Configure new Monitor Server
  [ ]  4  -  Configure new XP Server
  [ ]  5  -  Configure new Job Scheduler
  [ ]  6  -  Configure Web Services
  [ ]  7  -  Configure new Full-Text Search SDS
      To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
You have chosen to configure the products listed below. You can accept default
configuration values or provide customized values for the configuration options
required by each product. If you do not select custom configuration below, this
installer will configure the products you have selected with default values. If
you accept default values at this time you can change the configuration values
for a product at later time.
Please select the products that you want to custom configure.
      To select an item enter its number, or 0 when you are finished: [0] 1
      To select an item enter its number, or 0 when you are finished: [0] 2
  [X]  1  -  Custom configure new Adaptive Server
  [X]  2  -  Custom configure new Backup Server
      To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
Please enter custom configuration values for the new Adaptive Server
  Adaptive Server Name [BIBWAR] sisisSYB
  Port Number [5000] 4000
  Error Log [/opt/sybase/ASE-12_5/install/sisisSYB.log] /var/spool/sybase/sisisSYB.errorlog
  Page Size
      1. 2k
      2. 4k
      3. 8k
      4. 16k
  Select a page size :  [1]
  Master Device [/opt/sybase/data/master.dat] /SunRiseDatabase/sybaseDatabase/masterDev
  Master Device Size (MB) [30] 200
  Master Database Size (MB) [6] 100
  System Procedure Device [/opt/sybase/data/sysprocs.dat] /SunRiseDatabase/sybaseDatabase/sysprocsDev
  System Procedure Device Size (MB) [132] 200
  System Procedure Database Size (MB) [132]
  System Device [/opt/sybase/data/sybsysdb.dat] /SunRiseDatabase/sybaseDatabase/sybsysdbDev
  System Device Size (MB) [1] 10
  System Database Size (MB) [1]
  Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
Please enter custom configuration values for the new Backup Server
  Backup Server Name [sisisSYB_BS] sisisSYBbackup
  Port Number [5001] 4001
  Error Log [/opt/sybase/ASE-12_5/install/sisisSYBbackup.log] /var/spool/sybase/sisisSYBbackup.errorlog
  Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
</pre>
<pre>
-------------------------------------------------------------------------------
The installer will now configure new servers with the following values. Please
click Next to proceed with the server configurations.
...
  Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
 
  Building Adaptive Server 'sisisSYB':
  Writing entry into directory services...
  Directory services entry complete.
  Building master device...
  Master device complete.
  Writing RUN_sisisSYB file...
  RUN_sisisSYB file complete.
  Starting server...
  Server started.
  Building sysprocs device and sybsystemprocs database...
  sybprocs device and sybsystemprocs database created.
  Running installmaster script to install system stored procedures...
  installmaster: 10% complete.
  installmaster: 20% complete.
  installmaster: 30% complete.
  installmaster: 40% complete.
  installmaster: 50% complete.
  installmaster: 60% complete.
  installmaster: 70% complete.
  installmaster: 80% complete.
  installmaster: 90% complete.
  installmaster: 100% complete.
  installmaster script complete.
  Creating two-phase commit database...
  Two phase commit database complete.
  Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
  Macintosh and HP Roman-8)...
  Character sets installed.
  Setting server name in Adaptive Server...
  Server name added.
  Server 'sisisSYB' was successfully created.
  Building Backup Server 'sisisSYBbackup':
  Writing entry into directory services...
  Directory services entry complete.
  Writing RUN_sisisSYBbackup file...
  RUN_sisisSYBbackup file complete.
  Starting server...
  Server started.
  Setting server name in Adaptive Server...
  Server name added.
  Server 'sisisSYBbackup' was successfully created.
-------------------------------------------------------------------------------
  The installation was successful.
  Please check regularly for updates at http://www.sybase.com/downloads.
  If you have Sybase Software Asset Management Certificates to enter, this is
  done by running the tool /opt/sybase/SYSAM-1_0/bin/lmgr after the
  installation is complete.
  Press 3 to Finish or 4 to Redisplay [3]
</pre>
=== Installation unter SLES 10 ===
-------------------------------------------------------------------------------
The Adaptive Server Enterprise suite contains a number of programs in addition
to the Adaptive Server Enterprise database server. At this point in the
installation you can choose to configure various products. If you select the
options on this screen, you will be given the option of specifying
configuration options for each product or to allow the installer to set default
values for these on the next screen. If you do not choose to configure the
products at this time, you can configure them using the ASE configuration
utility at a later time.
Please deselect any products that you do not want to configure now :
    [X]  1  -  Configure new Adaptive Server
    [X]  2  -  Configure new Backup Server
    [X]  3  -  Configure new Monitor Server
    [X]  4  -  Configure new XP Server
    [X]  5  -  Configure new Job Scheduler
    [X]  6  -  Configure Web Services
    [X]  7  -  Configure new Full-Text Search SDS
      To select an item enter its number, or 0 when you are finished: [0] <b>1</b>
    [ ]  1  -  Configure new Adaptive Server
    [ ]  2  -  Configure new Backup Server
    [ ]  3  -  Configure new Monitor Server
    [ ]  4  -  Configure new XP Server
    [ ]  5  -  Configure new Job Scheduler
    [ ]  6  -  Configure Web Services
    [ ]  7  -  Configure new Full-Text Search SDS
      To select an item enter its number, or 0 when you are finished: [0]
Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
    The installation was successful.
    Please check regularly for updates at http://www.sybase.com/downloads.
    If you have Sybase Software Asset Management Certificates to enter, this is
    done by running the tool /opt/sybase/SYSAM-1_0/bin/lmgr after the
    installation is complete.
    Press 3 to Finish or 4 to Redisplay [3]
$ <b>export SYBASE=/opt/sybase \
          SYBASE_ASE=ASE-12_5 \
          SYBASE_OCS=OCS-12_5 \
          LD_POINTER_GUARD=1</b>
$ <b>cd $SYBASE/$SYBASE_ASE/init/sample_resource_files</b>
$ <b>cp srvbuild.adaptive_server.rs sisisSYB.rs</b>
$ <b>vi sisisSYB.rs</b>
sybinit.release_directory: /opt/sybase
sybinit.product: sqlsrv
sqlsrv.server_name: sisisSYB
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: <b>altdorf</b>
sqlsrv.network_port_list: 4000
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /SunRiseDatabase/sybaseDatabase/masterDev
sqlsrv.master_device_size: 200
sqlsrv.master_database_size: 100
sqlsrv.errorlog: /var/spool/sybase/sisisSYB.errorlog
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /SunRiseDatabase/sybaseDatabase/sysprocsDev
sqlsrv.sybsystemprocs_device_size: 200
sqlsrv.sybsystemprocs_database_size: 132
sqlsrv.sybsystemdb_device_physical_name: /SunRiseDatabase/sybaseDatabase/sybsysdbDev
sqlsrv.sybsystemdb_device_size: 10
sqlsrv.sybsystemdb_database_size: 1
sqlsrv.default_backup_server: sisisSYBbackup
$ <b>$SYBASE/$SYBASE_ASE/bin/srvbuildres -r sisisSYB.rs</b>
Building Adaptive Server 'sisisSYB':
Writing entry into directory services...
Directory services entry complete.
Building master device...
Master device complete.
Writing RUN_sisisSYB file...
RUN_sisisSYB file complete.
Starting server...
Server started.
Building sysprocs device and sybsystemprocs database...
sybprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
...
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server...
Server name added.
Server 'sisisSYB' was successfully created.
$ <b>cp srvbuild.backup_server.rs sisisSYBbackup.rs</b>
$ <b>vi sisisSYBbackup.rs</b>
sybinit.release_directory: /opt/sybase
sybinit.product: bsrv
bsrv.server_name: sisisSYBbackup
bsrv.new_config: yes
bsrv.do_add_backup_server: yes
bsrv.do_upgrade: no
bsrv.network_protocol_list: tcp
bsrv.network_hostname_list: <b>altdorf</b>
bsrv.network_port_list: 4001
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: /var/spool/sybase/sisisSYBbackup.errorlog
sqlsrv.related_sqlsrvr: sisisSYB
sqlsrv.sa_login: sa
sqlsrv.sa_password: USE_DEFAULT
$ <b>$SYBASE/$SYBASE_ASE/bin/srvbuildres -r sisisSYBbackup.rs</b>
Building Backup Server 'sisisSYBbackup':
Writing entry into directory services...
Directory services entry complete.
Writing RUN_sisisSYBbackup file...
RUN_sisisSYBbackup file complete.
Starting server...
Server started.
Server 'sisisSYBbackup' was successfully created.
=== Installation unter SLES 8, SLES 9 und SLES 10 ===
Überprüfen, ob alle Server laufen.
$ <b>export SYBASE=/opt/sybase \
          SYBASE_ASE=ASE-12_5</b>
$ <b>$SYBASE/$SYBASE_ASE/install/showserver</b>
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 S sybase  28831 28830  0  76  0 -  2263 -      16:32 pts/1    00:00:00 /opt/
sybase/ASE-12_5/bin/backupserver -e/var/spool/sybase/sisisSYBbackup.errorlog -N2
5 -C20 -M/opt/sybase/ASE-12_5/bin/sybmultbuf -SsisisSYBbackup
0 S sybase  28821 28820  0  75  0 - 18030 -      16:31 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -ssisisSYB -d/SunRiseDatabase/sybaseDatabase/mast
erDev -e/var/spool/sybase/sisisSYB.errorlog -c/opt/sybase/ASE-12_5/sisisSYB.cfg
-M/opt/sybase/ASE-12_5
$ <b>PATH=$SYBASE/OCS-12_5/bin:$PATH</b>
$ <b>export DSQUERY=sisisSYB LANG=de</b>
$ <b>isql -U sa -P</b>
Msg 4017, Level 16, State 1:
Server 'sisisSYB':
Neither language name in login record 'german' nor language name in syslogins
'<NULL>' is an official language name on this SQL Server.  Using server-wide
default 'us_english' instead.
1> <b>select @@version</b>
2> <b>go</b>
  Adaptive Server Enterprise/12.5.4/EBF 13388/P/Linux Intel/Enterprise Linux/ase1
          254/2006/32-bit/OPT/Fri May 19 23:17:01 2006                           
{{Alert|Irgendwann wurde hier mal auch das folgende ausgegeben.
Msg 2401, Level 11, State 2:
Server 'sisisSYB':
Character set conversion is not available between client character set 'utf8'
and server character set 'iso_1'.
No conversions will be done.
}}
{{Alert|Beim Bayerischen Landtag konnte innerhalb von PuTTY kein "@"-Zeichen angeben werden, da ansonsten gleich PuTTY versagte.}}
Set password for user "sa" (better than our 6 x):
1> <b>sp_password null, xxxxxx</b>
2> <b>go</b>
Password correctly set.
1> <b>quit</b>
Install german language support (optional):
$ <b>$SYBASE/ASE-12_5/bin/langinstall -Pxxxxxx german iso_1</b>
Loading datetime information from file /opt/sybase/locales/german/iso_1/common.loc.
Loading system messages from file /opt/sybase/locales/german/iso_1/server.loc.
7812 Messages processed.
Loading complete.
Summary: 0 deleted, 7410 inserted, 0 updated, 402 duplicates,  0 unsuccessful.
Vergrössern des Bereichs "tempdb" (typischerweise 1-2 GB auf Kundenrechnern).
$ <b>isql -Usa -Pxxxxxx</b>
1> <b>disk init name="tempdev", physname="/SunRiseDatabase/sybaseDatabase/tempDev",</b>
2> <b>size="2g",</b>
3> <b>dsync=false</b>
4> <b>go</b>
1> <b>alter database tempdb on tempdev = 2048</b>
2> <b>go</b>
Die Datenbank wird um 1048576 Seiten (2048,0 MByte) auf dem Plattenspeicher
tempdev erweitert.
Warnung: Die Datenbank 'tempdb' benutzt ein unsicheres virtuelles Device
'tempdev'. Die Wiederherstellung dieser Datenbank kann nicht garantiert werden.
1> <b>sp_addlogin sisis, sisis123</b>
2> <b>go</b>
1> <b>quit</b>
== Konfiguration des Sybase-Servers für SISIS-Sunrise ==
Es gibt einige Datenbankserver-weite Konfigurationsparameter welche für die eigenen Bedürfnisse angepasst werden müssen - die meisten "DEFAULT"-Werte sind dafür ungeeignet. Die folgenden Werte sind bloss Minimalwerte für eine Datenbank von etwa fünf SISIS-Sunrise-Benutzern.
Vor dem Ausführen muss die Datei "[[setparameters-SybaseASE-12.5.4.sh]]" angepasst werden.
* Passwort für Sybase-Benutzer "sa"
* <font color=red>Passende Parameter können allenfalls unter Zuhilfenahme der unter Sybase ASE 12.5.4 gesetzten Parameterwerte gefunden werden, welche in der Datei "/tmp/SybaseASE-12.5.4-Parameter.txt" gespeichert wurden.</font>
* Üblicherweise anzupassen ist die "number of user connections".
* Der Parameter "max online engines" sollte auf die tatsächliche Anzahl Prozessoren (wie von "top" gesehen) minus 1 gesetzt werden - aber höchstens auf die Hälfte der vorhandenen Prozessoren (Standard ist "1"). Der Wert von "3" passt beispielsweise auf einen Rechner mit 6 Prozessoren. Derselbe Wert wird dann für den Parameter "number of engines at startup" eingetragen.
# <b>cd /backup/software/AdminKuhn/Sybase/ASE-12.5.4</b>
# <b>chown sisis:sisis setparameters-SybaseASE-12.5.4.sh</b>
# <b>su sisis</b>
$ <b>vi setparameters-SybaseASE-12.5.4.sh</b>
PASSWORD="xxxxxx"
ENGINES=1
$ <b>./setparameters-SybaseASE-12.5.4.sh</b>
$ <b>exit</b>
Falls der Sybase-Server Leistungsprobleme hat, so sollte die Systemleistung gemessen und die Konfigurationswerte den Ergebnissen entsprechend angepasst werden.
== Neustart von Sybase ==
{{Info|Das benötigte Startskript "sybase" ist üblicherweise auf dem alten Rechner im Verzeichnis "/etc/init.d" zu finden.}}
Installation des Sybase-Startskripts im Verzeichnis "/etc/init.d".
# <b>cp /backup/software/SybaseASE-12.5.4/sybase /etc/init.d</b>
# <b>chown root:root /etc/init.d/sybase && chmod 744 /etc/init.d/sybase</b>
<b>Falls der Sybase-Server unter SLES 10 läuft, so muss die Variable "LD_POINTER_GUARD" am Beginn des Startskripts eingefügt und exportiert werden.</b>
# <b>vi /etc/init.d/sybase</b>
LD_POINTER_GUARD=1
export LD_POINTER_GUARD
Neustarten des Sybase-Servers um sicherzustellen, das allen ÄNderungen übernommen werden.
# <b>/etc/init.d/sybase stop</b>
# <b>/etc/init.d/sybase start</b>
kernel.shmmax = 486539264
Starting Sybase ASE ... RUN_sisisSYB RUN_sisisSYBbackup
# <b>tail -f /var/spool/sybase/sisisSYB.errorlog</b>
You should compare the boot time of the ASE with and without async i/o.
== Überprüfen der Sybase-Server ==
Es muss sichergestellt werden, dass beide Sybase-Server (sisisSYB, sisisSYBbackup) und alle konfigurierten "online engines" laufen.
# <b>su - sybase</b>
$ <b>export LANG=de \
          SYBASE=/opt/sybase \
          SYBASE_ASE=ASE-12_5</b>
$ <b>$SYBASE/ASE-12_5/install/showserver</b>
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 S sybase  29066 29057  0  75  0 - 43067 -      17:08 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -ONLINE:1,0,0xea02ca58, 0xeeaf1000, 0x9204000, 0x
1159
0 S sybase  29062 29061  0  84  0 -  2264 -      17:08 pts/1    00:00:00 /opt/
sybase/ASE-12_5/bin/backupserver -e/var/spool/sybase/sisisSYBbackup.errorlog -N2
5 -C20 -M/opt/sybase/ASE-12_5/bin/sybmultbuf -SsisisSYBbackup
0 S sybase  29057 29056  0  75  0 - 45210 -      17:08 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -d/SunRiseDatabase/sybaseDatabase/masterDev -e/va
r/spool/sybase/sisisSYB.errorlog -c/opt/sybase/ASE-12_5/sisisSYB.cfg -M/opt/syba
se/ASE-12_5 -ssisisSYB
Anzeigen aller Sybase-Server.
$ <b>$SYBASE/OCS-12_5/bin/isql -Usa -Pxxxxxx -SsisisSYB</b>
1> <b>sp_helpserver</b>
2> <b>go</b>
1> <b>quit</b>
== Hinweise ==
IP-address of the server and port number as found in the file "$SYBASE/interfaces":
sisisSYB
        master tcp ether machine-name 4000
        query tcp ether machine-name 4000
sisisSYBbackup
        master tcp ether machine-name 4001
        query tcp ether machine-name 4001
[[Kategorie:Sybase ASE]]
[[Kategorie:SISIS-Sunrise]]

Version vom 28. August 2013, 13:43 Uhr

Information as collected from documents "InstSybServerLinux12.5.1.txt" and "InstSybServerLinux12.5.4.txt" as well as from actual experience installing the new server for Waregem on 11 September 2006 (under SLES 9) resp. for Altdorf on 12 March 2008 (under SLES 10).

Last updated: mkuhn 06:07, 23 July 2008 (EDT)

1. Pre-installation tasks

Add user "sybase"

# groupadd sybase
# useradd -g sybase -d /home/sybase -s /bin/bash -c "Sybase user" -m sybase
# passwd sybase
Password:

Unzip the installation software

# cd /backup/software/SybaseASE-12.5.4
# tar xzf ase1254linux32.tgz

Create essential directories (Note: if possible the directories "/SunRiseDatabase" and "/SunRiseDatabaseLog" should reside on different hard disks to improve performance)

# mkdir /opt/sybase       && chown sybase:sybase /opt/sybase
# mkdir /var/spool/sybase && chown sybase:sybase /var/spool/sybase

# mkdir /SunRiseDatabase && cd /SunRiseDatabase
# mkdir sybaseDatabase   && chown sybase:sybase sybaseDatabase

# mkdir /SunRiseDatabaseLog && cd /SunRiseDatabaseLog
# mkdir sybaseDatabase      && chown sybase:sybase sybaseDatabase

resp. (as an example)

# mkdir /opt/sybase       && chown sybase:sybase /opt/sybase
# mkdir /var/spool/sybase && chown chown sybase:sybase /var/spool/sybase

# ln -s /datenbank /SunRiseDatabase && cd /SunRiseDatabase
# mkdir sybaseDatabase              && chown sybase:sybase sybaseDatabase

# ln -s /logs /SunRiseDatabaseLog && cd /SunRiseDatabaseLog
# mkdir sybaseDatabase            && chown sybase:sybase sybaseDatabase

2. Installation of Sybase ASE

Installation under SLES 8 and SLES 9 and SLES 10

Set shared memory. (Example: For Basel a value of "2097152000" was configured)

# /sbin/sysctl -w kernel.shmmax=121634816

Become user "sybase" and start the installation

# su - sybase
$ cd /backup/software/SybaseASE-12.5.4
$ ./setup -console
InstallShield Wizard
Initializing InstallShield Wizard...
Searching for Java(tm) Virtual Machine...
Running InstallShield Wizard...

-------------------------------------------------------------------------------
Welcome to the InstallShield Wizard for Sybase Adaptive Server Enterprise Suite
version 12.5.4 GA

The InstallShield Wizard will install Sybase Adaptive Server Enterprise Suite
on your computer.
To continue, choose Next.
Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]

-------------------------------------------------------------------------------
 31) Switzerland(German)

   Please enter the number of the location you are installing. (1-37) [1] 31

LICENSE AGREEMENT
BELGIUM
...

Press ENTER to read the text [Type q to quit] q

I agree to the terms of the Sybase license for the install location
specified.(Y/N) [N]Y

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

-------------------------------------------------------------------------------
Please enter the directory where you would like to install the products or
press ENTER to accept the default.

   Destination Directory [/opt/sybase]

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
Choose the setup type that best suits your needs.

To select an item enter its number, or 0 when you are finished: [0] 2

[X] 2 - Full
        The program will be installed with all the products and features.

To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

Please wait while the installer checks your system information...
-------------------------------------------------------------------------------
Sybase Adaptive Server Enterprise Suite will be installed in the following
location:
...
Press ENTER to read the text [Type q to quit] q 

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

Installing Sybase Adaptive Server Enterprise Suite. Please wait...

|-----------|-----------|-----------|------------|
0%         25%         50%         75%        100%
||||||||||||||||||||||||||||||||||||||||||||||||||

Creating uninstaller...

-------------------------------------------------------------------------------
The InstallShield Wizard has successfully installed Sybase Adaptive Server
Enterprise Suite. Choose Next to continue the wizard.

Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]

Installation under SLES 8 and SLES 9

-------------------------------------------------------------------------------
The Adaptive Server Enterprise suite contains a number of programs in addition
to the Adaptive Server Enterprise database server. At this point in the
installation you can choose to configure various products. If you select the
options on this screen, you will be given the option of specifying
configuration options for each product or to allow the installer to set default
values for these on the next screen. If you do not choose to configure the
products at this time, you can configure them using the ASE configuration
utility at a later time.

Please deselect any products that you do not want to configure now :

      To select an item enter its number, or 0 when you are finished: [0] 3
      To select an item enter its number, or 0 when you are finished: [0] 4
      To select an item enter its number, or 0 when you are finished: [0] 5
      To select an item enter its number, or 0 when you are finished: [0] 6
      To select an item enter its number, or 0 when you are finished: [0] 7

   [X]  1  -  Configure new Adaptive Server
   [X]  2  -  Configure new Backup Server
   [ ]  3  -  Configure new Monitor Server
   [ ]  4  -  Configure new XP Server
   [ ]  5  -  Configure new Job Scheduler
   [ ]  6  -  Configure Web Services
   [ ]  7  -  Configure new Full-Text Search SDS

      To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

-------------------------------------------------------------------------------
You have chosen to configure the products listed below. You can accept default
configuration values or provide customized values for the configuration options
required by each product. If you do not select custom configuration below, this
installer will configure the products you have selected with default values. If
you accept default values at this time you can change the configuration values
for a product at later time.

Please select the products that you want to custom configure.

      To select an item enter its number, or 0 when you are finished: [0] 1
      To select an item enter its number, or 0 when you are finished: [0] 2

   [X]  1  -  Custom configure new Adaptive Server
   [X]  2  -  Custom configure new Backup Server

      To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

-------------------------------------------------------------------------------
Please enter custom configuration values for the new Adaptive Server

   Adaptive Server Name [BIBWAR] sisisSYB
   Port Number [5000] 4000
   Error Log [/opt/sybase/ASE-12_5/install/sisisSYB.log] /var/spool/sybase/sisisSYB.errorlog
   Page Size
      1. 2k
      2. 4k
      3. 8k
      4. 16k
   Select a page size :  [1]
   Master Device [/opt/sybase/data/master.dat] /SunRiseDatabase/sybaseDatabase/masterDev
   Master Device Size (MB) [30] 200
   Master Database Size (MB) [6] 100
   System Procedure Device [/opt/sybase/data/sysprocs.dat] /SunRiseDatabase/sybaseDatabase/sysprocsDev
   System Procedure Device Size (MB) [132] 200
   System Procedure Database Size (MB) [132]
   System Device [/opt/sybase/data/sybsysdb.dat] /SunRiseDatabase/sybaseDatabase/sybsysdbDev
   System Device Size (MB) [1] 10
   System Database Size (MB) [1]

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

-------------------------------------------------------------------------------
Please enter custom configuration values for the new Backup Server

   Backup Server Name [sisisSYB_BS] sisisSYBbackup
   Port Number [5001] 4001
   Error Log [/opt/sybase/ASE-12_5/install/sisisSYBbackup.log] /var/spool/sybase/sisisSYBbackup.errorlog

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
The installer will now configure new servers with the following values. Please
click Next to proceed with the server configurations.
...

   Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
   
   Building Adaptive Server 'sisisSYB':
   Writing entry into directory services...
   Directory services entry complete.
   Building master device...
   Master device complete.
   Writing RUN_sisisSYB file...
   RUN_sisisSYB file complete.
   Starting server...
   Server started.
   Building sysprocs device and sybsystemprocs database...
   sybprocs device and sybsystemprocs database created.
   Running installmaster script to install system stored procedures...
   installmaster: 10% complete.
   installmaster: 20% complete.
   installmaster: 30% complete.
   installmaster: 40% complete.
   installmaster: 50% complete.
   installmaster: 60% complete.
   installmaster: 70% complete.
   installmaster: 80% complete.
   installmaster: 90% complete.
   installmaster: 100% complete.
   installmaster script complete.
   Creating two-phase commit database...
   Two phase commit database complete.
   Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
   Macintosh and HP Roman-8)...
   Character sets installed.
   Setting server name in Adaptive Server...
   Server name added.
   Server 'sisisSYB' was successfully created.
   Building Backup Server 'sisisSYBbackup':
   Writing entry into directory services...
   Directory services entry complete.
   Writing RUN_sisisSYBbackup file...
   RUN_sisisSYBbackup file complete.
   Starting server...
   Server started.
   Setting server name in Adaptive Server...
   Server name added.
   Server 'sisisSYBbackup' was successfully created.

-------------------------------------------------------------------------------
   The installation was successful.

   Please check regularly for updates at http://www.sybase.com/downloads.

   If you have Sybase Software Asset Management Certificates to enter, this is
   done by running the tool /opt/sybase/SYSAM-1_0/bin/lmgr after the
   installation is complete.

   Press 3 to Finish or 4 to Redisplay [3]

Installation unter SLES 10

-------------------------------------------------------------------------------
The Adaptive Server Enterprise suite contains a number of programs in addition
to the Adaptive Server Enterprise database server. At this point in the
installation you can choose to configure various products. If you select the
options on this screen, you will be given the option of specifying
configuration options for each product or to allow the installer to set default
values for these on the next screen. If you do not choose to configure the
products at this time, you can configure them using the ASE configuration
utility at a later time.

Please deselect any products that you do not want to configure now :

   [X]  1  -  Configure new Adaptive Server
   [X]  2  -  Configure new Backup Server
   [X]  3  -  Configure new Monitor Server
   [X]  4  -  Configure new XP Server
   [X]  5  -  Configure new Job Scheduler
   [X]  6  -  Configure Web Services
   [X]  7  -  Configure new Full-Text Search SDS

      To select an item enter its number, or 0 when you are finished: [0] 1

   [ ]  1  -  Configure new Adaptive Server
   [ ]  2  -  Configure new Backup Server
   [ ]  3  -  Configure new Monitor Server
   [ ]  4  -  Configure new XP Server
   [ ]  5  -  Configure new Job Scheduler
   [ ]  6  -  Configure Web Services
   [ ]  7  -  Configure new Full-Text Search SDS

      To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
-------------------------------------------------------------------------------
   The installation was successful.

   Please check regularly for updates at http://www.sybase.com/downloads.

   If you have Sybase Software Asset Management Certificates to enter, this is
   done by running the tool /opt/sybase/SYSAM-1_0/bin/lmgr after the
   installation is complete.

   Press 3 to Finish or 4 to Redisplay [3]
$ export SYBASE=/opt/sybase \
         SYBASE_ASE=ASE-12_5 \
         SYBASE_OCS=OCS-12_5 \
         LD_POINTER_GUARD=1
$ cd $SYBASE/$SYBASE_ASE/init/sample_resource_files
$ cp srvbuild.adaptive_server.rs sisisSYB.rs
$ vi sisisSYB.rs
sybinit.release_directory: /opt/sybase
sybinit.product: sqlsrv
sqlsrv.server_name: sisisSYB
sqlsrv.new_config: yes
sqlsrv.do_add_server: yes
sqlsrv.network_protocol_list: tcp
sqlsrv.network_hostname_list: altdorf
sqlsrv.network_port_list: 4000
sqlsrv.server_page_size: USE_DEFAULT
sqlsrv.force_buildmaster: no
sqlsrv.master_device_physical_name: /SunRiseDatabase/sybaseDatabase/masterDev
sqlsrv.master_device_size: 200
sqlsrv.master_database_size: 100
sqlsrv.errorlog: /var/spool/sybase/sisisSYB.errorlog
sqlsrv.do_upgrade: no
sqlsrv.sybsystemprocs_device_physical_name: /SunRiseDatabase/sybaseDatabase/sysprocsDev
sqlsrv.sybsystemprocs_device_size: 200
sqlsrv.sybsystemprocs_database_size: 132
sqlsrv.sybsystemdb_device_physical_name: /SunRiseDatabase/sybaseDatabase/sybsysdbDev
sqlsrv.sybsystemdb_device_size: 10
sqlsrv.sybsystemdb_database_size: 1
sqlsrv.default_backup_server: sisisSYBbackup
$ $SYBASE/$SYBASE_ASE/bin/srvbuildres -r sisisSYB.rs
Building Adaptive Server 'sisisSYB':
Writing entry into directory services...
Directory services entry complete.
Building master device...
Master device complete.
Writing RUN_sisisSYB file...
RUN_sisisSYB file complete.
Starting server...
Server started.
Building sysprocs device and sybsystemprocs database...
sybprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
...
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server...
Server name added.
Server 'sisisSYB' was successfully created.
$ cp srvbuild.backup_server.rs sisisSYBbackup.rs
$ vi sisisSYBbackup.rs
sybinit.release_directory: /opt/sybase
sybinit.product: bsrv
bsrv.server_name: sisisSYBbackup
bsrv.new_config: yes
bsrv.do_add_backup_server: yes
bsrv.do_upgrade: no
bsrv.network_protocol_list: tcp
bsrv.network_hostname_list: altdorf
bsrv.network_port_list: 4001
bsrv.language: USE_DEFAULT
bsrv.character_set: USE_DEFAULT
bsrv.tape_config_file: USE_DEFAULT
bsrv.errorlog: /var/spool/sybase/sisisSYBbackup.errorlog
sqlsrv.related_sqlsrvr: sisisSYB
sqlsrv.sa_login: sa
sqlsrv.sa_password: USE_DEFAULT
$ $SYBASE/$SYBASE_ASE/bin/srvbuildres -r sisisSYBbackup.rs
Building Backup Server 'sisisSYBbackup':
Writing entry into directory services...
Directory services entry complete.
Writing RUN_sisisSYBbackup file...
RUN_sisisSYBbackup file complete.
Starting server...
Server started.
Server 'sisisSYBbackup' was successfully created.

Installation unter SLES 8, SLES 9 und SLES 10

Überprüfen, ob alle Server laufen.

$ export SYBASE=/opt/sybase \
         SYBASE_ASE=ASE-12_5
$ $SYBASE/$SYBASE_ASE/install/showserver
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 S sybase   28831 28830  0  76   0 -  2263 -      16:32 pts/1    00:00:00 /opt/
sybase/ASE-12_5/bin/backupserver -e/var/spool/sybase/sisisSYBbackup.errorlog -N2
5 -C20 -M/opt/sybase/ASE-12_5/bin/sybmultbuf -SsisisSYBbackup
0 S sybase   28821 28820  0  75   0 - 18030 -      16:31 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -ssisisSYB -d/SunRiseDatabase/sybaseDatabase/mast
erDev -e/var/spool/sybase/sisisSYB.errorlog -c/opt/sybase/ASE-12_5/sisisSYB.cfg 
-M/opt/sybase/ASE-12_5
$ PATH=$SYBASE/OCS-12_5/bin:$PATH
$ export DSQUERY=sisisSYB LANG=de
$ isql -U sa -P
Msg 4017, Level 16, State 1:
Server 'sisisSYB':
Neither language name in login record 'german' nor language name in syslogins
'<NULL>' is an official language name on this SQL Server.  Using server-wide
default 'us_english' instead.
1> select @@version
2> go
 Adaptive Server Enterprise/12.5.4/EBF 13388/P/Linux Intel/Enterprise Linux/ase1
         254/2006/32-bit/OPT/Fri May 19 23:17:01 2006                            
Irgendwann wurde hier mal auch das folgende ausgegeben.
Msg 2401, Level 11, State 2:
Server 'sisisSYB':
Character set conversion is not available between client character set 'utf8'
and server character set 'iso_1'.
No conversions will be done.
Beim Bayerischen Landtag konnte innerhalb von PuTTY kein "@"-Zeichen angeben werden, da ansonsten gleich PuTTY versagte.

Set password for user "sa" (better than our 6 x):

1> sp_password null, xxxxxx
2> go
Password correctly set.
1> quit

Install german language support (optional):

$ $SYBASE/ASE-12_5/bin/langinstall -Pxxxxxx german iso_1
Loading datetime information from file /opt/sybase/locales/german/iso_1/common.loc.
Loading system messages from file /opt/sybase/locales/german/iso_1/server.loc.
7812 Messages processed.
Loading complete.
Summary: 0 deleted, 7410 inserted, 0 updated, 402 duplicates,   0 unsuccessful.

Vergrössern des Bereichs "tempdb" (typischerweise 1-2 GB auf Kundenrechnern).

$ isql -Usa -Pxxxxxx
1> disk init name="tempdev", physname="/SunRiseDatabase/sybaseDatabase/tempDev",
2> size="2g",
3> dsync=false
4> go
1> alter database tempdb on tempdev = 2048
2> go
Die Datenbank wird um 1048576 Seiten (2048,0 MByte) auf dem Plattenspeicher 
tempdev erweitert.
Warnung: Die Datenbank 'tempdb' benutzt ein unsicheres virtuelles Device
'tempdev'. Die Wiederherstellung dieser Datenbank kann nicht garantiert werden.
1> sp_addlogin sisis, sisis123
2> go
1> quit

Konfiguration des Sybase-Servers für SISIS-Sunrise

Es gibt einige Datenbankserver-weite Konfigurationsparameter welche für die eigenen Bedürfnisse angepasst werden müssen - die meisten "DEFAULT"-Werte sind dafür ungeeignet. Die folgenden Werte sind bloss Minimalwerte für eine Datenbank von etwa fünf SISIS-Sunrise-Benutzern.

Vor dem Ausführen muss die Datei "setparameters-SybaseASE-12.5.4.sh" angepasst werden.

  • Passwort für Sybase-Benutzer "sa"
  • Passende Parameter können allenfalls unter Zuhilfenahme der unter Sybase ASE 12.5.4 gesetzten Parameterwerte gefunden werden, welche in der Datei "/tmp/SybaseASE-12.5.4-Parameter.txt" gespeichert wurden.
  • Üblicherweise anzupassen ist die "number of user connections".
  • Der Parameter "max online engines" sollte auf die tatsächliche Anzahl Prozessoren (wie von "top" gesehen) minus 1 gesetzt werden - aber höchstens auf die Hälfte der vorhandenen Prozessoren (Standard ist "1"). Der Wert von "3" passt beispielsweise auf einen Rechner mit 6 Prozessoren. Derselbe Wert wird dann für den Parameter "number of engines at startup" eingetragen.
# cd /backup/software/AdminKuhn/Sybase/ASE-12.5.4
# chown sisis:sisis setparameters-SybaseASE-12.5.4.sh
# su sisis
$ vi setparameters-SybaseASE-12.5.4.sh
PASSWORD="xxxxxx"
ENGINES=1
$ ./setparameters-SybaseASE-12.5.4.sh
$ exit

Falls der Sybase-Server Leistungsprobleme hat, so sollte die Systemleistung gemessen und die Konfigurationswerte den Ergebnissen entsprechend angepasst werden.

Neustart von Sybase

Das benötigte Startskript "sybase" ist üblicherweise auf dem alten Rechner im Verzeichnis "/etc/init.d" zu finden.

Installation des Sybase-Startskripts im Verzeichnis "/etc/init.d".

# cp /backup/software/SybaseASE-12.5.4/sybase /etc/init.d
# chown root:root /etc/init.d/sybase && chmod 744 /etc/init.d/sybase

Falls der Sybase-Server unter SLES 10 läuft, so muss die Variable "LD_POINTER_GUARD" am Beginn des Startskripts eingefügt und exportiert werden.

# vi /etc/init.d/sybase
LD_POINTER_GUARD=1
export LD_POINTER_GUARD

Neustarten des Sybase-Servers um sicherzustellen, das allen ÄNderungen übernommen werden.

# /etc/init.d/sybase stop
# /etc/init.d/sybase start
kernel.shmmax = 486539264
Starting Sybase ASE ... RUN_sisisSYB RUN_sisisSYBbackup 
# tail -f /var/spool/sybase/sisisSYB.errorlog

You should compare the boot time of the ASE with and without async i/o.

Überprüfen der Sybase-Server

Es muss sichergestellt werden, dass beide Sybase-Server (sisisSYB, sisisSYBbackup) und alle konfigurierten "online engines" laufen.

# su - sybase
$ export LANG=de \
         SYBASE=/opt/sybase \
         SYBASE_ASE=ASE-12_5
$ $SYBASE/ASE-12_5/install/showserver
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
0 S sybase   29066 29057  0  75   0 - 43067 -      17:08 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -ONLINE:1,0,0xea02ca58, 0xeeaf1000, 0x9204000, 0x
1159
0 S sybase   29062 29061  0  84   0 -  2264 -      17:08 pts/1    00:00:00 /opt/
sybase/ASE-12_5/bin/backupserver -e/var/spool/sybase/sisisSYBbackup.errorlog -N2
5 -C20 -M/opt/sybase/ASE-12_5/bin/sybmultbuf -SsisisSYBbackup
0 S sybase   29057 29056  0  75   0 - 45210 -      17:08 ?        00:00:00 /opt/
sybase/ASE-12_5/bin/dataserver -d/SunRiseDatabase/sybaseDatabase/masterDev -e/va
r/spool/sybase/sisisSYB.errorlog -c/opt/sybase/ASE-12_5/sisisSYB.cfg -M/opt/syba
se/ASE-12_5 -ssisisSYB

Anzeigen aller Sybase-Server.

$ $SYBASE/OCS-12_5/bin/isql -Usa -Pxxxxxx -SsisisSYB
1> sp_helpserver
2> go
1> quit

Hinweise

IP-address of the server and port number as found in the file "$SYBASE/interfaces":

sisisSYB
        master tcp ether machine-name 4000
        query tcp ether machine-name 4000

sisisSYBbackup
        master tcp ether machine-name 4001
        query tcp ether machine-name 4001