Sybase 12.x Server

(all platforms)

If you are installing LeasePak for the first time, follow the procedures detailed in LeasePak Server Preparation and Installation before proceeding with this document. If you are upgrading or updating your LeasePak installation, follow the procedures in LeasePak Server Upgrade and Conversion. Use the blue Print button at the top of the page to print this document if needed as a reference while preparing the DBMS server.

 


 

Procedure Overview

  1. Review system requirements:

    Refer to the document System Requirements to verify that your server meets the minimum requirements for running the DBMS and LeasePak server software.

  1. Perform the required OS configurations.
  1. Install the Sybase server software:

    Installation of the DBMS server software is beyond the scope of the System Administration Guide. Refer to your Sybase documentation for installation procedures.

  1. Prepare the Sybase server for LeasePak.
  1. Perform DBMS server maintenance as needed.

 


 

Required Volumes/Partitions

The following volumes/partitions must be unformatted (raw).

Sybase master Database

HP Examples Linux Examples Sun Examples Your Values
File System/Mount Pointnonenonenone
Owner:Groupsybase:sybasesybase:sybasesybase:sybase
PermissionsN/AN/AN/A
Size32 MB minimum32 MB minimum32 MB minimum
Physical Locationnot on vg00not on disk slice 0
(Logical) Volume Namesybmastersydbdev1
Typeraw partitionraw partitionraw partition

 

Sybase sybsystemprocs Database

HP Examples Linux Examples Sun Examples Your Values
File System/Mount Pointnonenonenone
Owner:Groupsybase:sybasesybase:sybasesybase:sybase
PermissionsN/AN/AN/A
Size100 MB minimum100 MB minimum100 MB minimum
Physical Locationnot on vg00not on disk slice 0
(Logical) Volume Namesybsysprocssydbdev1
Typeraw partitionraw partitionraw partition

 

Sybase tempdb Database

HP Examples Linux Examples Sun Examples Your Values
File System/Mount Pointnonenonenone
Owner:Groupsybase:sybasesybase:sybasesybase:sybase
PermissionsN/AN/AN/A
Size300 MB minimum300 MB minimum300 MB minimum
Physical Locationnot on vg00not on disk slice 0
(Logical) Volume Namesybtempdbsydbdev1
Typeraw partitionraw partitionraw partition

 

LeasePak Sybase Database(s)

HP Examples Linux Examples Sun Examples Your Values
File System/Mount Pointnonenonenone
Owner:Groupsybase:sybasesybase:sybasesybase:sybase
PermissionsN/AN/AN/A
Size1024 MB minimum1024 MB minimum1024 MB minimum
Physical Locationnot on vg00not on disk slice 0
(Logical) Volume Namemsi_data01sydbdev1
Typeraw partitionraw partitionraw partition
Must be a raw partition. Do not set up on same disk as LeasePak Sybase database transaction log(s).

 

LeasePak Sybase Transaction Log(s)

HP Examples Linux Examples Sun Examples Your Values
File System/Mount Pointnonenonenone
Owner:Groupsybase:sybasesybase:sybasesybase:sybase
PermissionsN/AN/AN/A
Size350 MB minimum350 MB minimum350 MB minimum
Physical Locationnot on vg00not on disk slice 0
(Logical) Volume Namemsi_log01sydbdev1
Typeraw partitionraw partitionraw partition
Must be a raw partition. Do not set up on same disk as LeasePak Sybase database(s).

 

 

Additional Requirements

 HP

Kernel Parameters

shmmax

Configure this either through SAM or by way of direct commands. After setting the value, reboot the system to rebuild the kernel.

DescriptionMaximum ValueYour Value
shared memory maximum the lesser of (1) the amount of lockable memory available, as displayed with the command dmesg or (2) 1792 MB. You can set shmmax lower than the maximum, depending on your DBMS processing needs. Refer to the section on the Sybase parameter "total memory" for more information.

