Configuring Automatic Database Space Expansion in

Configuring Automatic Database Space Expansion in
Configuring Automatic Database Space
Expansion in SAP Adaptive Server
Enterprise
Author: Markus Ohly, SAP SE
Classification: Public
1. Introduction
This white paper introduces system administrators to the automatic database expansion feature in
SAP Adaptive Server Enterprise (SAP ASE). Here we will focus on deployments of SAP Business Suite
applications running on SAP ASE.
With automatic database expansion activated, administrators can further reduce the time needed for
administration tasks. More importantly, interruptions to business users - such as an ASE error
SQL1105 caused by missing resources, for example - can be avoided because the database server
can automatically obtain the space resources needed for continuous operation.
The following sections explain which software component levels are needed for running automated
database expansion and show how to set them up during installation or later on. In addition, you will
find recommendations for threshold and expansion sizes.
2. Version Requirements
Use SAP Software Provisioning Manager 1.0 SP4 or newer to configure automatic database expansion
during installation.
Update SAP_BASIS to support package releases listed in SAP Note 1814258 in order to manage
automatic database expansion using the DBA Cockpit. SAP recommends implementing the most
recent DBA Cockpit correction collections that are listed in the section Important SAP Notes.
Update SAP Adaptive Server Enterprise 15.7 to SP51 or higher as recommended in SAP Note
1554717.
3. Configuring Automatic Database Expansion with
SWPM during System Installation
When starting a new system configuration in the installer, choose parameter mode Custom rather
than Typical:
Fill in the fields as required in the subsequent screens until you reach the following screen:
Choose Configure database for automatic expansion to set up automatic expansion; the next screens
will ask you to specify the configuration values for automatic database expansion that will be used
during the installation of the database server for the SAP system.
In the first screen the non-expandable devices can be configured. Note that the data devices for the
SID database are not listed here and should not be added; these will appear in the next screen.
Click Next. The SAP installer will proceed to the configuration of the parameters for the expansion of
the <SID> database and the underlying devices.
Set a value for the Growby size parameter; the database server will perform expansion of the <SID>
database by this amount of space each time the free space in this database falls below the free space
threshold.
Set a Free space threshold value of at least 1GB. This parameter enables the expansion process to
start in the background, before actually running out of space.
You can add further database devices using the Add button to distribute the data onto separate file
systems. The Growby size may be set individually for each device; SAP recommends that the Growby
size be equal for all devices.
The Growby size for each device should be less than or equal to the Growby size of the database, and
the database Growby size should be an integral factor of the device Growby size(s). SAP recommends
having each device grow by equal sizes. The file systems must provide enough free space to perform
device expansion when needed.
Complete the following screens and execute the installation.
4. Configuring Automatic Database Expansion in Existing
SAP Systems Running on SAP ASE
For systems configured with the installer prior to SWPM 1.0 SP02, you have to install the database
scripts needed for automatic expansion. DBA Cockpit displays the following error message in case
this is necessary:
Instructions for installing the required components are provided in the Appendix: install dbextend
script.
5. Setup with DBA Cockpit
The following picture shows the DBA Cockpit view of an SAP system without automatic database
expansion. Note that all indicators in the column Auto Expansion are gray:
To enable automatic database expansion for the SID database, click on the corresponding row so that
the segments are displayed; then select the row for the default segment:
Choose the Change button:
Click the Check button to perform a consistency check of the values entered. Click the Save button to
permanently set the entered values:
6. Recommendations
SAP recommends setting the following expansion policies:
 For the SID database, set the expansion size to 1GB and the free space threshold to 1GB
 For the saptools database, set the expansion size to 128MB and the free space threshold to
256MB
SAP strongly recommends against automatically expanding the log segment of any database. Log
segment expansions increase the impact from run-away transactions and may cause lengthy
recovery times during which the system is unavailable.
7. Trace Records of Automatic Database Expansion
Whenever automatic expansion is performed, the actions will be logged in the SAP ASE errorlog. SAP
ASE can perform two steps: first, if required, one of the expandable devices will increase in size by
the given amount. Secondly, the database itself will be expanded by the predefined amount of space.
Example:
00:0002:00000:00039:2014/03/24 23:14:18.96 server background task message:
Threshold action procedure 'sp_dbxt_extend_db' fired in db 'IDS' on segment
'default'. Space left: 131072 logical pages ('2048M').
00:0002:00000:00039:2014/03/24 23:14:19.10 server background task message:
DISK RESIZE name = 'IDS_data_002', size = '2048.0M' -- Db: IDS Segment:
default
00:0005:00000:00000:2014/03/24 23:14:19.15 kernel Performing space
allocation for device '/sybase/IDS/sapdata_2/IDS_data_002.dat' (2.00
Gb). This may take some time.
00:0002:00000:00039:2014/03/24 23:14:39.81 kernel Finished initialization.
00:0002:00000:00039:2014/03/24 23:14:39.95 server background task message:
sp_dbxt_do_resize_dev: Device IDS_data_002 of size 30720M resized by 2048M
to a total size of 32768M.
00:0002:00000:00039:2014/03/24 23:14:39.95 server background task message:
ALTER DATABASE IDS on IDS_data_002 = '2048.0M' -- Segment: default
00:0002:00000:00039:2014/03/24 23:14:39.96 server Extending database by
131072 pages (2048.0 megabytes) on disk IDS_data_002
00:0002:00000:00039:2014/03/24 23:14:41.72 server Processed 52 allocation
unit(s) out of 512 units (allocation page 4403968). 10% completed.
...
00:0002:00000:00039:2014/03/24 23:14:56.92 server Processed 512 allocation
unit(s) out of 512 units (allocation page 4521728). 100% completed.
00:0002:00000:00039:2014/03/24 23:14:57.28 server background task message:
Database 'IDS' was altered by total size '2048M' for segment 'default'.
If the maximum device size set is reached during configuration or administration, the following traces
are written:
00:0002:00000:00030:2014/03/25 06:25:12.29 server background task message:
Threshold action procedure 'sp_dbxt_extend_db' fired in db 'IDS' on segment
'default'. Space left: 131072 logical pages ('2048M').
00:0002:00000:00030:2014/03/25 06:25:12.50 server background task message:
Database 'IDS' was altered by total size '0M' for segment 'default'.
Note that there is still some free space available (2048 MB) in the database so that transaction
processing can still continue for some time; however, no further automatic expansion can happen
anymore. Without administrative action it is possible that all the free space gets used and transaction
processing stops with error messages. Ultimately, the users will see RABAX errors and the database
server will indicate that no more free space is available:
00:0002:00000:00036:2014/03/25 06:29:12.65 server Error: 1105, Severity:
17, State: 2
00:0002:00000:00036:2014/03/25 06:29:12.68 server Can't allocate space for
object 'VRSX4' in database 'IDS' because 'default' segment is full/has no
free extents. If you ran out of space in syslogs, dump the transaction log.
Otherwise, use ALTER DATABASE to increase the size of the segment.
The DBA Cockpit indicates that the maximum size of a database device has been reached with an
alert:
8. Further reading
SAP Adaptive Server Enterprise 15.7 ESD #2, System Administration Guide: Volume 2, Chapter 16:
Expanding Databases Automatically
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc31644.1570/html/sag2/CEGDAFB
H.htm
Getting started with SAP Business Suite on SAP ASE: http://scn.sap.com/docs/DOC-29524
8.1 Important SAP Notes
1554717 - SYB: Planning information for SAP on ASE
1814258 - SYB: DBA Cockpit Release Notes 7.02 SP14, 7.30 SP10, 7.31 SP9, 7.40 SP4
1558958 - SYB: DBA Cockpit Correction Collection SAP Basis 7.02 / 7.30
1619967 - SYB: DBA Cockpit Correction Collection SAP Basis 7.31
1882376 - SYB: DBA Cockpit Correction Collection SAP Basis 7.40
1815695 - SYB: Automatic database expansion for SAP ASE
1602547 - SYB: Current syb_update_db script versions
1883967 - ASE sp_dbextend does not observe default device growby limits
Appendix A: install dbextend script
A.1 Linux and UNIX:
Connect and/or login as user syb<sid>
% cd ${SYBASE}
% . SYBASE.sh
% isql -Usapsso -S<SID> -X
Password:
1> sp_locklogin "sa", "unlock"
2> go
Account unlocked.
(return status = 0)
1> quit
% isql -Usa -S<SID> -X -i${SYBASE}/${SYBASE_ASE}/scripts/installdbextend
Password:
% isql -Usa -S<SID> -X
Password:
1> if object_id('sybsystemprocs..sp_dbextend') > 0
2> begin
3>
exec sp_dbextend 'modify', 'device', 'default', 'growby', '0'
4>
exec sp_dbextend 'modify', 'database', 'default', null, 'growby', '0'
5>
exec sp_dbextend 'disable', 'database', 'default'
6> end
7> go
(return status = 0)
(return status = 0)
(return status = 0)
1> quit
% isql -Usapsso -S<SID> -X
Password:
1> sp_locklogin "sa", "lock"
2> go
Account locked.
(return status = 0)
1> quit
A.2 Windows:
Connect to the DB host as user syb<SID>, open a DOS command window and type
in the following commands:
C:\Windows>cd /d %SYBASE%
G:\sybase\SID>SYBASE.bat
G:\sybase\SID>isql -Usapsso -S<SID> -X
Password:
1> sp_locklogin "sa", "unlock"
2> go
Account unlocked.
(return status = 0)
1> quit
G:\sybase\SID>isql -Usa -S<SID> -X -i
%SYBASE%\%SYBASE_ASE%\scripts\installdbextend
Password:
G:\sybase\SID>isql -Usa -S<SID> -X
Password:
1> if object_id('sybsystemprocs..sp_dbextend') > 0
2> begin
3>
exec sp_dbextend 'modify', 'device', 'default', 'growby', '0'
4>
exec sp_dbextend 'modify', 'database', 'default', null, 'growby', '0'
5>
exec sp_dbextend 'disable', 'database', 'default'
6> end
7> go
(return status = 0)
(return status = 0)
(return status = 0)
1> quit
G:\sybase\SID> isql -Usapsso -S<SID> -X
Password:
1> sp_locklogin "sa", "lock"
2> go
Account locked.
(return status = 0)
1> quit
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising