SAP Sybase Adaptive Server Enterprise
Reorg for Operational Scalability
© 2013
TABLE OF CONTENTS
Introduction ................................................................................................................................................. 3
SAP Sybase ASE’s techniques to reorg in order to reclaim space ....................................................... 3
Online Reorg ................................................................................................................................................ 4
Incremental Reorg....................................................................................................................................... 4
Summary ...................................................................................................................................................... 5
Introduction
In today’s fast-paced and fluctuating economy organizations are striving to provide customers with
better products and services, optimize their operations by acting quickly despite an ever-shortening
maintenance and decision window while trying to efficiently and intelligently manage the evergrowing data. The recent trend of huge volumes of data coupled with a demand for continuous
availability is presenting a need for reorganizing the tables in an incremental fashion, that is, to be
able to run the reorganization of data for specified intervals of time and have the ability to resume
it to run till completion at a later point in time. This business request leads to an interesting era of
providing reorganization utilities to improve data availability during the maintenance windows and
at the same time provide flexibility in the manner of operation of the utility.
SAP Sybase Adaptive Server Enterprise SP100 (SAP Sybase ASE SP100) goes to the next level of
catering to the customers’ needs by providing the ability to execute reorg utilities in an incremental
manner and at the same time facilitating high data availability. Reorg functionality from SAP Sybase
ASE helps in optimizing maintenance windows while providing improved cost of operations,
increased data availability and decreased data disruption to business operations.
SAP Sybase ASE’s techniques to reorg in order to reclaim space
SAP Sybase ASE provides several methods of reclaiming fragmented table space, of which this paper
will discuss the database reorg techniques that lead to cost savings and improved maintenance
windows.
The database reorg techniques that ASE uses are:
- Online reorg
- Incremental reorg
Online Reorg
It is common knowledge in the database world that as the volume of data increases, the
maintenance window to defragment data as well as to check logical and physical integrity of data
also increases. Maintenance windows are used to improve data quality by executing utilities that
reorganizes data on the table for better response time.
SAP ASE 15.7 and later releases provide the ability to perform a reorg operation to defragment a
table without compromising on data availability during the operation. ASE extends the “reorg”
command to let system administrators and database owners reclaim the defragmented table space
using the “online” option while providing access to the data. It allows reorg online to be performed
without blocking regular operations. Internally, ASE creates a new data layer by keeping the existing
data layer or the old data layer untouched thus allowing access to the data while the reorg
operation is in progress. ASE has introduced a new option to the “reorg” command called “online”
to execute reorg operation while still allowing access to data on the table where reorg is being
performed. This functionality is particularly useful to anyone whose environment is in need of
defragmentation and at the same time would like to have continuous data availability.
Incremental Reorg
ASE 15.7 SP100 and later releases provide the ability to defragment data not only online by allowing
access to the data being reorganized but also capable of running for a specified interval of time and
resume from a prior state of reorganization to run till completion. This functionality reorganizes the
table data portion-by-portion and allows concurrent readers and writers on the portion of data that
is not active on. ASE executes this in multiple transactions thus making it robust in terms of
recovery where the state of the table prior to invoking the utility will be brought back in case of a
failure. Incremental reorg not only helps in keeping the maintenance window small but also ensures
that the space used up during the operation is quite small when compared to the conventional
reorg operation. Adaptive Server Enterprise 15.7 SP100 has added a new parameter called “defrag”
to the reorg command allowing user to schedule and resume reorganization while also allowing
concurrent reads or writes on the data being reorganized.
One major advantage of this reorganization utility with incremental capabilities and high availability
is that the applications can time the reorganization of their data more conveniently and still allow
concurrent reads and changes run parallel in a considerable pace. An important setting for this
reorganization utility is that the table should be a data-only-locked table and there should be at
least one unique index eligible for incremental reorganization.
There are two constraints for a table to be eligible for incremental reorganization. The table should
be a DOL table for undergoing incremental reorganization. ‘Allpages’ locking scheme tables are not
eligible for using this feature. The table should have at least one index to be eligible for incremental
reorganization.
This feature provides a reorganization utility with incremental capabilities and high availability. So,
applications can time the reorganization of their data more conveniently and still have the
concurrent reads and modifications run in a considerable pace. An example of the incremental
reorg operation being executed for 3 minutes is given below:
reorg defrag demotable with TIME=00:03
where defrag is the keyword that enables the reorg utility to be run in smaller increments.
Below is another example of the incremental reorg operation being resumed after the operation
was executed for a specified amount of time:
reorg defrag demotable with TIME=00:03 RESUME
The option ‘resume’ enables the utility resume the reorganization of the table from the previous
position of reorganization, that is, the data page that was last reorganized by previous invocation of
the incremental reorg ended and continue till the entire table or list of partitions is reorganized. The
option ‘resume’ used in conjunction with the option ‘time’ denotes that the reorganization of the
table be resumed from the previous position of reorganization and run for the specified interval of
time only. The default behavior of the utility is to reorganize all the extents for the table or the list
of partitions.
Summary
One of the challenges of a terabyte-scale operational scalability environment is the volume of data
that is growing on a per-minute basis which translates to longer maintenance windows and slower
query performance. DBA’s are faced with an ever-shortening maintenance and decision window
while trying to efficiently and intelligently manage the ever-growing data. Facilitating a
reorganization utility with the capability of running for specified interval of time and resuming from
a prior state of reorganization provides not only high data availability but also the flexibility in
timing the data reorganization depending on the dynamic database activity. These techniques help
in reducing the overall cost of operations while at the same time catering to improved total cost of
ownership and at the same time optimizing maintenance windows providing increased data
availability and decreased data disruption to business operations.
www.sap.com
© 2013 SAP AG. All rights reserved.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP
BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP
products and services mentioned herein as well as their respective
logos are trademarks or registered trademarks of SAP AG in Germany
and other countries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks
of Business Objects Software Ltd. Business Objects is an SAP
company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL
Anywhere, and other Sybase products and services mentioned herein
as well as their respective logos are trademarks or registered
trademarks of Sybase Inc. Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials
are provided by SAP AG and its affiliated companies ("SAP Group")
for informational purposes only, without representation or warranty of
any kind, and SAP Group shall not be liable for errors or omissions
with respect to the materials. The only warranties for SAP Group
products and services are those that are set forth in the express
warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional
warranty.
.
© Copyright 2026 Paperzz