OCA: Oracle® Database 12c Administrator Certified Associate II

770 1.2K 0
OCA: Oracle® Database 12c Administrator Certified Associate II

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Oracle databases are the de facto standard for large Internet sites, missioncritical enterprise applications, and cloud solutions. With the acquisition of Sun Microsystems, Oracle offers complete enterprise business solutions with engineered systems capable of running worldclass databases and applications. Enterprise Resource Planning (ERP) application suites, data warehouses, and business applications at many large and mediumsize companies rely on Oracle. The demand for DBA resources remains higher than for other professions during weak economic times. This book is intended to help you pass the Oracle Database 12c: Advanced Administration exam, which will establish your credentials as an Oracle Certified Professional (OCP). The OCP certification is a prerequisite for obtaining an Oracle Certified Master (OCM) certification. Using this book and a practice database, you can learn the necessary skills to pass the 1Z0063 Oracle Database 12c: Advanced Administration exam.

OCP Oracle Database 12c Administrator Certified Professional ® Study Guide Robert G Freeman Charles A Pack Senior Acquisitions Editor: Jeff Kellum Development Editor: Tom Cirtin Technical Editors: Pete Sharman; Syed Jaffar Hussain Production Editor: Dassi Zeidel Copy Editor: Linda Recktenwald Editorial Manager: Pete Gaughan Vice President and Executive Group Publisher: Richard Swadley Associate Publisher: Chris Webb Media Project Manager 1: Laura Moss-Hollister Media Associate Producer: Doug Kuhn Media Quality Assurance: Josh Frank Book Designer: Judy Fung Compositor: Craig Woods, Happenstance Type-O-Rama Proofreader: Sara Wilson Indexer: Ted Laux Project Coordinator, Cover: Patrick Redmond Cover Designer: Wiley Cover Image: ©Getty Images Inc./Jeremy Woodhouse Copyright © 2014 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-64407-2 ISBN: 978-1-118-76331-5 (ebk) ISBN: 978-1-118-93191-2 (ebk) No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose No warranty may be created or extended by sales or promotional materials The advice and strategies contained herein may not be suitable for every situation This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arising herefrom The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S at (877) 762-2974, outside the U.S at (317) 572-3993 or fax (317) 572-4002 Wiley publishes in a variety of print and electronic formats and by print-on-demand Some material included with standard print versions of this book may not be included in e-books or in print-on-demand If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com For more information about Wiley products, visit www.wiley.com Library of Congress Control Number: 2014930409 TRADEMARKS: Wiley and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affiliates, in the United States and other countries, and may not be used without written permission Oracle is a registered trademark of Oracle and/or its affiliates All other trademarks are the property of their respective owners John Wiley & Sons, Inc is not associated with any product or vendor mentioned in this book 10 Dear Reader, Thank you for choosing OCP: Oracle Database 12c Administrator Certified Professional Study Guide This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching Sybex was founded in 1976 More than 30 years later, we’re still committed to producing consistently exceptional books With each of our titles, we’re working hard to set a new standard for the industry From the paper we print on, to the authors we work with, our goal is to bring you the best books available I hope you see all that reflected in these pages I’d be very interested to hear your comments and get your feedback on how we’re doing Feel free to let me know what you think about this or any other Sybex book by sending me an email at contactus@sybex.com If you think you’ve found a technical error in this book, please visit http://sybex.custhelp.com Customer feedback is critical to our efforts at Sybex Best regards, Chris Webb Associate Publisher Sybex, an Imprint of Wiley For my Carrie, my kids, and my parents —Robert G Freeman For my wife, Donna, and our daughter, Jenny —Charles A Pack Acknowledgments Writing a book is such a vast undertaking that it’s hard to know where to start with the acknowledgments I also hate writing this part because, frankly, someone always gets forgotten That being said, here we go Thanks to my patient wife, Carrie, who sits across from me in the bedroom as I write away I’m sure she is tired of being a book/work widow Thanks to my little bundle of joy, Amy, who is now months old She and Carrie both remind me daily of what is truly important in the world Thanks to my awesome older kids It’s so odd to have an 8-month-old and then five kids from ages 28 to 21 Thanks to all the folks at Oracle with whom I work, they are way too many to name Writing books is a long, complex, and often frustrating task Thanks to all the folks at Sybex who participated in the making of this book Thanks especially to Jeff Kellum, who was my acquisitions editor, for getting me involved in this project I’d worked with Jeff before on my very first book, and apparently he didn’t remember the pain I caused him well enough, since he asked me to write this book anyway Jeff put up with a lot on this book; we really made the schedule something of a joke, I’m afraid Thanks to Tom Cirtin, who tried so hard to get us back on track schedule-wise Finally, a very important thanks goes out to you Thanks for buying this book Thanks for wanting to become an Oracle Certified Professional Thanks for any nice comments you might leave on websites here and there Thanks for trusting us to help you succeed at the test! —Robert G Freeman Thanks to Robert Freeman and Jeff Kellum for the opportunity to write this book Thanks to my colleagues at CSX, some of the brightest and hardest working people I’ve ever known, for continuously challenging me to stay technically sharp This book would not have been written without my wife’s permission, of course Thank you, Donna, for your support through these fun projects of mine Thank you to my daughter Jenny, who is now 13 and is sitting next to me on the sofa sketching MLP characters on her iPad while I write about “the Oracle.” —Charles A Pack About the Authors Robert G Freeman   lives in Las Vegas, Nevada, and loves it He is a Master Principal Database Expert at Oracle Corporation He works in the Engineered Systems Group (Public Sector) and deals with things like Exadata and Oracle databases all the time Besides working with Oracle databases (that’s his story and he’s sticking to it), Robert writes an occasional book (at last count over a dozen), flies airplanes, enjoys karate, and has a family that is awesome He met Charles Pack, who is a fellow Okie (even if he sometimes roots for the wrong school), years ago and to this day wonders if Charles will ever walk around without wearing sunglasses to hide his eyes and the deep meaning contained in them Robert is the husband of the patient Carrie and father of six (and counting!) wonderful, if not occasionally misguided, children Charles A Pack   is an Oracle Certified Professional DBA with over 25 years of IT experience His career has included PC repairman, network administrator, systems operator, COBOL programmer, backup and storage engineer, DBA, architect, project manager, and people manager He earned a bachelor of science degree from Oklahoma State University, an MBA from The University of Oklahoma, and a master of science in computer science from Texas A&M University—Corpus Christi He has taught Oracle DBA classes at Florida State College—Jacksonville and has presented on the subject at universities and to professional organizations He authored the Oracle Press OCP Oracle9i Database: Performance Tuning Exam Guide and collaborated with co-author Robert Freeman on Oracle to 8i Upgrade Exam Cram At CSX Technology in Jacksonville, Florida, he has been responsible for storage, backups, and capacity planning, as well as enterprise content management and collaboration In his current role as Technical Director of Infrastructure Architecture, he and his teams are responsible for strategic infrastructure design, capacity planning, and system performance He is a true cowboy at heart, and he loves to barbecue About the Technical Reviewers Pete Sharman   is a principal product manager with the Enterprise Manager product suite group in the Server Technologies Division at Oracle Corporation He has worked with Oracle for the past 18 years in a variety of roles from education to consulting to development and has used Enterprise Manager since its 0.76 beta release Pete is a member of the Oak Table Network and has presented at conferences around the world from Oracle Open World (both in Australia and the United States), RMOUG Training Days, the Hotsos He coauthored two books, one on Enterprise Manager 12c and another on Oracle Database Appliance, and authored a book on how to pass the Oracle8i Database Administration exam for the Oracle Certified Professional program He lives in Canberra, Australia, with his wife and three children Syed Jaffar Hussain   has more than 21 years of IT experience that includes more than 14 years of production Oracle database administration Oracle has honored him with the prestigious Oracle ACE Director role and named him DBA of the Year for 2011, both for his vast knowledge and for contributions to the Oracle community He is an Oracle Certified Master (OCM) for Oracle Database 10g, a status granted only after passing extensive challenges in a hands-on environment He is also an Oracle Database 10g RAC Certified Expert Syed Jaffar is a well-known Oracle speaker and he coauthored Expert Oracle RAC12 and Oracle 11g R1/R2 Real Application Clusters Essentials He blogs regularly at http://jaffardba.blogspot.com 704 local users  –  Mkdir command local users, 553 altering, 633–634 characteristics, 627 CONTAINER clause, 627 creating, 628, 631–632, 634–636 creation authority, 628 description, 624 managing, 625 privileges See privileges profiles, 630 roles See roles usernames, 629 Locate Workload screen, 437, 438, 441, 441 LOG parameter, 114 LOG_ARCHIVE_ parameters, 27 LOG_ARCHIVE_DEST parameter, 28 LOG_ARCHIVE_DEST_1 parameter, 33 LOG_ARCHIVE_FORMAT parameter, 28 LOG_CHECKPOINT_INTERVAL parameter, 22 LOG_CHECKPOINT_TIMEOUT parameter, 22 LOG_FILE_NAME_CONVERT parameter, 291–292 log sequences incomplete recovery, 211 log sequence-based recovery, 79–80 log writer process (LGWR), logical backups, logical corruption, 350 logical failures, logical standby databases, 609, 611–612 LogMiner tool, 386 description, 587 redo log analysis, 612–615 LOGON_USER column, 378 logs Flashback Database, 386 redo See redo logs lost objects, TSPITR for, 303–304 ls command, 322 lsct command, 322 lsdg command, 322 lsdsk command, 322 M %M backup format specification, 130 MAA (Maximum Availability Architecture) recommendations, 4–5 maintQualifier command, 138 maintSpec command, 138 Manage Pluggable Databases screen for PDBs creating, 518, 518 dropping, 538, 538 plugging into CDBs, 526, 527 unplugging, 534, 535 MAX_STRING_SIZE parameter, 576 MAXDAYS parameter, 221 Maximum Availability Architecture (MAA) recommendations, 4–5 MAXPIECESIZE parameter, 131–132 MAXSEQ parameter, 221 MAXSETSIZE operator, 131–132 MAXSIZE option, 356 md_backup command, 322–323 md_restore command, 322–323 Mean Time to Recover Advisor (MTTR Advisor), 22 mean time to recovery (MTTR), 386 media backup, 109 recovery, 6, 19, 218–219, 414–416 Media Management Library (MML), 109 media servers in OSB, 326 members in redo logs, 13, 86–89 MEMORY_MAX_TARGET parameter, 16 memory structures for backup and recovery, 8–11 Merge Join Cartesian operation, 423 metadata backups, 321–323 restoring, 323 storage requirements, 171 migrating non-CDB databases to CDBs, 542–543, 589–595 MINIMIZE LOAD parameter, 264 missing data file recovery, 72–73 missing recovery catalog schema records, 180–181 mkalias command, 322 Mkdir command, 322 MML (Media Management Library)  –  online recovery MML (Media Management Library), 109 modes See ARCHIVELOG mode; NOARCHIVELOG mode monitoring Flashback Data Archive, 385 Flashback Database, 387–388 instance recovery, 22 RMAN operations, 257–260 Mount mode, 19 MOUNT option in CDB startup, 564 moving databases, 308–309, 588–589 non-CDBs into PDBs, 529, 531–533 PDBs with CDBs, 588 Transportable Database files, 485 MTTR (mean time to recovery), 386 MTTR Advisor (Mean Time to Recover Advisor), 22 multiplexing, 143 multisection backups, 143, 155 Multitenant architecture, 329, 503–504, 551–552 advantages and benefits, 506–507 audit policies, 603 CDBs See CDBs (container databases) Data Pump, 334–335 Data Recovery Advisor, 335–339 Database Vault, 606–607 description, 504–505 exam essentials, 544, 578–579 parameters, 574–578 PDBs See PDBs (pluggable databases) privileges, 637–638 PUBLIC role, 645 review questions, 545–549, 580–584 summary, 544, 578 multithreaded processes, N %n backup format specification, 130 %N backup format specification, 130 names archived redo logs, 28 database files, 65 import PDBs, 589 local users, 627, 629 PDBs, 612 705 NDMP daemon, 327 network failures, new hosts, restoring to, 308–311 NID utility, 169 NLS_DATE_FORMAT environment variable, 211, 300 NO FLASHBACK ARCHIVE clause, 384 NOARCHIVELOG mode, 26 backups consistent and inconsistent, 141–142, 145 overview, 17 mixing with ARCHIVELOG mode, 27 recovery basics, 191–194 overview, 17, 58–61 NOAUDIT POLICY command, 604–605 NOAUDIT SQL command, 603 NOCATALOG parameter, 114 Nomount mode, 19 NOMOUNT option in CDB startup, 565 non-CDBs migrating to CDBs, 542–543, 589–595 moving into PDBs, 529 NONCDB_COMPATIBLE parameter, 576–577 noncritical data files and tablespaces recovery, 204–209 NORESET parameter, 91 NOT NULL constraint, 317 NOTABLEIMPORT parameter, 317 O OBJECT_NAME column, 361 obsOperandList command, 138 OEM (Oracle Enterprise Manager), 109 offline backups, 36–40, 145 offline tablespaces, 12 OLDEST_FLASHBACK_SCN column, 387–389 OLDEST_FLASHBACK_TIME column, 387–389 ON DATABASE clause, 465 online backups, 40 executing, 42–45, 148–151 mechanics, 40–42 overview, 145–148 online recovery, 204 data files, 206–207 tablespaces, 207–209 706 online redo logs  –  PDBs (pluggable databases) online redo logs archived, 30, 33 overview, 12–13, 14 recovery, 85–89 online segment shrink operations, 487–494, 490–493 online tablespaces, 12 OPatch utility, 481 OPEN FORCE option, 572 Open mode, 19 OPEN option for CDB startup, 565 OPEN RECOVER option, 565 OPEN RESTRICTED parameter, 293 opening databases, 80–81 PDBs, 570–572 operating system accounts, 327 OPERATION column DBA_RECYCLEBIN view, 361 FLASHBACK_TRANSACTION_QUERY view, 378 optimization, backup, 132 OPTIONS clause in SQL*Loader, 596 Options screen in workload capture, 434 Oracle Automatic Diagnostic Framework, 264–265 Oracle Cloud Control, 174 Oracle data dictionary ARCHIVELOG mode views, 33–35 overview, 8–11 Oracle Data Guard tool, 5, 310 description, 587 working, 609–612 Oracle Data Pump tool See Data Pump tool Oracle Database 11g RMAN Backup & Recovery, 121, 324 Oracle Database Fault Diagnostic Framework, 264–265 ADR, 267–270, 268 automatic diagnostic workflow, 270–271, 271 components, 271–272 overview, 265–266 Oracle Enterprise Manager (OEM), 109 Oracle Flashback features See Flashback technologies Oracle GoldenGate product, 5, 310 ORACLE_HOME environment, 15, 110, 113 Oracle Log Miner tool, 386 description, 587 redo log analysis, 612–615 Oracle Secure Backup (OSB), 323–324 architecture, 325–327 installing and configuring, 327–329 overview, 324–325 RMAN interface, 325 ORACLE_SID environment variable, 330–331 ORAPWD command, 93, 290 ORIGINAL_NAME column, 361 OSB See Oracle Secure Backup (OSB) OSB-XE product, 324 OWNER column, 361 P %p backup format specification, 130 packages in SQL Tuning Advisor, 423, 424 parallel direct paths in SQL*Loader, 600 parallel operations in resumable space, 458 PARALLEL parameter, 600 parallelism, configuring, 130 parameter files (pfiles) backup and recovery, 15–16 description, 109 Parameters screen in workload capture, 435, 435 PARFILE parameter, 596 PARTIAL keyword, 264 PARTITION_NAME column, 361 partitions, recovering, 315–320 password-based encryption, 128 password files auxiliary instances, 290 recovery, 93, 229 passwords, changing, 112 path loads in SQL*Loader, 599–600 PDB_FILE_NAME_CONVERT parameter, 577 PDBs (pluggable databases), 329, 504 backups, 331–332 CDBs relationship, 505 closing, 573–575 common user data access, 648–653 connections establishing, 552–553 SQL*Plus, 558–564 creating, 507, 517 clones, 525–526 DBCA, 518–522, 518–524 PDB$SEED container  –  PURGE RECYCLEBIN command moving non-CDBs into PDBs, 529, 531–533 plugging unplugged PDBs into CDBs, 526–529, 527–531 SQL*Plus, 522–525 data dictionaries, Data Pump tool, 588 Database Vault-enabled, 607–609 dropping DBCA, 538–541, 538–541 SQL*Plus, 542 duplicating, 333–334 opening, 570–572 overview, 330 parameters, 574–578 plugging in, 626–627 plugging into Database Vault-enabled PDBs, 607–609 in primary databases, 610–611 privileges See privileges provisioning, 507 recovering, 332–333 renaming, 612 roles See roles security, 623–625 shutting down, 572–573 storage, 494–496 tablespaces, 495–496 unplugging DBCA, 534, 535–537 SQL*Plus, 541 PDB$SEED container, 505, 518, 522 performance, 399, 416–417 Database Replay, 430–431 analyzing results, 447–448, 447 capturing workloads, 431–437, 432–436 preprocessing captured workloads, 437– 439, 437–440 replaying captured workloads, 440–446, 441–446 exam essentials, 449 failure diagnosis See diagnosing failures review questions, 450–454 SQL Tuning Advisor, 417–418 manual, 418–423, 418–424 package and views, 423, 424 workload tuning, 424–430, 425–430 summary, 448 permanent tablespaces, managing, 495–496 persistent configuration settings, 119–120 707 PFILE command, 226 pfiles (parameter files) backup and recovery, 15–16 description, 109 physical backups, physical corruption, 350 physical failures, physical standby databases, 609–610 Pluggable Database Options screen, 520, 521, 529, 529 PLUGGABLE DATABASE parameter, 334 pluggable databases See PDBs (pluggable databases) point-in-time recovery See incomplete recovery point-of-failure recovery, 65 Prepare Replay Clients page, 444, 444 preprocessing captured workloads, 437–439, 437–440 preserving data with undo retention, 355–357 PRINT SCRIPT command, 139, 177 printing stored scripts, 177 privileges, 625, 636–637 administrative, 111–112 common user data access, 648–649 commonly granted, 639 local, 641–642 multitenant environment, 637–638 objects, 640–641 system, 639 problem details in Support Workbench, 404, 405–406, 409, 410 procedure privileges, 637 processes related to backup and recovery ARCn, 6–7 DBWn, LGWR, multithreaded, user, 7–8 profiles, user, 627, 630 Progress screen CDBs, 510–512, 511–512 PDBs, 522, 523 creating, 529, 530 dropping, 538, 540 unplugging, 534, 537 Proxy daemon, 327 PUBLIC role, 645 PURGE DBA_RECYCLEBIN command, 363 PURGE_OBJECT column, 362 PURGE RECYCLEBIN command, 363 708 PURGE TABLE command  –  recovery PURGE TABLE command, 363 PURGE TABLESPACE command, 363 purging Recycle Bin, 362–364 pwd command, 322 Q querying data Flashback Query, 368–373 resumable space, 457 question marks (?) in PFILE command, 226 QUIT command ADRCI, 274 RMAN, 139 Quoted identifiers, 629 R RAC (Real-Application Clusters) description, workload capture, 434 RCLI (RMAN command-line interface), 108 rdbms directory, 268 read consistency, 353–354 read-only mode in Transportable Database, 482 read-only tablespaces description, 12 restoring, 208–209 read-write tablespaces, 12 Real-Application Clusters (RAC) description, workload capture, 434 recordSpec command, 139 RECOVER command, 139, 192, 201, 320 RECOVER BLOCK command, 218 RECOVER COPY OF DATABASE command first execution, 312–313 second execution, 313 third execution, 313–315 RECOVER COPY OF DATABASE UNTIL TIME command, 155 RECOVER COPY OF DATABASE WITH TAG command, 312 RECOVER CORRUPTION LIST command, 416 RECOVER DATABASE command, 191 complete recovery, 70, 195, 311 overview, 65–67 SYSTEM and UNDO, 71 RECOVER DATABASE UNTIL command, 209 RECOVER DATABASE UNTIL CHANGE command, 80–81 RECOVER DATABASE UNTIL SEQUENCE command, 80–81 RECOVER DATABASE UNTIL TIME command, 80–81 RECOVER DATABASE USING BACKUP CONTROLFILE command, 90 RECOVER DATAFILE command non-SYSTEM and UNDO, 76 online files, 206 PDBs, 333 RECOVER TABLE command, 316 RECOVER TABLESPACE command, 66 non-SYSTEM and UNDO, 73, 76 online, 207 PDBs, 333 SYSTEM and UNDO, 71 TSPITR, 300–301 recovery, 6, 57–58, 283–285 See also backups ARCHIVELOG mode configuring, 26–29 data dictionary views, 33–35 entering, 29–33 control files, 14, 89–93 data files and tablespaces, 11–12 database startup and shutdown, 18–19, 22–24 exam essentials, 95 failed transactions, 353 full database See full database recovery incomplete See incomplete recovery instance, 20–22 instances vs databases, 18 loss of everything, 93–94 memory structures related to, 8–11 NOARCHIVELOG mode, 58–61 overview, password files, 93 pfiles, 15–16 processes ARCn, 6–7 DBWn, LGWR, recovery catalog  –  RESTORE DATAFILE command multithreaded, user, 7–8 Recycle Bin See Recycle Bin redo logs, 12–14, 14, 85–89 restricted-mode operations, 25 retention policy, 123–125, 123 review questions, 96–102 RMAN See RMAN tool summary, 94 tempfiles, 85 tools for, 3–4 TSPITR, 299–307 types, 85 recovery catalog See RMAN tool recovery sets, 301 recovery time objective (RTO), 21 recreating recovery catalogs, 179–181 Recycle Bin description, 351 disabling and enabling, 365–366 operation, 358–362 purging, 362–364 recovering tables and objects, 357–358 restoring objects from, 366–367 RECYCLEBIN parameter, 365 redo logs, 12–14, 14 backups, 156–157 clearing, 229–230 FRA, 116 LogMiner for, 612–615 problems, 33 recovery, 75, 85–89 stopped, 30 types, 86 redundancy retention policy, 122–123 REGISTER command, 139 REGISTER DATABASE command, 174 RELATED column, 361 RELEASE CHANNEL command, 139 releaseForMaint command, 139 remap command, 322 REMAP option, 317 REMAP_SCHEMA parameter, 475, 588 REMAP TABLE parameter, 317 REMAP TABLESPACE parameter, 317 remote PDBs for cloning, 526 removing stored scripts, 176 RENAME clause, 366 709 renaming database files, 65 PDBs, 612 restored tables, 366 reorganization of shrinking segments, 486 repairs Data Recovery Advisor, 336–339 Support Workbench, 409, 410 REPLACE option for path loads, 599 REPLACE SCRIPT command, 139, 176 replacing stored scripts, 176 replay See Database Replay REPORT command, 139, 240, 245–247 REPORT BACKUP command, 240 REPORT NEED BACKUP command, 241 REPORT OBSOLETE command, 241–242, 246 REPORT SCHEMA command, 204, 240, 242–243 REPORT UNRECOVERABLE DATABASE command, 243–244 reports commands, 240–244 exam essentials, 275–276 example, 245–247 review questions, 277–282 summary, 275 RESET DATABASE command, 139 RESET DATABASE TO INCARNATION command, 286 RESETLOGS command, 80–81, 285 RESETLOGS parameter, 91 RESOURCE_MANAGER_PLAN parameter, 577 resources See storage RESTORE command description, 139, 191 image copies, 217 tables, 319–320 RESTORE CONTROLFILE command, 223 RESTORE CONTROLFILE FROM AUTOBACKUP command, 219–221 RESTORE DATABASE command, 193, 195, 199 RESTORE DATABASE UNTIL command, 209, 211–212 RESTORE DATABASE VALIDATE command, 295 RESTORE DATAFILE command, 201, 206, 333 710 RESTORE FILE command  –  RMAN tool RESTORE FILE command, 318 RESTORE PLUGGABLE DATABASE command, 333 restore points Flashback Database, 388 listing, 249–250 RESTORE SPFILE FROM AUTOBACKUP command, 226–228 RESTORE TABLESPACE command, 201, 207, 333 RESTORE VALIDATE command, 214 restoring See also recovery ASM disk groups, 323 data files to different locations, 203 online, 206–207 incrementally updated backups, 315 to new hosts, 308–311 online, 207–209 read-only tablespaces, 208–209 Recycle Bin objects, 366–367 tags for, 216–217 RESTRICT option for CDB startup, 565 restricted-mode operations, 25 RESTRICTED SESSION parameter CDB startup, 565 database duplication, 294 restrictions in recovery, 317 Results page, 427, 429 resumable space, 456–457 alerts DBMS_RESUMABLE package, 464–465 Enterprise Manager, 461–463, 462–463 description, 457 enabling and disabling, 458–460 views, 460–461 RESUMABLE_TIMEOUT parameter, 457, 459 RESUME_TIME column, 461 RESYNC command, 139, 263 RESYNC CATALOG command, 178–179, 263 retention, undo, 355–357 RETENTION GUARANTEE clause, 356–357, 379 retention policies configuring, 127 types, 122–126, 123 RETENTION POLICY TO NONE clause, 127 RETENTION POLICY TO RECOVERY WINDOW OF DAYS clause, 127 RETENTION POLICY TO REDUNDANCY clause, 127 Review screen captured workloads, 438, 439 capturing workloads, 434, 436 replaying workloads, 445, 445 REVOKE command roles, 644 virtual private catalog, 182 revoking roles, 644, 647–648 rm command, 323 rmalias command, 323 RMAN tool, 105–107 architecture, 108–110 automatic diagnostic workflow, 239–240 LIST commands, 247–256 REPORT commands, 240–247 backups, 105–107 archival, 159 archived redo logs, 156–157 backup sets, 143, 144, 158 CDBs, 330–331 consistent and inconsistent, 141–145 duplexing, 133–134 FRA, 158–159 image copies, 143–144, 144 incremental, 151–154, 152–153 incrementally updated, 154–155 locations, 129–130 media, 109 multisection, 155 offline, 145 online, 145–151 PDBs, 331–332 spfile and control files, 157–158 tags, 133 CDBs, 330–331 command line, 113–114, 136–140 command prompt, 114–115 configuring, 115 channels, 129–132 compression, 127–128 control-file autobackups, 132 CONTROL_FILE_RECORD_KEEP_ TIME parameter, 122 encryption, 128 exercise, 134–135 FRA, 116–119 optimization, 132 persistent settings, 119–120 RMAN command-line interface (RCLI)  –  RVWR background process retention policies, 122–127, 123 snapshot control files, 133 unique settings, 120–121 documentation, 121 duplicating PDBs, 333–334 exam essentials, 160 features, 107–108 for managed backups and recovery, media, 109 operations administering, 260–263 monitoring, 257–260 tuning, 263–264 OSB interface, 325 PDBs, 331–332 preparing, 121 recovery, 189–190 advanced, 283–285 ARCHIVELOG See ARCHIVELOG mode ASM related backups, 320–323 basics, 191–192 block media, 218–219 CDBs and PDBs, 332–333 clearing redo logs, 229–230 complete disasters, 310–311 control files, 219–224 data warehouse best practices, 311–315 database duplication See database duplication exam essentials, 230–231, 340 image copies, 217–218 incomplete See incomplete recovery multitenant architecture See Multitenant architecture NOARCHIVELOG mode, 191–194 Oracle Secure Backup, 323–329 password files, 229 restoring to new hosts, 308–311 review questions, 232–238, 341–347 spfiles, 224–228 summary, 230, 339–340 switching between incarnations, 285–286, 287 tables and partitions, 315–320 recovery catalog, 109, 167–168 backing up, 179 connecting to, 173–174 711 creating, 171–172 database registering, 174 database unregistering, 174–175 dropping, 178 exam essentials, 183–184 exporting and importing, 178–179 introduction, 168–170 recreating, 179–181 review questions, 185–188 scripts, 175–177 summary, 183 synchronizing, 178 target databases, 173–174 upgrading, 178 user and schema objects, 170–172 views, 169 virtual private catalog, 181–183 review questions, 161–165 starting, 110–111 summary, 159–160 SYSBACKUP privilege, 111–112 RMAN command-line interface (RCLI), 108 RMAN virtual private catalog (RVPC), 181–183 Robot daemon, 327 ROLE_ROLE_PRIVS view, 643–644 roles, 625 altering and dropping, 646 authentication, 643–644 common, 645–648 creating, 645–646 dropping, 644 granting and revoking, 644, 647–648 local, 647–648 overview, 642–643 privileges, 637 users, 632–633 rolling back transactions, 353 root containers, 505 root default temporary tablespaces, 496 ROW_ID column, 378 ROWIDs and shrinking segments, 487 RTO (recovery time objective), 21 run blocks, 120, 210 RUN command, RMAN, 139 RVPC (RMAN virtual private catalog), 181–183 RVWR background process, 386 712 %s backup format specification  –  shrinking segments S %s backup format specification, 130 SBT channel configuration, 131 RMAN interface, 325 Schedule daemon, 326 Schedule screen captured workloads, 438, 439 capturing workloads, 434, 435 Schedule Implementation screen, 427, 429 schedules backups, 42 workload capturing, 434, 435, 438, 439 schemas recovery catalog creating, 170–172 recreating, 180 reports, 242–243 shrinking segments, 489, 490–491 SCN_TO_TIMESTAMP view, 79 SCNs See system change numbers (SCNs) Scope page for shrinking segments, 489, 490 scripts listing, 250 recovery catalog, 175–177 substitution variables, 177 SECTION SIZE clause, 155 security CDBs, 623–625 common users, 626–627 Data Guard, 609–612 exam essentials, 654 local users See local users OSB, 327 PDBs, 623–625 privileges See privileges review questions, 655–659 roles See roles summary, 653–654 seed containers, 505 Segment Space Advisor, 487–494, 490–493 segments, shrinking online, 487–494, 490–493 overview, 486–487 SELECT AS OF command, 368 Select Directory screen, 438, 438, 442, 442 SEND command, 139 SEQUENCE BETWEEN N AND O clause, 156 sequence numbers in redo logs, 13, 14 server-based backups, 107 server-managed backups, 107 server parameter files (spfiles) backups, 15–16, 157–158 description, 109 recovering, 15–16, 224–228, 310 Service daemon, 326 service requests in Support Workbench, 405, 409, 410 SESSION_ID column, 461 sessions CDB limits, 554, 558, 577–578 resumable space, 458–460 SESSIONS parameter, 554, 558, 577–578 SET command ADRCI, 274 description, 139 incomplete recovery, 210 SET BACKUP COPIES command, 134 SET CONTAINER privilege, 631, 637 SET CONTROLFILE AUTOBACKUP FORMAT command, 222, 227 SET DBID command, 227 SET DECRYPTION IDENTIFIED BY command, 128 SET ENCRYPTION IDENTIFIED BY command, 128 Set homepath command, 274 SET NEWNAME command, 203, 311 SET ROLE command, 644 SET_SESSION_TIMEOUT program, 464 SET_TIMEOUT program, 464 SGA (System Global Area), SHOW command, 140 Show alert command, 274 SHOW ALL command, 119 Show homes command, 274 SHOW INCIDENTS command, 413 SHOW PARAMETER LOG_ARCHIVE_ DEST_1 command, 33 SHOW RECYCLEBIN command, 358–362 SHOW RETENTION POLICY command, 120 SHRINK SPACE command, 488 shrinking segments online, 487–494, 490–493 overview, 486–487 shutdown  –  STARTUP MOUNT command shutdown, 18–19, 22–24, 87 SHUTDOWN command CDBs, 567 description, 140 PDBs, 573 working with, 22–24 SHUTDOWN ABORT command controversy, 24 inconsistency from, 142 working with, 568–570 SHUTDOWN IMMEDIATE command, 23, 567–568 SHUTDOWN NORMAL command, 567 SHUTDOWN TRANSACTIONAL command CDBs, 567–568 description, 23–24 PDBs, 573 shutting down CDBs, 567–570 databases, 22–24 PDBs, 572–573 simplicity in Flashback Table, 379 single quotes (') in SQL commands, 140 SKIP PLUGGABLE DATABASE parameter, 334 SKIP TABLESPACE parameter, 334 SMON_SCN_TIME view, 79 snapshot control files, 110, 133 source database for Transportable Database, 482 source hosts in database duplication, 287 SPACE column, 362 SPACE_ERROR_INFO program, 464 space pressure, 363 speed of Flashback Table, 379 spfiles (server parameter files) backups, 15–16, 157–158 description, 109 recovering, 15–16, 224–228, 310 SPOOL command, 140 SQL, calling from RMAN, 114–115 SQL command, 140 SQL*Loader tool audit operations, 603–606 control files, 597–598 description, 587 express mode, 600–603 features, 596 input data and data files, 598–599 overview, 595 parameters, 596 path loads, 599–600 SQL*PLUS CDBs connections, 554–558 creating, 512–517 shutting down, 567–570 starting up, 564–566 PDBs connections, 558–564 creating, 522–525 dropping, 542 opening, 570–572 unplugging, 541 SQL Test Case Builder, 266 SQL_TEXT column, 461 SQL Tuning Advisor, 417–418 manual, 418–423, 418–424 package and views, 423, 424 workload tuning, 424–430, 425–430 SQL Tuning Sets page, 418, 419, 422 sqlldr command, 600 standard OSB, 324 STANDARD setting for string size, 576 standby databases, 609–612 START_LOGMNR procedure, 614 START_SCN column, 378 START_TIME column, 461 START_TIMESTAMP column, 378 START WITH parameter, 180 startup CDBs, 564–566 databases, 18–19, 22–24 inactive online redo log group loss at, 87 RMAN, 110–111 STARTUP command, 204 CDBs, 564 databases, 22–23 description, 140 STARTUP FORCE command, 23, 227, 570 STARTUP FORCE NOMOUNT command, 223 STARTUP MOUNT command ARCHIVELOG mode, 29 backups, 145 control files, 90 databases, 23 NOARCHIVELOG mode, 193 recovery, 191 all data files, 66 complete, 195 713 714 STARTUP NOMOUNT command  –  tablespaces critical files, 201 DRA, 336 SYSTEM and UNDO files, 71 redo logs, 88–89 STARTUP NOMOUNT command, 23, 224 STARTUP RESTRICT command, 25, 565, 570 STARTUP UPGRADE command, 570 static data dictionary views, 9–10 STATUS column, 461 stopping databases, 22–24 storage, 456 CDBs and PDBs, 494–496 exam essentials, 497 metadata, 171 resumable space See resumable space review questions, 498–502 shrinking segments online, 487–494, 490–493 overview, 486–487 summary, 497 Transportable Database, 479–485 transportable tablespaces See transportable tablespaces stored scripts for recovery catalog, 176 stream record formats, 598–599 substitution variables, 177 Summary screen for PDBs creating, 522, 522, 529, 530 dropping, 538, 540 unplugging, 534, 536 supplemental logging in CDBs, 615 Support Workbench, 404–409, 405–410 SUSPEND_TIME column, 461 suspends for triggered events, 465 SWITCH command database recovery, 217 description, 140 TSPITR, 302 SWITCH TO COPY command, 143 switching between RMAN incarnations, 285–286, 287 synchronizing recovery catalog, 178 SYSAUX tablespace CDBs, 494 table and partition recovery, 316–317 transportability, 472 TSPITR, 301 SYSBACKUP privilege, 111–112 SYSDBA privilege, 111 SYSDG privilege, 111 SYSEXT tablespace, 316 SYSKM privilege, 111 SYSOPER privilege, 111 system change numbers (SCNs) database incarnations, 286, 287 database recovery, 65–66 incomplete recovery, 77–79, 78–79, 211 instance recovery, 20–21 retrieving, 379–380 System Global Area (SGA), system privileges, 637, 639 SYSTEM tablespace, CDBs, 494 critical file recovery, 202–203 table and partition recovery, 316–317 TSPITR, 301 T %t backup format specification, 130 %T backup format specification, 130 TABLE_NAME column, 378 TABLE_OWNER column, 378 tables privileges, 637 purging, 363–364 recovering from backups, 315–320 from Recycle Bin, 357–358 shrinking segments, 486 TABLESPACE parameter, 334 tablespace point-in-time recovery (TSPITR), 78, 299 after effects, 304–305 lost objects, 303–304 overview, 300–302 performing, 305–307 rules, 304 transport set checking, 302–303 tablespaces backups, 11–12 CDBs and PDBs, 495–496 purging, 363 recovery, 11–12 ARCHIVELOG mode, 200–201 critical, 200–203 noncritical, 204–209 point-in-time, 78 transportable See transportable tablespaces tags backup, 133 database restoration, 216–217 TAR (Technical Assistance Request), 406 target databases database duplication, 292 recovery catalog, 173–174 TARGET RMAN parameter, 114 tasks in Support Workbench, 404–409, 405–410 TDB See Transportable Database (TDB) Technical Assistance Request (TAR), 406 temporary files in recovery, 85, 204 temporary tablespaces backups, 39 CDBs and PDBs, 495–496 common users, 627 THREADED_EXECUTION parameter, time-based recovery, 79–80, 210–211 TIME BETWEEN T1 AND T2 clause, 156 time in SCNs, 20 TIMEOUT column, 461 TIMESTAMP_TO_SCN view, 79 tnsnames.ora file, 554, 558–559 tnsping tool, 559 to_date function, 300 TO RESTORE POINT clause, 293 TO SCN clause, 379 TO TIMESTAMP clause, 379 Trace directory, 401 trace files, 47–49, 272 trace formats in FDI, 266 TRACE parameter, 114 TRANSACTION parameter, 578 transactions change tracking, 383–385 undo operation, 352–353 transparent encryption mode, 128 transport set checking, 302–303 Transportable Database (TDB), 479 CONVERT DATABASE, 482–485 external files and directories, 481 moving files, 485 source databases in read-only mode, 482 verifying databases for migration, 482 transportable tablespace sets, 466 choosing, 470–471 generating, 472–474 importing, 474–475 transporting, 302, 474 tags – unregistering databases 715 transportable tablespaces, 466 compatibility and endian format, 467–470 Enterprise Manager, 475–479, 476–479 manual process, 466–475 requirements, 467–468 transporting tablespace sets, 302, 474 triggers enabling, 381 suspending, 465 TRUNCATE option, 599 TS_NAME column, 361 TS_PITR_CHECK view, 302 TS_PITR_OBJECTS_TO_BE_DROPPED view, 303 TSPITR See tablespace point-in-time recovery (TSPITR) tuning workload, 424–430, 425–430 TYPE column, 361 type privileges, 637 U %u backup format specification, 130 %U backup format specification, 129–130 uncommitted state for undo data, 355 UNDO_CHANGE# column, 378 UNDO_MANAGEMENT parameter, 354–355 undo operations, 352 Automatic Undo Management, 352 preserving data, 355–357 working with, 354 process, 352–354 undo records, 353 UNDO_RETENTION parameter, 356 UNDO_SQL column, 378 UNDO tablespace recovering, 72, 316 TSPITR, 301 unexpired state for undo data, 355 UNIFIED_AUDIT_TRAIL view, 605–606 UNKEEP command, 125 UNPLUG command, 541 Unplug Pluggable Databases page, 534, 536 UNRECOVER_TABLE, 244 unrecoverable recovery catalogs, 179–181 UNREGISTER command, 174–175 UNREGISTER DATABASE command, 140 unregistering databases, 174–175 716 UNTIL clause  –  V$RMAN_ENCRYPTION_ALGORITHMS view UNTIL clause, 293 UNTIL TIME clause archival backups, 159 incomplete recovery, 79–80, 209, 217 incremental backups, 314 incrementally updated backups, 155 NLS_DATE_FORMAT, 300 retention policy, 126 untilClause command, 140 UPGRADE CATALOG command, 140, 178 upgrading recovery catalog, 178 uploading diagnostic data, 406–409, 407–410 USER_* views, 9–10 user accounts CDBs, 553–554 common See common users credentials, 538 Database Vault management of, 606 local See local users OSB, 327 privileges See privileges unlocking, 510 USER_DATA tablespace, 471 USER_DUMP_DEST parameter, 401 user errors, 3, 350 USER_ID column, 461 user-managed backups See backups user-managed recoveries See recovery user objects in recovery catalog, 170–172 user processes, 7–8 USER_RECYCLEBIN view, 360 USER_RESUMABLE view, 460 USER_ROLES view, 644 USER_USERS view, 630, 632 usernames for local users, 629 USERS tablespace, 302–303 USING parameter for substitution variables, 177 utilities, 585–587 audit operations, 603–606 Data Guard, 609–612 Data Pump, 587–595 Database Vault, 606–609 exam essentials, 616–617 LogMiner, 612–615 review questions, 618–622 SQL*Loader, 595–603 summary, 616 V VALIDATE command, 140 V$ARCHIVE view, 34 V$ARCHIVE_DEST view, 34 V$ARCHIVE_DEST_STATUS view, 34 V$ARCHIVE_PROCESSES view, 34 V$ARCHIVED_LOG view description, 11, 34 incomplete recovery, 78 redo logs, 75 V$BLOCK_CHANGE_TRACKING view, 152 V$CONTAINERS view, 611 V$DATABASE view, control file backups, 221 description, 10–11 Flashback Database, 387 Flashback Table, 379 incomplete recovery, 79 redo logs, 613 V$DATABASE_BLOCK_CORRUPTION view, 219, 414, 416 V$DATAFILE view, 11, 64, 73–74 V$DB_RECOVERY_FILE_DEST view, 118 V$DB_TRANSPORTABLE_PLATFORM view, 480, 482 V$DIAG_INFO view, 268 V$FLASHBACK_DATABASE_LOG view, 387, 389 V$FLASHBACK_DATABASE_STAT view, 387–388 V$INSTANCE view, 11 V$INSTANCE_RECOVERY view, 22 V$LOG view description, 11, 34 log sequence numbers, 211 V$LOG_HISTORY view description, 11, 34 log sequence numbers, 211 redo logs, 75 V$LOGFILE view, 11, 34 V$LOGMNR_ views, 614 V$LOGMNR_CONTENTS view, 614–615 V$MTTR_TARGET_ADVICE view, 22 V$PWFILE_USERS view, 229 V$RECOVER_FILE view, 64, 72–75 V$RMAN_ENCRYPTION_ALGORITHMS view, 128 V$SESSION view description, 10 troubleshooting with, 258–260 users, 633 V$SESSION_LONGOPS view, 257–258 V$SESSION_WAIT view, 460 V$SESSION_WAIT_HISTORY view, 258–260 V$TABLESPACE views, 74 variable record format data files, 598 variables, substitution, 177 VERSIONS BETWEEN clause, 373 versions in Flashback Version Query, 373–376 View Manifest screen, 406, 408 View Workload Capture screen, 435, 436 View Workload Replay screen, 445–447, 446–447 views ARCHIVELOG mode, 33–35 data dictionary, 9–11 LogMiner, 614–615 privileges, 637 recovery catalog, 169–170 resumable space allocation, 460–461 SQL Tuning Advisor, 423, 424 virtual private catalog, 181–183 V$SESSION view  –  zlib utility W Web server daemon, 327 WHEN parameter for control files, 598 white-space compression, 127 whole database backups, 146 WITH ADMIN OPTION, 628 Workload Capture History screen, 439, 440 workloads capturing, 431–437, 432–436 filters, 431 preprocessing, 437–439, 437–440 replaying, 440–446, 441–446 tuning, 424–430, 425–430 X XID column, 378 Z zlib utility, 127 717 Free Online Study Tools Register on Sybex.com to gain access to a complete set of study tools to help you prepare for your OCP exam Comprehensive Study Tool Package Includes: ■■ ■■ ■■ ■■ ■■ Assessment Test to help you focus your study to specific objectives Chapter Review Questions for each chapter of the book Two Full-Length Practice Exams to test your knowledge of the material Electronic Flashcards to reinforce your learning and give you that last-minute test prep before the exam Searchable Glossary gives you instant access to the key terms you’ll need to know for the exam Go to www.sybex.com/go/ocp12csg to register and gain access to this comprehensive study tool package

Ngày đăng: 13/04/2017, 13:28

Từ khóa liên quan

Mục lục

  • Contents

  • Introduction

    • Chapter 1: Performing Oracle User-Managed Backups

      • Oracle Database Data Protection Options

        • What Kind of Failures Can Happen to a Database

        • Physical and Logical Backups

        • Tools for Backup and Recovery

        • Oracle MAA Recommendations

        • Understanding the Oracle Database as It Relates to Backup and Recovery

          • Oracle Processes Related to Backup and Recovery

          • The Oracle Data Dictionary

          • Oracle Data Files and Tablespaces

          • Redo Logs

          • Control File

          • Parameter Files

          • NOARCHIVELOG and ARCHIVELOG Modes

          • The Oracle Instance and the Oracle Database

          • Configuring the Database for Backup and Recovery

            • Configuring for ARCHIVELOG Mode

            • Putting the Database in ARCHIVELOG Mode

            • Using ARCHIVELOG Mode Data Dictionary Views

            • Performing Oracle Offline Backups

            • Performing Oracle Online Backups

              • The Mechanics of Online Backups

              • Backing Up the Control File

                • Creating a Backup Control File

                • Creating a Trace File with the Create CONTROLFILE Command in It

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan