SAP ASE 16.0 Server
LeasePak Documentation Suite NETSOL website
SAP ASE 16.0 Server

SAP ASE 16.0 SP04 Server

On the Linux Platform

Table of Contents

Before Installing the SAP ASE Server Software

System Requirements

Verify that your server computer meets the minimum requirements for running the SAP ASE 16.0 SP04 server software:

  • Machine (Linux): Any Intel or AMD x86_64 computer
  • Memory: 1024 MB RAM minimum, 2048 MB or more recommended
  • Network Card: Ethernet

SAP ASE Server Software Disk Space

Breakdown of Disk Space Requirements for SAP ASE Server Software: Total 10 GB minimum (approximate)

Size Purpose
2048 MB Software files
1024 MB master device
1024 MB sysprocsdev device
2048 MB tempdb device
2048 MB (minimum) Each LeasePak data device
1024 MB (minimum) Each LeasePak log device
60 KB per lease or loan in LeasePak (approximate) Database records related to each lease or loan

Read SAP ASE Documentation

Read the following SAP ASE manuals to prepare for the software installation:

  • SAP Adaptive Server Enterprise 16.0 Installation Guide for Linux
  • SAP Adaptive Server Enterprise 16.0 Release Bulletin for Linux
  • SAP Adaptive Server Enterprise 16.0 Unix Configuration Guide

Create Unix Account for the SAP ASE Software Owner

  1. Create a Unix group named 'sybase'.
  2. Create a Unix user account named 'sybase'. Give the account a primary OS group of 'sybase'.
  3. Edit the login file of the 'sybase' user and set the locale to C by adding the following code:

    Shell Login file Code to add
    Bash .bash_profile export LANG=C
    export LC_ALL=C
    Bourne or Korn .profile LANG=C
    export LANG
    LC_ALL=C
    export LC_ALL
    C or T .login setenv LANG C
    setenv LC_ALL C

  4. Edit the login file of the 'sybase' user and set the stack size to unlimited by adding the following code:

    Shell Login file Code to add
    Bash .bash_profile ulimit -s unlimited
    Bourne or Korn .profile ulimit -s unlimited
    C or T .login limit stacksize unlimited

Install Linux OS Patches

Download and install the latest Linux operating system patches from your OS vendor.
Check the SAP ASE Installation Guide and Release Bulletin for information on the required Linux OS patches.

Configure Linux OS Kernel Parameters

Linux Kernel Parameters

Parameter Description Recommended Value
kernel.shmmax shared memory maximum At least as large as the Adaptive Server 'total logical memory' configuration parameter plus the amount of shared memory required by non-DBMS components such as the LeasePak Queue Manager.

As the root user:

  1. Edit the /etc/sysctl.conf file and add the kernel parameter settings:
       kernel.shmmax = shared_memory_maximum
  2. Execute the following command at the Unix prompt:
       # sysctl -p

SAP ASE starts in threaded mode by default. Netsol recommends that you take the default and run SAP ASE in threaded mode. If for some reason you need to switch to process mode, you must set Linux kernel parameters kernel.exec-shield and kernel.randomize_va_space to a value of 0 in order to maintain compatibility.

Prepare Raw Volumes/Partitions for Database Devices (Optional)

Database devices can be stored on either filesystem files or raw volumes/partitions. Filesystem files are recommended because they are easier to maintain.

If the database devices will be stored on raw volumes/partitions:

  • Create the raw volumes/partitions for the SAP ASE devices (master, sysprocsdev, tempdbdev, systemdbdev) before installing the SAP ASE software.
  • Create the raw volumes/partitions for the LeasePak data and transaction log devices either before or after installing the SAP ASE software.
  • Give the raw volumes/partitions the ownership and permissions specified below.
  • Cylinder 0 of the disk contains the partition map. When preparing a raw partition for use with a database device, do not use cylinder 0. To make sure you are not using cylinder 0, either format the disk so that disk slice 0 does not start on cylinder 0, or do not use disk slice 0 for database devices.

The SAP ASE and LeasePak database devices are listed below.

SAP ASE master Device

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device name master
Device size 512 MB minimum
Database name master
Database size 256 MB minimum

SAP ASE sysprocsdev Device

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device name sysprocsdev
Device size 512 MB minimum
Database name sybsystemprocs
Database size 256 MB minimum

SAP ASE tempdbdev Device

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device name tempdbdev
Device size 2048 MB minimum
Database name tempdb
Database size 2048 MB minimum

SAP ASE systemdbdev Device

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device name systemdbdev
Device size 32 MB minimum
Database name sybsystemdb
Database size 16 MB minimum

LeasePak Data Devices

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device names lpak_data_01, lpak_data_02, etc
Device size 2048 MB minimum
Database name lpr_production
Database size 2048 MB minimum

LeasePak Transaction Log Devices

Examples Your Values
Type raw partition
Owner:Group sybase:sybase
Permissions 660
Device names lpak_log_01, lpak_log_02, etc
Device size 1024 MB minimum

Installing the SAP ASE Server Software

Install the SAP ASE server software (SAP Adaptive Server Enterprise Edition 16.0 SP04 for Linux on X86_64 64 BIT). Make sure to install the latest available EBF. Installation of the SAP ASE server software and EBFs is beyond the scope of the System Administration Guide. Refer to your SAP ASE documentation for installation procedures.

Warning note: When installing the SAP ASE server software, specify a Page Size of 2K.

LeasePak requires the Adaptive Server Page Size to be 2K. The Adaptive Server default Page Size is 4K, so you need to override the default Page Size during the installation of the SAP ASE server software.


After Installing the SAP ASE Server Software

Add SAP ASE Port Numbers to /etc/services File

Adaptive Server will function properly without adding the port numbers to /etc/services. However, SAP recommends adding the port numbers to /etc/services to prevent other applications from using the same port numbers.

In this example, assume these port numbers are in use by SAP ASE:

  • 5000 - Adaptive Server
  • 5001 - Backup Server
  • 5002 - Monitor Server
The actual port numbers on your system may be different. If additional SAP ASE servers (such as XP Server) were installed, you will have port numbers for those servers as well.

As the root user, edit the /etc/services file:

  1. Delete or comment out any existing entries for ports 5000, 5001, and 5002.
  2. Add new entries for your SAP ASE ports:

        sap-ase     5000/tcp     # SAP Adaptive Server
        sap-ase     5000/udp     # SAP Adaptive server
        sap-bck     5001/tcp     # SAP Backup Server
        sap-bck     5001/udp     # SAP Backup Server
        sap-mon     5002/tcp     # SAP Monitor Server
        sap-mon     5002/udp     # SAP Monitor Server

Define Environment Variables for the SAP ASE Software Owner

Edit the login file of the 'sybase' user and add code to "source" the SAP-supplied environment variable script:

Shell Login file Code to add
Bash .bash_profile . sap_top_directory/SYBASE.sh
Bourne or Korn .profile . sap_top_directory/SYBASE.sh
C or T .login source sap_top_directory/SYBASE.csh

The DSQUERY environment variable contains the Adaptive Server name that client programs attempt to connect to if no Adaptive Server is specified with a command line option. Optionally edit the login file of the 'sybase' user and add code to define DSQUERY:

Shell Login file Code to add
Bash .bash_profile export DSQUERY=Adaptive_Server_name
Bourne or Korn .profile DSQUERY=Adaptive_Server_name
export DSQUERY
C or T .login setenv DSQUERY Adaptive_Server_name

Verify the SAP ASE Version

Verify you are running the correct version of SAP ASE for your platform. To display the SAP ASE version, execute the following in isql:

select @@version
go


The correct version of SAP ASE is Adaptive Server Enterprise 16.0 SP04 with the latest EBF.

Remove master Device from Pool of Default Devices

Remove the master device from the pool of default devices by executing the following in isql as user 'sa':

sp_diskdefault master, defaultoff
go

User 'sa' is the System Administrator DBMS user account created when you installed the SAP ASE software.

Remove master Device from tempdb Database Segments

Remove the master device from the tempdb database segments by executing the following in isql as 'sa':

use tempdb
go
sp_dropsegment "default", tempdb, master
go
sp_dropsegment "system", tempdb, master
go
sp_dropsegment "logsegment", tempdb, master
go

Initialize Database Devices for LeasePak Data and Transaction Logs

The raw partitions which were created for the LeasePak database(s) and transaction log(s) must be initialized and mapped to SAP ASE database devices by running the SAP ASE 'disk init' command. For more information on the disk init command, refer to your SAP ASE documentation or contact your NetSol 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 partitions used by the SAP ASE system databases such as master, sybsystemprocs, or tempdb.

Verify Database Device Attributes

Database devices can be stored on either filesystem files or raw volumes/partitions. If your database devices are stored on filesystem files, run sp_helpdevice in isql to verify that:

  • The master device has "dsync on" and "directio off".
  • The sysprocsdev, systemdbdev, tempdbdev, lpak_data_#, and lpak_log_# devices have "dsync off" and "directio on".

Set SAP ASE Configuration Parameters

The SAP ASE configuration parameters listed below fall into one of 3 categories: those where LeasePak requires the listed value, those where the listed value is a minimum, and those listing an optimal value. Enter the required values exactly as listed. For those listing minimum or optimal values, you can adjust them as needed (within any specified minimum/maximum bounds) to achieve peak DBMS server performance.

To ensure LeasePak functions correctly, if a configuration parameter is not explicitly listed here, generally leave the configuration parameter at the SAP ASE default value. In particular, leave 'max parallel degree' set to 1, 'enable literal autoparam' set to 0, and 'statement cache size' set to 0. Those are usually the SAP ASE defaults, but check the parameter value to be sure. For more information, contact your NetSol representative.

Some of the configuration parameters require a reboot of Adaptive Server in order for the change to take effect.

'allow sql server async i/o'

Description Required Value
Switch for whether or not to use asynchronous I/O 1 (use asynchronous I/O)

'default data cache'

Description Optimal Value
Size of the data cache in megabytes (MB) Depends on the size and activity of your database(s) and the amount of available memory. There is a point of diminishing returns beyond which increasing the size of the data cache consumes extra resources without improving performance.

To configure the size of the default data cache to number_of_megabytes, execute the following in isql as 'sa':

sp_cacheconfig 'default data cache', "number_of_megabytesM"
go


To display the size of the default data cache in megabytes, execute the following in isql:

sp_cacheconfig 'default data cache'
go

'default network packet size'

Description Required Value
Default packet size for data passed between the DBMS server and DBMS clients 4096 bytes

Set the 'max network packet size' parameter to 4096 before setting the 'default network packet size' to 4096.

'max memory'

Description Minimum Value
Maximum amount of shared memory that SAP ASE can allocate for its own use Value of the 'total logical memory' read-only configuration parameter

To calculate your value for 'max memory', first use the formula from 'total logical memory' to determine the value of 'total logical memory' in megabytes (MB). This is the minimum number_of_megabytes value for the following equation:

number_of_megabytes * 512 = value_of_max_memory

You may use a larger value for number_of_megabytes as needed. Once you have determined the value_of_max_memory, execute the following in isql as 'sa':

sp_configure 'max memory', value_of_max_memory
go


Also see 'total logical memory'.

'max network packet size'

Description Minimum Value
Maximum packet size for data passed between the DBMS server and DBMS clients 4096 bytes

'max online engines'

Description Minimum Value
Maximum number of engines that can be online at any one time 1
  • The number of engines should not exceed the number of CPUs on the server. In most cases, set the parameter to a value less than the number of CPUs, so that some CPUs are free to run non-SAP ASE processes.
  • The actual number of online engines at startup is determined by the size of the defined thread pools. Refer to the SAP ASE documentation on thread pools for more information.
  • Configuring a large number of engines may cause a decrease in data cache performance due to cache spinlock contention among the engines. If the spinlock contention exceeds 10 percent, configure the 'global cache partition number' parameter to reduce cache spinlock contention.

'number of devices'

Description Minimum Value
Maximum number of available devices 50

'number of locks'

Description Minimum Value
Maximum number of available locks within SAP ASE 30000

'number of open databases'

Description Minimum Value
Maximum number of databases that can be open simultaneously (including the SAP ASE administrative databases, such as master, tempdb, sybsystemprocs, and sybsystemdb) 25
  • Periodically search for the string 'number of open databases' in the SAP ASE error log file. If there are entries in the error log file similar to the following:

    Increase the config parameter 'number of open databases' to avoid descriptor reuse. Reuse may result in performance degradation.

    then increase the value of the 'number of open databases' configuration parameter.

'number of open indexes'

Description Minimum Value
Maximum number of indexes that can be open simultaneously 4000
  • Each index consumes a partition. Therefore, set the 'number of open partitions' configuration parameter to a value greater than or equal to the 'number of open indexes' configuration parameter.
  • Periodically search for the string 'number of open indexes' in the SAP ASE error log file. If there are entries in the error log file similar to the following:

    Increase the config parameter 'number of open indexes' to avoid descriptor reuse. Reuse may result in performance degradation.

    then increase the value of the 'number of open indexes' configuration parameter.

'number of open objects'

Description Minimum Value
Maximum number of objects that can be open simultaneously 4000
  • Periodically search for the string 'number of open objects' in the SAP ASE error log file. If there are entries in the error log file similar to the following:

    Increase the config parameter 'number of open objects' to avoid descriptor reuse. Reuse may result in performance degradation.

    then increase the value of the 'number of open objects' configuration parameter.

'number of open partitions'

Description Minimum Value
Maximum number of partitions that can be open simultaneously 4000
  • Each index consumes a partition. Therefore, set the 'number of open partitions' configuration parameter to a value greater than or equal to the 'number of open indexes' configuration parameter.
  • Periodically search for the string 'number of open partitions' in the SAP ASE error log file. If there are entries in the error log file similar to the following:

    Increase the config parameter 'number of open partitions' to avoid descriptor reuse. Reuse may result in performance degradation.

    then increase the value of the 'number of open partitions' configuration parameter.

'number of user connections'

Description Minimum 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.

'procedure cache size'

Description Optimal Value
Size of the procedure cache Approximately 200 MB

To determine the procedure cache size, use this equation:

number_of_megabytes * 512 = size_of_procedure_cache

To configure the parameter, execute the following in isql as 'sa':

sp_configure 'procedure cache size', size_of_procedure_cache
go


For example, to configure the procedure cache for 200 MB:

200 * 512 = 102400

sp_configure 'procedure cache size', 102400
go

'total logical memory'

'total logical memory' is the amount of memory required by the current configuration of SAP ASE. It is a read-only parameter, meaning you cannot make changes to it.

To determine the value of 'total logical memory' in megabytes (MB), first execute the following in isql:

sp_configure 'total logical memory'
go


Then take the number from the 'Run Value' column (not the 'Memory Used' column) and divide it by 512 to obtain the value in megabytes (MB):

number from 'Run Value' / 512 = value of 'total logical memory' in MB