Sumário Itens Encontrados: 260Chapter 1: When to Step Away from the Keyboard 9Protecting and defending 9Choosing your tools 11Graphic-based, command-line Oracle tools and usage 12Staying away from dinosaurs 14Insisting on help 14What does a DBA do all day? 15Prioritizing tasksâdaily, weekly, monthly, quarterly, or yearly 16SLAs: Why isn't the database down anymore? 18Avoiding major blunders 19Summary 21Chapter 2: Maintaining Oracle Standards 23Adapting to constant change 23Database concepts 24Multiple ORACLE_HOME(s) 24Keeping the environment clean 25Oracle's Optimal Flexible Architecture (OFA) 2611g differences in the OFA standard 27XWINDOWS and GUI displays 28Automating day-to-day tasks 28DBMS_SCHEDULER 29OS cron utility executing a scheduled task on a Unix server 30OEM Console plus the Intelligent Agent 3111g Diagnosability Framework 32Advisors and checkers 33Missing temp file resolution 34Environmental variables and scripting 39Guidelines for scripting 40Separating the configuration file 40Separating the variable part of the script into its own configuration file 44Don't hardcode values; reference a configuration file and password file at runtime 45Putting variables at the top of the script with curly braces 47Moving functions to a centralized file to be reused 47Validating the use of the script 48Using SQL to generate code 48Helpful Unix commands 51Reducing operating system differences with common tools 52Configuration management, release management, and change control 53Configuration management 53Using OCM in disconnected mode with masking 54Mass deployment utility 55Release management 56DBA issues with patching 58Applying a patch without integrating MOS with OCM 60Using the new patch plan functionality with OCM installed and uploaded to MOS 60Change control 61Where, when, and who to call for help 62My Oracle Support 63Documentation library 64Summary 67Chapter 3: Tracking the Bits and Bytes 69Dump block 70Demonstration of data travel path 73Location of trace files 74Running dump block SQL statements 75Identifying files and blocks 78Tracking the SCN through trace files 80Oracle's RDBMS Log Miner utility 84Turn on archivelog mode 86Add supplemental logging 89Identification key logging 89Table-level supplemental logging 89Flash(back) Recovery Area (FRA) 90Automatic Undo Management (AUM) 92Identifying data in undo segments by flashing back to timestamp 92When to use Log Miner 94Identifying the data needed to restore 95SCN, timestamp, or log sequence number 95Pseudo column ORA_ROWSCN 96Flashback Transaction Query and Backout 96Enabling flashback logs 97Flashback Table 98Flashback Transaction Query with pseudo columns 100Flashback Transaction Backout 100Using strings to remove binary components 101Summary 103Chapter 4: Achieving Maximum Uptime 105Maximum Availability Architecture (MAA) 106Downtimeâplanned or unplanned 107MAA with commodity hardware: Case study 109Optimizing Oracle Database High Availability 111To archive or not to archive, you pick the mode 112Multiple archive destinations 113Moving the archive destination in an emergency 114Using a different disk device or disk mount 114Monitoring all hard drive space and Archivelog space 114Database compatibility parameter with spfile, pfile management 115Dealing with storageâRAID, SAME, ASM, and OMF 118RAIDâRedundant Arrays of Inexpensive Disks 119SAMEâStripe and Mirror Everything 119ASMâAutomatic Storage Management 120Mirrored filesâcontrol files and online redo logs 122Autoextending data files 124Auditing, log files, and max dump file size 125What is currently being audited? 126Auditing Session Activity 128Other logs to monitor 130Data dictionary healthcheck 131SQL*Net hardening, tuning, and troubleshooting 132Troubleshooting 135What can go wrong? 136Grid Control High Availability and Disaster Recovery 137Recommended installation for GC 10.2.0.5+ 138Why should I install a separate database? 139Cookbook for silent install and configuring later 139Migrating GC repositories 142Transportable tablespace migrations 142Keeping the repository highly available 143Repository backups, restores, or imports 144MAAârepository on a physical standby database 145OMS and agents' high availability 146Cloning Management agents 146GC at a very large site 147Summary 148Chapter 5: Data Guard and Flashback 149Physical, snapshot, and logical standbys 151Physical standby database 152Snapshot standby database 152Logical standby database 153Commodity hardware and mixed environments 154What is Data Guard broker? 155What controls the Data Guard broker? 155Which tool is best? 156Start with the default configurationâmaximum performance 158Utilizing multiple standby sites 159Protection modes and real-time apply 160Maximum performance (default) 161Maximum performance recommendations 161Maximum availability 163Maximum availability recommendations 163Maximum protection and recommendations 164Database states 164Manual failover with physical standby 165Manual failover with DGMGRL 167Flashback and guaranteed restore points 167Possible testing/recovery scenarios for Flashback and Data Guard 168Lost-write detection using a physical standby database 169Corruption, patch reversal, upgrades, or testing scenarios 170Reinstate failed primary scenario 173Troubleshooting the logical standby 174Options for resolving errors that stop the SQL Apply process 176How to skip a single transaction 177Active Data Guard and RMAN 178Other Data Guard notes and features 179Summary 180Chapter 6: Extended RMAN 183Recovery goals determine backup configuration 184Backup types and the default configuration 186Backup incremental levels 186Full backup 187Logical backup 188Oracle's suggested backup: What is missing? 188Controlfilesâan important part of backup and recovery 191How often should backups occur? 191Default configuration details 192Oracle's recommended backup strategy 196Issues with incremental merge backups 196Restore and recovery comparison 197Recommendations for Incremental Merge backup 197Calculating the FRA disk space needed 198Catalog versus controlfile RMAN recordkeeping and retention policies 199RMAN stored script and substitution variables 199Retention policies: Recovery window or redundancy? 201Not needed (OBSOLETE) versus not found (EXPIRED) 202What if I want to keep certain backups? 204Corruption detection 204Physical corruption 204Logical corruption 206Commands and utilities that detect corruption 206Which utility should be used? 208What should I do if corruption is detected? 209Data Recovery Adviser 210What does RMAN backup, restore, and recover? 212Possible interruptions to the recovery process 214What doesn't RMAN backup, restore, and recover? 214Online redo: Key to consistency 215User-managed backups 217What do I do before starting a restore and recovery? 218Find the most recent controlfile backup 220Simplified recovery through resetlogs 225RMAN cloning and standbysâphysical, snapshot, or logical 226Clones, DBIDs, and incarnations 227Creating a cloned database 227Post-cloning tasks 229Creating a standby database 229Physical standby 230Scheduled maintenance/cataloging of archivelogs 231Rolling forward a standby using incremental 231Rolling incremental for monthly updates to data warehouses 232The DBMS_BACKUP_RESTORE package 232Summary 232Chapter 7: Migrating to 11g: A Step-Ordered Approach 235Oracle net services 238Client compatibility (SQL*Net, JDBC, ODBC) 239RMAN binary, virtual/catalog, and database 240Grid Controlâdatabase repository and agents 241ASM, CFS, and RDBMS within an Oracle Grid infrastructure 242Recommended order of migration 243Installation of major versions, maintenance releases, and patches 244Release installation 245PatchSet installationâcloned ORACLE_HOME 246Database upgrade methods 248How long does the database upgrade take? 249Database Upgrade Assistant (DBUA) 250RMAN 251Using RMAN as part of a manual upgrade process 251Downgrading with RMAN 256Transportable Tablespaces (TTS) 257Preparatory steps for TTS migrations 257Using TTS for upgrades 259TTS cookbook 259Recreating an unrecoverable database with TTS 261Using TTS to add skipped read-only tablespaces during duplication 261Using TTS to merge two ASM databases into one 262Sharing read-only tablespaces between different databases with TTS 264Cross-platform migrations with a transportable database 267Physical and/or snapshot standbys 268Failing back to original version 269Transient logical standby: Rolling upgrades with minimal downtime 270Export/import or data pump migration 272Character set selectionâUTF8 278Post-11g upgrade tasks 280Summary 282Chapter 8: 11g Tuning Tools 283Hardware load testing and forecasting 284OrionâOracle I/O numbers calibration tool 287Calibrate I/O 289jMeter 290Monitoring hidden or underlying problems 290Proactive monitoring 291Automatic Diagnostic Database Monitor (ADDM) 292Automatic Workload Repository 295Active Session History (ASH) 296SQL Advisors 297STATSPACK 298Reactive diagnostic and tracing tools 299Bind peeking and Adaptive Cursor Sharing 300Gathering statistics 301Comparing statistics 304Restoring statistics history 304Knowing what needs to be tuned 305Tuning a single query 306SQL Plan Management (SPM) 307SQL Management Base 308Tracing and diagnostic events 308What is an event ? 308When should I set an event? 309What are the different event levels? 309Specific Trace events for performance problems 309Interpreting the resulting Event Trace file 310Upgrading the Optimizer 311Capturing and backing up execution plans and statistics 312SQL Tuning Sets 312Stored Outlines 313Capturing and backing up Optimizer Statistics 313Upgrade the database to 11g 315Capturing new execution plans and new statistics 318Evolving or verifying new plans that execute better than the 10g versions 318Summary 319Index 321