SAP Sybase IQ 16.0 SP08 PL1 Point-in-Time Recovery. July 2014

Similar documents
SAP NetWeaver Identity Management Identity Center Minimum System Requirements

Duet Enterprise: Tracing Reports in SAP, SCL, and SharePoint

EDB785 SAP IQ Administration

SAP AddOn Quantity Distribution. by Oliver Köhler, SAP Germany

SAP BusinessObjects Predictive Analysis 1.0 Supported Platforms

Single Sign-on For SAP NetWeaver Mobile PDA Client

EWM125. Labor Management in SAP EWM COURSE OUTLINE. Course Version: 16 Course Duration: 4 Hours

BIT460. SAP Process Integration Message Mapping COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

BC100. Introduction to Programming with ABAP COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

PLM210. Master Data Configuration in SAP Project System COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Configuring relay server in Sybase Control Center

How to Handle the System Message in SAP NetWeaver Mobile 7.1

ADM950. Secure SAP System Management COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

AC507. Additional Functions of Product Cost Planning COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

How to Enable Single Sign-On for Mobile Devices?

Duplicate Check and Fuzzy Search for Accounts and Contacts. Configuration with SAP NetWeaver Search and Classification (TREX) in SAP CRM WebClient UI

BOCE20. SAP Crystal Reports for Enterprise: Advanced Report Design COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

Crystal Reports 2008 FixPack 2.4 Known Issues and Limitations

How to Download Software and Address Directories in SAP Service Marketplace

DS50. Managing Data Quality with SAP Information Steward COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

Visual Composer Modeling: Data Validation in the UI

BC430 ABAP Dictionary

EDB358. System and Database Administration: Adaptive Server Enterprise COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

MDG100 Master Data Governance

NET311. Advanced Web Dynpro for ABAP COURSE OUTLINE. Course Version: 10 Course Duration: 4 Day(s)

DEV523 Customizing and Extending PowerDesigner

ADM100 AS ABAP - Administration

How to Find Suitable Enhancements in SAP Standard Applications

Enterprise Search Extension for SAP Master Data Governance

ADM900 SAP System Security Fundamentals

Visual Composer for SAP NetWeaver Composition Environment - Connectors

BOC320. SAP Crystal Reports - Business Reporting and Report Processing Strategies COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

Quick View Insider Microblog: Why Is There No Inbox?

Installing SAP NetWeaver Mobile Client (eswt) on a Storage Card

HA150 SQL Basics for SAP HANA

ADM950. Secure SAP System Management COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

BC410. Programming User Dialogs with Classical Screens (Dynpros) COURSE OUTLINE. Course Version: 10 Course Duration: 3 Day(s)

BC490 ABAP Performance Tuning

BC480 PDF-Based Print Forms

BOC310. SAP Crystal Reports: Fundamentals of Report Design COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Visual Composer Modeling: Migrating Models from 7.1.X to 7.2.0

TBIT44 PI Mapping and ccbpm

BC404. ABAP Programming in Eclipse COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

BC400 Introduction to the ABAP Workbench

AFA461 SAP Afaria 7.0 System Administration (SP03)

Quick View Insider: Understanding Quick View Configuration

Manual Activities of SAP Note Globalization Services, 2012/06/05

BC405 Programming ABAP Reports

EDB367. Powering Up with SAP Adaptative Server Enterprise 15.7 COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

BC400. ABAP Workbench Foundations COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

Using JournalEntries and JournalVouchers Objects in SAP Business One 6.5

How to Set Up Data Sources for Crystal Reports Layouts in SAP Business One, Version for SAP HANA

Testing Your New Generated SAP NetWeaver Gateway Service

Upgrade MS SQL 2005 to MS SQL 2008 (R2) for Non-High-Availability NW Mobile ABAP System

SAP Afaria Post- Installation Part 1

How to reuse BRFplus Functions Similar to R/3 Function Modules using BRF+ Expression Type Function Call

GRC100. GRC Principles and Harmonization COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

ADM920 SAP Identity Management

EDB116. Fast Track to SAP Adaptive Server Enterprise COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

Visual Composer s Control Types

How to Check or Derive an Attribute Value in MDG using BRFPlus

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day

TBW30 SAP BW Modeling & Implementation

SAP BusinessObjects Dashboards 4.0 SAP Crystal Dashboard Design 2011 SAP Crystal Presentation Design 2011

EP350. Innovated Content Management and Collaboration COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

BW Text Variables of Type Replacement Path

EP200. SAP NetWeaver Portal: System Administration COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

Quick View Insider: How Can I Change the Colors? (SNC 7.0)

How to Guide to create Sample Application in IOS using SUP ODP 2.2

SMP521. SAP Mobile Platform - Native and Hybrid Application Development COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

BW310. BW - Enterprise Data Warehousing COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

The Dbmlsync API. A whitepaper from Sybase ianywhere Author: Joshua Savill, Product Manager Date: October 30 th, 2008

Message Alerting for SAP NetWeaver PI Advanced Adapter Engine Extended

SAP ME Build Tool 6.1

EDB377. Fast Track to SAP Replication Server Administration COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

Using Default Values in Backend Adapter

SMP541. SAP Mobile Platform 3.0 Native and Hybrid Application Development COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

How to Work with Analytical Portal

Remote Monitoring User for IBM DB2 for LUW

BC401. ABAP Objects COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

Quick View Insider: How Do I Set Quick View as SNC s Entry Screen?

Building a Real-time Dashboard using Xcelsius and Data Integrator

Working with Data Sources in the SAP Business One UI API

Web Dynpro: Column Coloring in ALV

How to do a Manual Kernel Upgrade of an SAP Server

Architecture of the SAP NetWeaver Application Server

Personalizing SAP BusinessObjects Explorer Information Spaces

LO Extraction - Part 6 Implementation Methodology

Upgrading to CR 2008 V1 / SP1

TBIT40 SAP NetWeaver Process Integration

July, SAP Crystal Reports 2011 SP04 Product Availability Matrix (PAM)

TBW60. BW: Operations and Performance COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

SAP Plant Connectivity 2.2

Business Objects Integration Scenario 2

HA200 SAP HANA Installation & Operations SPS10

How to Package and Deploy SAP Business One Extensions for Lightweight Deployment

What s New / Release Notes SAP Strategy Management 10.1

NET312. UI Development with Web Dynpro for ABAP COURSE OUTLINE. Course Version: 10 Course Duration: 4 Day(s)

Business Reasons For Mobilizing Oracle Databases Using SQL Anywhere. A whitepaper from Sybase ianywhere

Transcription:

SAP Sybase IQ 16.0 SP08 PL1 Point-in-Time Recovery July 2014

Table of Contents 1.0 Introduction... 2 2.0 Performing Point-in-Time Recovery... 2 3.0 Point-in-Time Recovery on Multiplex Servers... 8 4.0 References... 9 1

1.0 Introduction Point-in-time recovery restores all committed database operations prior to a specified point in time. A point in time can be expressed as a timestamp and timezone, or as a transaction log offset. This feature is available for new SAP IQ 16.0 SP08 databases and databases upgraded to 16.0 SP08. Point-in-time recovery extends, but does not replace standard backup and recovery operations. Point-in-time recovery always begins by restoring a database from a data backup, then replays all committed activity from the recovery logs that cover the entire time period between the backup and the specified point in time. Transactions that were in progress, but not committed are rolled back. 1 Point-in-time recovery differs from standard backup and restore operations. Point-in-time recovery cannot recover a database from a clean shutdown or crash via normal crash recovery. 1 2.0 Performing Point-in-Time Recovery The following are the steps for performing point-in-time recovery on an SAP IQ simplex configuration together with quick start example. This guide uses SAP IQ16.0 SP08 PL01 on a Windows machine. STEPS: 1) Follow the Quick Start guide for Windows for Creating a single server: http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01686.1600/doc/ht ml/wil1308589070482.html 2) Start the iqdemo database server (if not already started). start_iq @iqdemo.cfg iqdemo.db 3) If SCC is not already running, start a new command prompt, cd to %SYBASE%\SCC- 3_3\bin and enter: scc.bat In your browser, enter the address https://<scc-hostname>:8283/scc/ Log in using the credentials for sccadmin. 2

4) In SCC, on the Administration Console, click the drop-down arrow next to <localost>_iqdemo, choose Execute SQL. 5) Set IQ_POINT_IN_TIME_RECOVERY_LOGGING to ON by entering the following in the SQL Statements box and clicking Execute : SET OPTION PUBLIC.IQ_POINT_IN_TIME_RECOVERY_LOGGING = 'ON' 6) You may use ALTER DBSPACE to identify the directory where you want to archive the recovery logs: ALTER DBSPACE IQ_SYSTEM_LOG RENAME <new-directory-specification>/<fileprefix> SAP IQ saves the point-in-time recovery log in the same directory as the.db file by default. This command saves the log in another directory. The new-directoryspecification must point to an existing directory. For example: Create a subdirectory called DemoBackup in the MyIQDemo directory and execute: ALTER DBSPACE IQ_SYSTEM_LOG RENAME 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo\DemoBackup' 7) Create a table in the demo database CREATE TABLE table1 (c1 INT, c2 INT, PRIMARY KEY (c1)) 8) Insert some data into that table INSERT INTO table1 (c1, c2) VALUES (1, 11), (2, 22), (3, 33) 9) Select data from that table SELECT * FROM table1 3

10) Perform a data backup BACKUP DATABASE FULL to 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo\DemoBackup\FU LL1' 11) Now perform some other operations on the database CREATE TABLE table2 (col1 INT, col2 INT, PRIMARY KEY (col1)) INSERT INTO table2 (col1, col2) VALUES (123, 123), (456,456) SELECT * FROM table2 12) Record the timestamp and the offset TS1: SELECT getdate() OFS1: SELECT db_property('lastcommitredopos') 4

13) Perform some more operations on the database INSERT INTO table2 (col1, col2) VALUES (10, 10) SELECT * FROM table2 14) Record the timestamp and offset again. 15) Now, we are going to restore the database to the point in time TS1. 16) Shut down the database. 17) Save a copy of the transaction log, iqdemo.log, to C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo\DemoBackup\iqde mo_savelog.log 18) Start a utility server, a server that you can use to connect to the utility database. To do this, enter the following at the command prompt: start_iq -su mypwd -gd DBA -gm 1 -n my_server 5

NOTE: You must ensure that no other database server is running when you start this utility server. 19) Start dbisql and connect to the utility database. To do this, enter the following at the command prompt: dbisql -c "UID=DBA;PWD=mypwd;DBN=utility_db" 20) Create a directory in which to store the restored database. The syntax for doing this is: RESTORE DATABASE '< db_file >' [ FROM '< file-name >' <...> [ USING LOG PATH ' directory, [...]] RECOVER UNTIL [ TIMESTAMP <timestamptz> OFFEST <log-offset> ] KEY <key_spec> [ VERIFY COMPATIBILE ] You must restore from a full database backup prior to the point in time you wish to recover the database. You must also restore all incremental backups taken prior to the point in time you want to recover. After this, you can run the RESTORE DATABASE command with the point-in-time syntax extensions shown above. NOTE: You must always specify a timestamp that is later than the backup time of the data backup specified in the FROM clause of the RESTORE DATABASE command. Otherwise, the server would return an error. In this example: RESTORE DATABASE 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo2\Restored\iqdemo_ restored.db' FROM 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo2\DemoBackup2\FUL L1' RECOVER UNTIL TIMESTAMP '2014-07-25 13:40:46.289' //'TS1' USING LOG PATH 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo2', 'C:\Users\i840136\AppData\Local\Temp\I1399044207\MyIQDemo2\DemoBackup2\iqd emo_savelog' 6

This method keeps the old database and creates a new one restored to the timestamp we specified. As an alternative to this, if you wish to replace the old database with this restored database, you can restore the database to the same folder as the old database. NOTE: You must ensure that you delete all.db,.iq,.log,.iqtmp and.iqmsg from the directory where you are restoring the database before executing the RESTORE DATABASE command. If the restore is successful, you should see something like this: 21) Shut down the utility server. 22) Start the iqdemo database normally: start_iq @iqdemo.cfg iqdemo.db 23) Connect to the database using dbisql and execute: SELECT * FROM table2 24) We expect the database to be restored to the point in time TS1, so we should see: You can also try restoring to a time right after the full backup was created but before table 2 was created. In this case, we would expect table 1, but not table 2, to be in the database. 7

3.0 Point-in-Time Recovery on Multiplex Servers 2 Point-in-time recovery is available on multiplex servers in release IQ 16.0 SP08 PL1. Release IQ 16.0 SP08 supports point-in-time recovery on simplex only. 1 Here are some things to note when performing point-in-time recovery on Multiplex server configurations: Point in time recovery logging only becomes fully enabled when the data backup begins. On multiplex servers, all servers must be shut down during first data backup to enable point-in-time recovery logging. Shutdown all secondary nodes first. Allow some time to let the coordinator release all global free list allocations, then shutdown the coordinator. Start the coordinator only to perform the backup. After the backup is complete, synchronize all and restart all secondary nodes. In general, setting the POINT_IN_TIME_RECOVERY_LOGGING option to OFF disables point-in-time recovery immediately. Point-in-time recovery logging will be disabled during the following multiplex configuration changes: - Multiplex failover - Simplex to multiplex conversion - Multiplex to simplex conversion To re-enable point-in-time recovery after multiplex configuration changes, shut down all secondary nodes. Allow some time to let the coordinator release all global free list allocations, then shutdown the coordinator. Restart the coordinator or new failover coordinator, then use the ALTER DBSPACE IQ_SYSTEM_LOG RENAME command to rename the point-in-time recovery log. Perform a full data backup. Synchronize and restart all secondary nodes. 2 As we saw in step 6 above, by default, SAP IQ saves the point-in-time recovery log in the same directory as the.db file. To save the log in another directory, we use: ALTER DBSPACE IQ_SYSTEM_LOG RENAME ' new-directory-specification/file-prefix ' The new-directory-specification must point to an existing directory. If point-in-time recovery logging is active, using this command with a new-directory-specification, opens a new log at the new location. For multiplex servers, this directory must reside on a shared file system and be writable by all multiplex nodes. On multiplex servers, when executing the RESTORE DATABASE statement (as in step 20 above), use the current transaction log from the coordinator node. Do not include 8

transaction logs from secondary nodes. Including transaction logs from secondary nodes causes point-in-time recovery to fail, and return a Files are missing for Point-in-time- Recovery error. To restore a database on multiplex to a different location as a part of point-in-time recovery: 1. Shut down the original coordinator. 2. Save the coordinator transaction log to /demo/savelog. 3. Use the coordinator server s name with the single-node and override flags -iqmpx_sn 1 -iqmpx_ov 1 to start the utility database from the coordinator server directory. 4. Drop the original database. 5. Perform point-in-time recovery and specify the new database location: RESTORE DATABASE '<new-location>/iqdemo.db' FROM '/demo/databackup/full1' RECOVER UNTIL TIMESTAMP '<TS1>' USING LOG PATH '/demo/pitrlog/', /demo/savelog 4.0 References 1 http://help.sap.com/saphelp_iq1608_iqnfs/helpdata/en/a8/881a8584f210158e6884e70ac09c 68/content.htm 2 http://help.sap.com/saphelp_iq1608_iqnfs/helpdata/en/2a/b05c1b1a9641789d280993267abf 51/content.htm 9

Copyright Copyright 2014 SAP AG. All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iseries, pseries, xseries, zseries, eserver, z/vm, z/os, i5/os, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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 S.A. in the United States and in other countries. Business Objects 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.