part1

52
1

description

DBA information

Transcript of part1

  • Oracle Database Backup-and-Recovery Best Practices and New FeaturesTimothy ChienPrincipal Product Manager Database High AvailabilityHusnu SensoyVLDB Expert Turkcell Communication Services

    *

    Agenda

    What Keeps You Awake at Night?Oracle Data Protection Planning & SolutionsOracle Backup & Recovery SolutionsPhysical Data Protection Recovery ManagerOracle Secure BackupLogical Data ProtectionFlashback TechnologiesRecovery AnalysisData Recovery AdvisorPutting It All Together: Customer ExampleTurkcell Backup & Recovery Case StudyQ&A

    *

    What Keeps You Awake at Night? Data Protection ConcernsMeeting recovery SLAs?Reducing exposure to data loss?Meeting backup windows?Dealing with long-term backup storage?Management complexity?Budget?

    Where do I begin?

    *

    Assess Recovery RequirementsFirst Step in Data Protection PlanningIdentify critical data from restDesign recovery requirements around data criticalityAssess tolerance for data loss - Recovery Point Objective (RPO)How frequently should backups be taken?Point-in-time recovery required?Assess tolerance for downtime - Recovery Time Objective (RTO)Downtime: Problem identification + recovery planning + systems recoveryTiered RTO per level of granularity, e.g. database, tablespace, table, rowDetermine backup retention policyOnsite, offsite, long-termAssess data protection requirementsPhysical: Disasters, outages, failures, corruptionsLogical: Human errors, application errors

    *

    Oracle Maximum Availability ArchitectureRobust & Integrated Data ProtectionStorageActive Data GuardFully ActiveFailover ReplicaRecovery Manager (RMAN) &Oracle Secure Backup (OSB)Low Cost, High Performance Backup & RecoveryFlashback TechnologiesCorrect Errors by Moving Back in TimeDatabaseProduction SiteStandby SiteData Recovery AdvisorIntelligent, Guided Recovery Analysis

    *

    Oracle Data Protection Solutions

    Backup & RecoveryRecovery Time Objective (RTO)Physical Data ProtectionRecovery Manager (RMAN)Oracle Secure Backup (OSB)Hours/DaysLogical Data ProtectionFlashback TechnologiesMinutes/HoursRecovery AnalysisData Recovery AdvisorMinimizes time for problem identification & recovery planning

    Disaster RecoveryRecovery Time Objective (RTO)Physical Data ProtectionActive Data GuardSeconds/Minutes

    *

    Oracle Backup & Recovery SolutionsBackup and Recovery on SteroidsRecovery Manager (RMAN)Physical Data ProtectionData Recovery AdvisorLogical Data ProtectionRecovery AnalysisFlashback Technologies

    *

    Agenda

    What Keeps You Awake at Night?Oracle Data Protection Planning & SolutionsOracle Backup & Recovery SolutionsPhysical Data Protection Recovery ManagerOracle Secure BackupLogical Data ProtectionFlashback TechnologiesRecovery AnalysisData Recovery AdvisorPutting It All Together Customer ExampleTurkcell Backup & Recovery Case StudyQ&A

    *

    Backup & Recovery FoundationComplete Oracle Solution from Disk to TapeOracle backup and recovery for your entire IT environmentMultiple media options available to meet the most stringent SLAsLocal disk, remote Cloud storage, physical and virtual tapeFile System DataUNIXLinuxWindowsNASOracle DatabasesOracle Recovery Manager (RMAN)Fast Recovery AreaTape BackupOracle Secure Backup (OSB)Oracle Secure Backup (OSB) Cloud Module

    *

    Oracle Recovery Manager (RMAN)Oracle-integrated Backup & Recovery EngineOracle Enterprise ManagerRMANDatabaseFast Recovery AreaTape DriveOracle Secure BackupIntrinsic knowledge of database file formats and recovery proceduresBlock validationOnline block-level recoveryTablespace/data file recoveryOnline, multi-streamed backupUnused block compressionNative encryptionIntegrated disk, tape & cloud backup leveraging the Fast Recovery Area and Oracle Secure BackupCloud

    *

    Oracle Fast Recovery AreaAutomatic Disk-to-Disk (D2D) Backup & RecoveryFast Recovery Area Integrated D2D backup and recoveryFavorable disk economics low-cost disks used for recovery areaOracle makes it even better with instantaneous restore:switch datafile 4 to copy;recover datafile 4;Fast incremental backups Backs up only changed blocksChanged blocks are tracked using a very efficient algorithm, e.g. 20x fasterNightly incremental backup rolls forward recovery area backupNo need to do full backupsrecover copy of database with tag ORCL;

    Fast Recovery AreaNightly ApplyValidatedIncrementalWeeklyArchiveTo TapeDatabase AreaIntegrated backup-storage tiering

    *

    RMAN New FeaturesOracle Database 11g Release 2Automatic Block RepairAllows corrupt blocks on the primary database to be automatically repaired from physical standby database, as they are detected.In-line and transparent. User sees brief wait from query on corrupt block while it is being repaired.Can also be performed on-demand via RECOVER commandRequires Active Data Guard (real-time query on physical standby database).Active Data Guard StandbyPrimary databaseQueriesAutomatic Block Repair

    *

    RMAN New FeaturesOracle Database 11g Release 2Backup compression: popular way to save on storage costsMultiple RMAN backup compression levelsChoose compression levels & backup throughput[BASIC] | HIGH | MEDIUM | LOWHIGH reduces backup size by 40%+ depending on data typeLOW least impact on backup throughputMEDIUM best balance between compression and throughputHIGH | MEDIUM | LOW require Advanced Compression Option

    *

    RMAN New FeaturesOracle Database 11g Release 2RMAN ClientDisk/Tape BackupSource DatabaseRestore ProcessesClone DatabaseSQL Net Connections In previous releases, DUPLICATE required RMAN client connections to source and clone databases.With enhanced DUPLICATE, connection to source database not needed for environments where network connection is not available.

    *

    Additional RMAN New Features

    FeatureBenefitBackup Fast Recovery Area to disk locationProtect Fast Recovery Area with on-disk backup of its RMAN backups, archived logs, and controlfiles.Extended tablespace point-in-time recovery (TSPITR) capabilities Recover a dropped tablespace. Perform multiple tablespace point-in-time recoveries, without requiring recovery catalogResumable DUPLICATE DUPLICATE can resume processing from most points of failure, reducing overall time.CONVERT DATABASE can skip unneeded datafiles Reduces overall conversion time by only processing the required UNDO-containing data files.SET NEWNAME FOR TABLESPACE | DATABASE Simplifies renaming of datafiles for RESTORE, DUPLICATE, and TSPITR operations.

    *

    RMAN Best Practices

    *

    RMAN Best PracticesFast Recovery Area (FRA) guidelinesPlace FRA on separate storage & store backups, in addition to copy of control file, redo logs, and archived logs, to protect all needed recovery-related files from production outages.When estimating FRA size, if you want to keep:Control file backups and archived logsEstimate archived logs generated between successive backups on the busiest days and multiply total size by 2 to account for activity spikes.Archived logs and Flashback logsMultiply the archived log size between backups by 4, assuming Flashback retention = time between archived log backups.Incremental backupsAdd in their estimated sizesOn-disk image copy backupAdd in size of the database minus the size of temp files

    *

    RMAN Performance FactorsBalancing Backup and Restore Requirements Incremental backup strategy improves backup performance, with trade-off in recovery performance Enable block change tracking for fast incremental backups Cumulative vs. differential incremental backups Incremental forever requires an initial full then incrementals thereafterFast recovery: Current image copy of database readily available Backup x files in parallel per channel, improving backup performance RMAN multiplexing level = min(FILESPERSET, MAXOPENFILES) Exception: Set MAXOPENFILES = 1 for SAME or ASM datafiles Set # of RMAN channels = # of tape drives, so that media management multiplexing is not used for RMAN backupsSetting # of RMAN channels > # of tape drives will impact restore, due to interleaved backup pieces on single tape Assess host resources, production disk I/O, HBA/network, tape drive throughput Minimum performant component of these will be performance bottleneck

    ConsiderationPerformance EffectIncremental Backup Strategy

    Multiplexing

    Hardware/Network/ Storage

    *

    Data Warehouse B&R Best PracticesExploit partitioning and read-only tablespacesOlder partitions can be moved to read-only tablespacesBackup read-only tablespaces once, then periodically, depending on tape retention policyDivide full backup workload across multiple daysLeverage database & backup compressionSave time with tablespace level backupsBackup index tablespaces less frequently than data tablespacesBackup scarcely used tablespaces less frequentlyReduce restore time for most critical tablespaces, by grouping them together in separate backupsTake incremental backup when NOLOGGING operations finish to ensure recoverability

    *

    Additional ResourcesRMAN Step-by-Step Performance Tuning (NEW)http://www.oracle.com/technology/deploy/availability/pdf/rman_tuning_mm_bp.pdfVery Large Database Backup & Recovery Best Practiceshttp://www.oracle.com/technology/deploy/availability/pdf/vldb_br.pdfBest Practices using Recovery Manager with Oracle Data Guard and Oracle Streamshttp://www.oracle.com/technology/deploy/availability/pdf/oracle-openworld-2008/298772.pdf

    *

    Oracle Secure Backup

    *

    Oracle Secure Backup (OSB) Enterprise Tape Backup Management

    Oracle Enterprise ManagerOracle Secure BackupTape LibraryVirtual Tape Library (VTL)Protects Entire IT EnvironmentOracle Database 11g Release 2 to Oracle9i 25 40% faster tape backupHeterogeneous file systems (UNIX/ Linux / Windows) and NAS devicesBuilt-in Oracle IntegrationCentralized management in distributed environmentsOver 75% less expensive than comparable products

    *

    Oracle Secure Backup Cloud module: Backup databases to Amazon CloudComplements local disk and/or tape backupEliminates IT management overhead of a disaster recovery siteBacked by Amazon S3 uptime SLAs$3,500 per RMAN channel More information: http://www.oracle.com/technology/tech/cloud/index.html

    Amazon S3Oracle Secure Backup Cloud ModuleDatabase Files / Fast Recovery Area RMAN Compression / EncryptionOracle Secure Backup Cloud ModuleOffsite Database Backups in the Cloud

    *

    Agenda

    What Keeps You Awake at Night?Oracle Data Protection Planning & SolutionsOracle Backup & Recovery SolutionsPhysical Data Protection Recovery ManagerOracle Secure BackupLogical Data ProtectionFlashback TechnologiesRecovery AnalysisData Recovery AdvisorPutting It All Together Customer ExampleTurkcell Backup & Recovery Case StudyQ&A

    *

    Logical Data ProtectionFast Rewind of Logical Errors

    Recovery Manager (RMAN)Physical Data ProtectionData Recovery AdvisorLogical Data ProtectionRecovery Analysis Flashback Technologies

    *

    Flashback TechnologiesError Detection & CorrectionFlashback revolutionizes error recoveryView good data as of a past point-in-timeSimply rewind data changesTime to correct error equals time to make errorCorrection Time = Error Time + f(DB_SIZE)Low impactExcellent tool for configuring QA, Dev and Training databasesFlashback is easy simple commands, no complex procedureRecovery TimeTraditional RecoveryFlashback

    *

    Error Investigation with FlashbackFlashback QueryQuery all data at point in time

    Tx 1Tx 2Tx 3select * from Salary AS OF 12:00 P.M. where select * from Salary VERSIONS BETWEEN 12:00 PM and 2:00 PM where select * from FLASHBACK_TRANSACTION_QUERY where xid = HEXTORAW(000200030000002D); Flashback Transaction QuerySee all changes made by a transactionFlashback Version QuerySee all versions of a row between timesSee transactions that changed the row All above are based on available UNDO

    *

    Error Correction with FlashbackFlashback Database restore database to any point in timeFlashback Table restore contents of tables to any point in time (undo-based)Flashback Drop restore accidentally dropped tables (based on free space in tablespace)

    Flashback Transaction back out transaction and all subsequent conflicting transactions (redo-based) OrderDatabaseCustomer

    *

    Flashback DatabaseContinuous Data Protection (CDP)Fast point-in-time recovery strategyEliminate the need to restore a whole database backupContinuous data protection for databaseOptimized, before-change block loggingRestores just changed blocksReplay log to restore DB to desired timeIts fast - recover in minutes, not hoursIts easy - single command restoreFlashback Database to 2:05 PMRewind button for the DatabaseData FilesFlashback LogNew BlockVersionDisk WriteOld BlockVersion

    *

    Flashback Technologies New FeaturesOracle Database 11g Release 2Increased AvailabilityEnable Flashback Database while database is openTest Flashback without having to take downtimeBetter ManageabilityMonitor Flashback Database progress with v$session_longopsProgress percentage can be found with (SOFAR / TOTALWORK) Minimize System ImpactOptimized Flashback logging for batch/insert intensive loadsPotentially reduce Flashback logging impact to ~2%Extended Dependency TrackingFlashback Transaction supports foreign key dependency tracking

    *

    Best Practices Undo-based FlashbackFlashback Query, Flashback TableUse Undo Advisor (available through Enterprise Manager) to get recommendations on available undo retention for various sizes.Use fixed size undoUndo retention automatically tuned for best possible retention based on tablespace size and current system load.Be aware of DDL restrictions not possible to query in the past if table structure is modified (e.g. drop/modify column, move table, etc.)Further details: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_flashback.htm#sthref1496

    *

    Best Practices Flashback DatabaseTune FRA storageUse ASM, configure enough disk spindles, etc.Use physical standby database to test Flashback loggingUse V$FLASHBACK_DATABASE_LOG to size log space, after running workload > duration of Flashback retention period.Create Guaranteed Restore Point (GRP) without enabling Flashback loggingSaves disk space for workloads where same blocks are repeatedly updatedDrop GRP to immediately reclaim spaceFurther details: Metalink Note 565535.1 Flashback Database Best Practices & Performance

    *

    Agenda

    What Keeps You Awake at Night?Oracle Data Protection Planning & SolutionsOracle Backup & Recovery SolutionsPhysical Data Protection Recovery ManagerOracle Secure BackupLogical Data ProtectionFlashback TechnologiesRecovery AnalysisData Recovery AdvisorPutting It All Together Customer ExampleTurkcell Backup & Recovery Case StudyQ&A

    *

    Recovery AnalysisIntelligent, Guided RecoveryRecovery Manager (RMAN)Physical Data ProtectionData Recovery AdvisorLogical Data ProtectionRecovery Analysis Flashback Technologies

    *

    Data Recovery AdvisorThe MotivationOracle provides robust tools for data repair:RMAN physical media loss or corruptions Flashback logical errorsData Guard physical problemsHowever, problem diagnosis and choosing the right solution can be error prone and time consumingErrors more likely during emergenciesRecoveryInvestigation & Planning

    *

    Data Recovery Advisor (DRA)Oracle Database tool that automatically diagnoses data failures, presents repair options, and executes repairs at the user's requestDetermines failures based on symptomsE.g. an open failed because datafiles f045.dbf and f003.dbf are missingFailure Information recorded in diagnostic Automatic Diagnostic Repository (ADR)Flags problems before user discovers them, via automated health monitoringIntelligently determines recovery strategiesAggregates failures for efficient recoveryPresents only feasible recovery optionsIndicates any data loss for each optionCan automatically perform selected recovery stepsAccessed via RMAN or EMReduces downtime by eliminating confusion

    *

    Data Recovery Advisor Wizard

    *

    Data Recovery Advisor View Failures

    *

    Data Recovery Advisor Manual Repair

    *

    Data Recovery Advisor Recovery Advice

    *

    Data Recovery Advisor Summary

    *

    Agenda

    What Keeps You Awake at Night?Oracle Data Protection Planning & SolutionsOracle Backup & Recovery SolutionsPhysical Data Protection Recovery ManagerOracle Secure BackupLogical Data ProtectionFlashback TechnologiesRecovery AnalysisData Recovery AdvisorPutting It All Together Customer ExampleTurkcell Backup & Recovery Case StudyQ&A

    *

    Putting It All Together.. Customer ExampleAny point in time within recovery window