SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

Similar documents
SAP BW on HANA & HANA Smart Data Access Setup

Sybase ASE Linux Installation Guide Installation and getting started guide for SAP Sybase ASE on Linux

LVS Troubleshooting Common issues and solutions

SAP Landscape Transformation (SLT) Replication Server User Guide

SAP PartnerEdge Program: Opportunities for SAP-Authorized Resellers

SAP BusinessObjects Business Intelligence 4 Innovation and Implementation

Agentry and SMP Metadata Performance Testing Guidelines for executing performance testing with Agentry and SAP Mobile Platform Metadata based

Memory Management simplifications in ABAP Kernel 7.4*

How-to guide: Monitoring of standalone Hosts. This guide explains how you can enable monitoring for standalone hosts in SAP Solution Manager

Set Up Hortonworks Hadoop with SQL Anywhere

Using SAP Crystal Reports with SAP Sybase SQL Anywhere

Extend the SAP FIORI app HCM Timesheet Approval

Open Items Analytics Dashboard System Configuration

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

SAP CRM Service Manager 3.1 Mobile App Extended Feature List An extended list of all the features included in the default delivery of the SAP CRM

How To... Master Data Governance for Material: Maintenance for multiple Materials in one Change Request. Applicable Releases: all

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

Create and run apps on HANA Cloud in SAP Web IDE

Compare & Adjust How to Guide for Compare & Adjust in SAP Solution Manager Application Lifecycle Management

Consumption of OData Services of Open Items Analytics Dashboard using SAP Predictive Analysis

LHI Leasing Simplifying and Automating the IT Landscape with SAP Software. SAP Customer Success Story Financial Services Provider LHI Leasing

How to Implement a SAP HANA Database Procedure and consume it from an ABAP Program Step-by-Step Tutorial

Nine Reasons Why SAP Rapid Deployment Solutions Can Make Your Life Easier Get Where You Want to Be, One Step at a Time

Creating a Fiori Starter Application for sales order tracking

How To... Master Data Governance for Material: Create Custom Print forms. Applicable Releases: MDG 7

How to Extend a Fiori Application: Purchase Order Approval

BW Source System: Troubleshooting Guide

SAP Solution Manager - Content Transfer This document provides information on architectural and design questions, such as which SAP Solution Manager

SAP White Paper Enterprise Information Management

SAP Thought Leadership Paper Engineering, Construction, and Operations. Beyond Enterprise Resource Planning Construction in the ipad Age

Five Strategies Small and Medium Enterprises Can Use to Successfully Implement High Value Business Mobility

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

Active Quality Management

Installing and Configuring the HANA Cloud Connector for On-premise OData Access

SAP Business One OnDemand. SAP Business One OnDemand Solution Overview

How to... Master Data Governance for Material: Use the Data Import Framework for Material. Applicable Releases: EhP6, MDG 6.1, MDG 7.

Backup Strategy for Oracle

SAP Security Recommendations December Secure Software Development at SAP Embedding Security in the Product Innovation Lifecycle Version 1.

Design Thinking for. Requirements Analysis

What's New in SAP BusinessObjects XI 3.1 Service Pack 5

TM111. ERP Integration for Order Management (Shipper Specific) COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Training.sap.com User Guide

SAP BUSINESS PLANNING AND CONSOLIDATION 10.0, VERSION FOR SAP NETWEAVER, POWERED BY SAP HANA STARTER KIT FOR USGAAP

Data Governance. Data Governance, Data Architecture, and Metadata Essentials Enabling Data Reuse Across the Enterprise

SAP PartnerEdge Program Guide for Language Services Partners

HANA Input Parameters with Multi-Values to Filter Calculation Views

SAP HANA. SAP HANA Performance Efficient Speed and Scale-Out for Real-Time Business Intelligence

Implementing an Enterprise Information Management Strategy An Approach That Mitigates Risk and Drives Down Costs

Certification Guide Network Connectivity for SAP on Premise and Cloud Solutions Integration

SAP BusinessObjects Dashboarding Strategy and Statement of Direction

Cloud Single Sign-On and On-Premise Identity Federation with SAP NetWeaver Cloud White Paper

HR400 SAP ERP HCM Payroll Configuration

Setting up Single Sign-On (SSO) with SAP HANA and SAP BusinessObjects XI 4.0

Crystal Reports Server Embedded 2008 with Service Pack 7 for Windows Supported Platforms

Information Design Tool User Guide SAP BusinessObjects Business Intelligence platform 4.0 Feature Pack 3

SAPFIN. Overview of SAP ERP Financials COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Guide to the SAP Extended Business Program

Supplier Master Data Governance

Additional Guide to Implementing the SAP CRM Service Management rapiddeployment

AC200. Basics of Customizing for Financial Accounting: General Ledger, Accounts Receivable, Accounts Payable COURSE OUTLINE

Reducing Operational Risk with SAP Management of Change

SAP BusinessObjects Edge BI, Standard Package Preferred Business Intelligence Choice for Growing Companies

Streamlined Planning and Consolidation for Finance Teams in Any Organization

SAP Work Manager 6.0 Mobile App Extended Feature List

H2G Install SAP Web IDE locally for trial (Mac version)

Optimized Shift Planning and Scheduling Creating Shifts and Aligning Resources to Match the Forecasted Workload

The Power of Instant Customer Insight

SAP Master Data Governance- Hiding fields in the change request User Interface

ForFarmers: SAP Business Communications Management for Call Center Workload Distribution

Data Archiving in CRM: a Brief Overview

Maintaining Different Addresses and Ids for a Business Partner via CRM Web UI

SAP Thought Leadership SAP Customer Relationship Management. Strengthen the Brand and Improve

How To Install The Sap Business Explorer 7.X 2.X (Sap) On A Windows 7.30 Computer (Windows 7)

Table of Contents. How to Find Database Index usage per ABAP Report and Creating an Index

SAP White Paper Enterprise Mobility. Best Practices for a Mobility Center of Excellence Keeping Pace with Mobile Technology

How to Configure Access Control for Exchange using PowerShell Cmdlets A Step-by-Step guide

Fiori Frequently Asked Technical Questions

SAP BusinessObjects Edge BI, Preferred Business Intelligence. SAP BusinessObjects Portfolio SAP Solutions for Small Businesses and Midsize Companies

SAP BusinessObjects Enterprise Software Inventory Tool User's Guide

Alert Notification in SAP Supply Network Collaboration. SNC Extension Guide

SAP Operational Process Intelligence Security Guide

Process Archiving using NetWeaver Business Process Management

Made to Fit Your Needs. SAP Solution Overview SAP Solutions for Small Businesses and Midsize Companies

Integrating Easy Document Management System in SAP DMS

SAP BusinessObjects Query as a Web Service Designer SAP BusinessObjects Business Intelligence platform 4.0

SAP Customer Relationship Management. SAP CRM Rapid-Deployment Solution An Essential CRM Solution,

Meeting the Challenges of

Business Requirements... 3 Analytics... 3 Typical Use Cases... 8 Related Content... 9 Copyright... 10

Getting Started with the License Administration Workbench 2.0 (LAW 2.0)

Configuring Single Sign-on for SAP HANA

NetWeaver Business Client (NWBC) for Incentives and Commissions Management (ICM)

Business Process Change Analyzer in SAP Solution Manager 7.1

Demand Planning. SAP Business ByDesign

Single Sign-On between SAP Portal and SuccessFactors

SAP CRM on HANA HANA Limited Runtime SAP 360 Customer. December 19 th, 2012

BW362. SAP BW powered by SAP HANA COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

SAP Solutions. Delivering Financial Excellence with SAP Solutions

sql server best practice

Mass Maintenance of Procurement Data in SAP

Transcription:

SAP Sybase Adaptive Server Enterprise Shrinking a Database for Storage Optimization 2013

TABLE OF CONTENTS Introduction... 3 SAP Sybase ASE s techniques to shrink unused space... 3 Shrinking the Transaction Log... 4 Shrinking the database... 4 Special Considerations... 5 Summary... 7

Introduction In today s fast-paced and knowledge-based economy organizations are striving to provide customers with better products and services, optimize their operations while trying to efficiently and intelligently manage the ever-growing data. Traditional database growth has been attributed to various factors which include indexes that are built in the database, backups that are taken as well as new compliance requirements such as Sarbanes Oxley and HIPAA that warrant the need for retaining historical data. All these as well as specific activities like select into, alter table, parallel create index and other commands may require extra log space which may have to be added as and when necessary. Once these triggering events are done, the extra allocated space may well become a wasted resource as well as a source of IO bottlenecks causing performance problems which present an operational challenge to ensure business critical information is made available continuously and efficiently. Although the burden of providing sufficient storage to keep up with the growing data lies in the hands of the IT personnel, DBAs have equal responsibility in making sure the queries run fast and the database is well designed and tuned by ensuring data is spread across different disk devices efficiently and there are less storage related bottlenecks and issues. SAP Sybase Adaptive Server Enterprise SP100 (SAP Sybase ASE SP100) offers a distinct advantage for handling this disk space usage efficiently. Shrink database functionality from SAP Sybase ASE helps in optimizing disk storage use by the database while providing improved cost of operations and efficient data handling for better query performance. SAP Sybase ASE s techniques to shrink unused space SAP Sybase ASE provides several methods of optimizing disk space, of which this paper will discuss the database shrinking techniques that lead to cost savings. The shrinking techniques that ASE uses are: - Shrinking the transaction log - Shrinking the database

Shrinking the Transaction Log ASE 15.7 and later releases provide the ability to shrink the transaction log allowing customers to shrink the log space without having to recreate the database. ASE extends the alter database command to let system administrators and database owners remove unwanted portions of a database log freeing that storage space. During the execution, the command will be able to detect if there is sufficient space to permit removing a log fragment. Internally, ASE remaps the storage within the database as necessary to accommodate the request to shrink the log and the database s logical storage map in the system table sysusages will be updated to reflect the changes. ASE has introduced a new parameter to the alter database command called log off to remove the unwanted portions of the database log allowing shrinking of the log space to free storage. This feature can be used by anyone who needs to reduce the size of the log segment because it was accidentally created too large or following a deliberate but temporary increase in the size of the log in order to accommodate a particular operation. Shrinking the database ASE 15.7 SP100 and later releases allows shrinking of a database which frees up unused space for reuse and / or deletion. Shrinking a database refers to removing physical storage from the database. This is accomplished by disassociating logical storage from physical storage in identified areas of the database. Any existing data will be moved to a new location as needed so that the space to be released is free of data. ASE then uses the alter database command to perform the shrink database operation. This work can be done while the database is online and is in use. There is no need for any special access restrictions although there will be short periods of time when the operation requires exclusive access to a table. Any user with sa_role privilege or the database owner (DBO) will be able to execute this shrink database operation. An example of a shrink database operation is given below: alter database demodb OFF dbdev2 Here, OFF is the keyword which does the shrink operation and dbdev2 is the device which will be removed off of the database demodb. ASE 15.7 SP100 provides a very convenient and flexible way of executing the shrink database operation. The operation can be executed for a specific period of time and continued at a later point in time. DBAs will appreciate the fact that there is no limit to the number of times the shrink database operation can be restarted. The ability to restart a shrink operation does not survive a reboot. The state information needed for restart of the operation is not written to permanent storage but is kept in memory. If ASE shuts down before a shrink operation completes, with resume_shrink will not work and the user will have to issue a new alter database command to do the remaining shrink database operation. An example of the shrink database operation with the resume_shrink option is given below: alter database demodb OFF dbdev2 with resume_shrink

Where with resume_shrink indicates that the shrink database operation is being resumed from where it stopped previously. Shrink database works in small increments. It works on one source allocation unit at a time, and begins a new transaction for each object it finds on that allocation unit. To perform this move, ASE exchanges blocks of pages read from disk, then exchanges those blocks virtual page numbers in the disk map. While it is working on one object s pages, it takes an exclusive table lock on that object. Thus, it begins and ends a lot of small transactions, and takes and drops a lot of short-duration blocking locks. At most, each transaction and each lock will persist for processing 255 pages. Although it is impossible to say definitively how any one such operation will impact performance, internal tests have shown that these transactions and locks last far less than 1 second each. It is fair to say that the performance impact of shrink operations on other processing will normally not be noticeable. If the shrink command has not completed after the specified time has elapsed, it abandons the work in progress. Any completed work remains done, but the command exits with a suitable message. In case of a server crash while page exchange is under way, ASE will attempt to restart the exchange upon reboot. Special Considerations Temporary databases present a special class of problem for shrinking. They are used as a cache for tables having no permanent identity, which persist only for the duration of a single query and have no entries in the catalogs describing database objects. For this reason, shrinking a temporary database can only be done when ASE is booted in single-user mode. Duplicate keys in indexes can potentially cause a new set of issues for the shrink operation. In an index, each row s location in the database is stored as a row ID. When the index is not unique, one key may represent more than one row ID and each of these row ID s are sorted and these entire row ID s are maintained as a list so that lookups through the index are faster. When there is a table that has one or many non-unique indexes defined with many duplicate key values, any update to the data row ID will end up with ASE needing to ensure that the entire row ID s are re-sorted and placed in the correct order before that index can be made available to the users. The drawback to this step of re-sorting is that it is a slow operation and as a result the table is locked until the process is completed thus affecting performance. Also, since shrink database works in smaller chunks of 255 pages, if the table is a significantly large table, performing the shrink database operation in smaller chunks of time may cause the table to be locked multiple times depending on how many smaller chunks the operation has been divided. Although this is not guaranteed to happen during all shrink database operations, there is a possibility that sometimes access to parts of the database can be unexpectedly blocked while the resorting of the index entries are happening resulting in unwanted performance delays. SAP is looking at providing a new tool in a future release which will help the user understand their environment better and make educated decisions before starting the shrink database operation. This

tool which should act like an advisor will have the capability to evaluate the table schema and determine if there are any indexes which might cause performance degradation while doing the shrink database operation. If there are such indexes, the advisor will suggest that the indexes are dropped before the shrink database operation and recreated after the completion of shrink database.

Summary Traditionally, it has been observed that the database size is increasing not only due to the new compliance requirements such as Sarbanes Oxley and HIPAA that warrant historical data but also due to the other requirements such as backups as well as indexes that are built on the database. And with the fluctuating economy, storage systems especially the disk-based ones are becoming the most expensive set of components in a database environment. The storage optimization techniques used by SAP Sybase to shrink unused space offers the enterprise a very clear and distinct advantage for handling this increasing volume of data. These techniques help in reducing the overall cost of operations while at the same time catering to improved total cost of ownership which is one of the challenges when managing large data sets.

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