Using SAM to configure shmmax enforces the 1792 MB limit. You can set shmmax higher by using direct commands to configure the parameter and rebuild the kernel.

 

Asynchronous I/O Device

Sybase requires an asynchronous I/O device. Configure the device using the following steps:

  1. Add the "Asynchronous Disk Pseudo Driver" to the kernel, either through SAM (Kernel Configuration, Drivers) or manually by way of direct commands.
  2. Create the asynchronous I/O device:
    1. execute the command  mknod /dev/async c 101 4
    2. change the owner:group to sybase:sybase
    3. change the permissions to 660
  3. set the DBMS server parameter allow sql server async i/o to 1 (on).

 

1192 Link

Create a symbolic link allowing certain older LeasePak executables access to the Sybase shared object libraries.

Ownersybase
Location/opt/sybase
Link Name1192/lib
Target/opt/sybase/OCS-12_0/lib

Be sure to create a symbolic link.

 

 

 Linux: Additional Requirements

Kernel Parameters

The value 526551040 is an example only. Configure these parameters using the lesser of either your total physical memory or 4 GB. See the section on the DBMS server parameter "total memory" for more information.

shmmax

To change this parameter without rebooting the system, use one of the following commands:

To load this value into the kernel after each boot, use the following command to add it to the file /etc/sysctl.conf (otherwise the value will be lost on reboot):

 

shmall

To change this parameter without rebooting the system, log in as root, then use one of the following commands:

To load this value into the kernel after each boot, log in as root, then use the following command to add it to the file /etc/sysctl.conf (otherwise the value will be lost on reboot):

 

 

 Sun: Additional Requirements

Kernel Parameters

shmsys:shminfo_shmmax

DescriptionMaximum ValueYour Value
shared memory maximum Set either at maximum physical memory or lower, depending on your DBMS processing needs. As a guide, you can use the following sliding scale: 70% of 2 GB total physical memory to 50% of 4 GB total physical memory. See the DBMS server parameter "total memory" for more information.

 

shmsys:shminfo_shmseg

DescriptionMinimum ValueYour Value
shared memory segments 120 segments

 


 

DBMS Server Preparation

Version Verification

Verify you are running the correct dataserver for your platform:


HP, Sun: either query the @@version variable within SQL or use the showserver command from the /opt/sybase/ASE-12_0/install directory. The version must be either be 12.0.0.2 for HP or 12.0.0.1 for Sun.


Linux: either query the @@version variable within SQL or use the showserver command from the /opt/sybase/ASE-12_5/install directory. The version must be 12.5.0.3.

 

Disk Devices

You must initialize the raw partitions set up for the LeasePak Sybase database(s) and transaction log(s). Use the Sybase command disk init to make Sybase disk devices from the raw partitions. For more information on the disk init command, refer to your Sybase documentation or contact your MSI representative.

To avoid problems recovering data from a server crash, create and initialize separate partitions for the data and transaction log segments of the LeasePak database. Do not place either segment on the partition used by the Sybase system databases such as master, sybsystemprocs, or tempdb.

 

Sybase Parameters

Parameters apply to both versions of Sybase (12.0 and 12.5) and all OS platforms unless otherwise indicated. The values below are minimum requirements only. You may need to alter these further to achieve optimum DBMS server performance.

Sybase parameters not listed here: for LeasePak to function correctly, leave all other Sybase parameters at their default values. In particular, leave the parameter "max parallel degree" set to 1. In most cases this is the Sybase default, but check the parameter value to be sure. For more information, contact your MSI representative.

 

"additional network memory"

DescriptionMinimum ValueYour Value
memory allotted for network activity "max network packet size" * number of users * number open connections * 1.2, where number open connections = 2 + number of simultaneously open windows (updates, reports, etc.) in an average user's LeasePak session, and 1.2 allows for 20% overhead.

 

Linux only (Sybase 12.5): "allocate max shared memory"

DescriptionRequired ValueYour Value
switch for whether or not to allocate the entire amount of configured memory to "max memory". Setting the value to 0 can result in substantial problems with DBMS server performance. 1 (allocate the entire amount) 1

 

"allow sql server async i/o"

DescriptionRequired ValueYour Value
switch for whether or not to use asynchronous I/O 1 (use asynchronous I/O) 1

 

Linux only (Sybase 12.5): "max memory"

DescriptionMaximum ValueYour Value
maximum of OS shared memory allocated to the DBMS server The maximum is 75% of the value configured for the kernel parameter shmmax. You may need less than this, depending on your DBMS server processing needs.

 

"max network packet size"

DescriptionMinimum ValueYour Value
maximum packet size for information passing between LeasePak client and DBMS server 4096 bytes

 

"max online engines"

DescriptionRequired ValueYour Value
number of dataserver engines (1 engine = use of 1 CPU) 1

 

"number of devices"

DescriptionMinimum ValueYour Value
maximum number of available devices (each LeasePak database counts as 1 device; each LeasePak transaction log counts as 1 device) 10 (Sybase default)

 

"number of locks"

DescriptionMinimum ValueYour Value
maximum number of available locks within Sybase 5000 (Sybase default)

 

"number of open databases"

DescriptionMinimum ValueYour Value
maximum number of concurrent open databases (these include Sybase system databases such as master, sybsystemprocs, and tempdb) 12

 

"number of user connections"

DescriptionMinimum ValueYour Value
maximum number of simultaneous connections to the DBMS server M * (G + 2), where M is maximum concurrent users and G is the average number of Genform windows concurrently open for each user.

 

HP, Sun only (Sybase 12.0): "procedure cache percent"

DescriptionMinimum ValueYour Value
percentage of all the OS shared memory used by Sybase that can be used by the procedure cache For 1 GB Sybase shared memory, minimum 15 percent. As the amount of Sybase shared memory increases, decrease this percentage.

 

"stack size"

DescriptionMinimum ValueYour Value
maximum size of the dataserver's execution and argument stack size 88064

 

"tcp no delay"

DescriptionMinimum ValueYour Value
switch for whether or not to allow TCP delays in communications with Sybase 1 (don't allow TCP delays)

 

HP, Sun only (Sybase 12.0): "total memory"

DescriptionMaximum ValueYour Value
maximum of OS shared memory allocated to the DBMS server The maximum is 75% of the value configured for the kernel parameter shmmax. You may need less than this, depending on your DBMS server processing needs.

 


 

Database Owner

LeasePak now requires that you specify a database owner (dbo) for each LeasePak database, separate from the DBMS administrative user (srvadm or sa). During installation, the LeasePak setup program will ask if you want to automatically create database owners. If you answer 'Y', then LeasePak will automatically create a database owner name when needed. This name will match the database name. LeasePak will prompt you to supply a new password for the database owner. If you answer 'N', you will need to create dbo names and passwords for each new or converted LeasePak database.

For users upgrading from a version before 5.1a, the conversion program sgenlpux_conversion will do one of the following for the database owner:

 


 

Maintenance

For general maintenance of the LeasePak server, refer to the Maintenance and Troubleshooting section of LeasePak Server Configuration and Maintenance for more information.

Backups

Prevent data changes during a Sybase backup by setting the sp_dboption "dbo use only" to true.

LeasePak db_snapshot and db_restore

You must use the LeasePak server scripts db_snapshot and db_restore to properly back up LeasePak databases. Refer to the Backups section of LeasePak Server Configuration and Maintenance for more information.

Database Dump

In addition to using snapshot and restore, periodically back up all Sybase databases, including the system databases such as master, sybsystemprocs, and tempdb, by using the Sybase dump utility. You must log on isql as sa or other user with sa privileges in order to use dump, and the backup server must be running. Refer to your Sybase documentation for more information.

To dump a database, type

$ isql -Usa
Password: sa_password
1> dump database database
2> to "device"
3> capacity = bytes
4> with init, unload, dismount
5> go

where
sa_password is your sa password
database is the name of your database (not the LeasePak environment name)
device is the full path of your disk or non-rewinding tape device (note the path is in quotation marks)
bytes for tape devices, the capacity in bytes (a 2 GB tape device is 2000000 bytes).

The terminal will display something similar to the following

Backup Server session id is: 19. Use this value when executing the
'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 6.58.1.1: Device '/dev/rmt/0mn' supports multiple dump files per volume set.
Backup Server: 6.28.1.1: Dumpfile name 'duction961270ED0F' section number 0001
mounted on tape drive '/dev/rmt/0mn'
Backup Server: 4.58.1.1: Database lpr_production: 616 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 1266 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 1784 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 2354 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 3016 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 10786 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 31280 kilobytes DUMPed.
Backup Server: 4.58.1.1: Database lpr_production: 31682 kilobytes DUMPed.
Backup Server: 3.43.1.1: Dump phase number 1 completed.
Backup Server: 3.43.1.1: Dump phase number 2 completed.
Backup Server: 3.43.1.1: Dump phase number 3 completed.
Backup Server: 4.58.1.1: Database lpr_production: 31690 kilobytes DUMPed.
Backup Server: 3.42.1.1: DUMP is complete (database lpr_production).

If you automate Sybase dumps in cron, protect the sa password from unauthorized users.

To restore a database from a dump, you must first, if needed, recreate it with the LeasePak script db_create. Verify that the Sybase backup server is running, then type

$ isql -Usa
Password: sa_password
1> load database database
2> from "device"
3> with unload, dismount
4> go

where
sa_password is your sa password
database is the name of your database (not the LeasePak environment name)
device is the full path of your disk or non-rewinding tape device (note the path is in quotation marks).

The terminal will display something similar to the following

Backup Server session id is: 12. Use this value when executing the
'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Backup Server: 6.28.1.1: Dumpfile name >duction961270ED0F= section number 0001 mounted on tape drive '/dev/rmt/0mn'
Backup Server: 4.58.1.1: Database lpr_production: 1592 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 3194 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 4712 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 6112 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 7580 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 8994 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 33808 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 76308 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 119828 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 122902 kilobytes LOADed.
Backup Server: 4.58.1.1: Database lpr_production: 122910 kilobytes LOADed.
Backup Server: 3.42.1.1: LOAD is complete (database lpr_production).
Use the ONLINE DATABASE command to bring this database online; SQL Server will
not bring it online automatically.

To bring the database online, type

1> online database database
2> go

where
database is the name of your database (not the LeasePak environment name)

The terminal will display something similar to

Database 'lpr_production' is now online.

 

Transaction Logs

The LeasePak script db_create automatically sets trunc log on chkpt to true. For production databases, you must set trunc log on chkpt to false in order to properly back up transaction logs.

Back up transaction logs frequently to prevent a loss of data changes made between full backups. You can use the Sybase dump utility to do this, either manually or automatically within cron. You can dump transaction logs while users are connected to the DBMS.

Use a sp_thresholdaction procedure to dump a transaction log when it reaches a certain size. Refer to your Sybase documentation or contact your MSI representative for more information.

When you dump transaction logs to more than one tape, you must reload them in the exact same order that you dumped them. Refer to your Sybase documentation for more information.

 

Database Consistency Checker

Run the Sybase Database Consistency Checker utilities dbcc checkdb and dbcc checkalloc on your database(s) at least once a week. This will identify database problems before they are propagated into your backups. The checkdb locks and unlocks database tables as it checks them, and the checkalloc option performs a considerable amount of I/O, so either schedule the procedures for off-hours or run them on a copy of the database(s). Refer to your Sybase documentation or contact your MSI representative for more information.