Oracle RMAN 11g Backup and Recovery- P14

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:39

lượt xem

Oracle RMAN 11g Backup and Recovery- P14

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Oracle RMAN 11g Backup and Recovery- P14: Oracle, yet another edition of our RMAN backup and recovery book has hit the shelves! Oracle Database 11g has proven to be quite the release to be sure. RMAN has new functionality and whizbang new features that improve an already awesome product. RMAN has certainly evolved over the years, as anyone who started working with it in Oracle version 8 can attest to.

Chủ đề:

Nội dung Text: Oracle RMAN 11g Backup and Recovery- P14

  1. 618 Part V: Appendixes recordSpec This subclause defines which objects that commands such as change, crosscheck, delete, and list will work on. Syntax Diagram , ’ filename ’ ARCHIVELOG , primaryKey , BACKUPSET primaryKey , ’ media_handle ’ , BACKUPPIECE primaryKey PROXY ’ ’ TAG tag_name , ’ filename ’ , primaryKey CONTROLFILECOPY , DATAFILECOPY ’ ’ NODUPLICATES TAG tag_name ALL NODUPLICATES DATAFILECOPY LIKE ’ string_pattern ’ tempfileSpec This subclause is used to define tempfiles by name or file number that should be operated on by the parent command. Syntax Diagram ’ filename ’ integer Please purchase PDF Split-Merge on to remove this watermark.
  2. Appendix A: RMAN Syntax Reference Guide 619 toDestSpec This subclause is used to specify a directory or an Automatic Storage Management disk group for disk backups for the RMAN operation that the subclause is used in. Syntax Diagram ’ toDest_string ’ untilClause This subclause defines a limit based on time, SCN, restore point, or log sequence number that is referenced by the parent RMAN command. Syntax Diagram UNTIL SCN integer THREAD integer UNTIL SEQUENCE integer UNTIL TIME ’ date_string ’ Please purchase PDF Split-Merge on to remove this watermark.
  3. This page intentionally left blank Please purchase PDF Split-Merge on to remove this watermark.
  4. APPENDIX B RMAN Scripting Examples Please purchase PDF Split-Merge on to remove this watermark.
  5. 622 Part V: Appendixes e have gotten a number of requests for scripts related to RMAN. The nice thing about RMAN is that scripting it is a pretty straightforward process. In this chapter, we provide you with some basic scripts for both Windows and Linux to get you started. These scripts assume that you are using the Oracle flash recovery area (FRA), which will manage disk space and backup retention for you. If you are not using the FRA, perhaps you might want to customize these scripts for your own needs. We will leave that to your ingenuity and skill! RMAN Scripts for Windows These scripts were written and tested using Windows XP. First, we give you an example batch script that will call RMAN for a backup of the database and the archived redo logs. We will then show you a method of scheduling these scripts from the operating system. Note that this is just one method of scheduling automated backups. You might also choose to use Oracle Enterprise Manager (OEM) to schedule and manage your backups. Using Oracle Enterprise Manager is covered in Chapter 13, so you can reference that chapter for information on scheduling backups in OEM. Creating a Windows Script to Schedule Backups This is a pretty basic script; you might want to augment it for incremental backups, backup validation, or other operations. Note that the script will return an error message if the backup fails. To create this script, you might use Notepad, or some other text editor, and might call this script something like backup.bat. rem ******************************************************************** rem * Script Name: backup.bat rem * Script Purpose: This script will call RMAN and execute the command rem * file specified on the command line. rem * Usage backup.bat @echo off rem rem RMAN BACKUP SCRIPT rem For WIN XP rem echo %1 set oracle sid %1 if "%2" "backup" rman target / cmdfile c:\oracle\scripts\backup.scr if not ERRORLEVEL 0 echo "WARNING - FAILURE OCCURRED" if "%2" "arch" rman target / cmdfile c:\oracle\scripts\arch.scr if not ERRORLEVEL 0 echo "WARNING - FAILURE OCCURRED" Note that this script calls two command files, backup.scr and arch.scr, which in this case are located in the c:\oracle\scripts directory. Here is the backup.scr script: Backup as compressed backupset database plus archivelog delete input; This is the arch.scr script: Backup as compressed backupset archivelog all delete input; Please purchase PDF Split-Merge on to remove this watermark.
  6. Appendix B: RMAN Scripting Examples 623 Again, each of these scripts would be created using a text editor and placed in the c:\oracle\ scripts directory. If you put them somewhere else, you will need to edit the backup.bat script to point to the correct location of these scripts. Scheduling the Backup Now, we want to schedule the backup. We will use the Windows schtasks utility to perform this operation. In our experience, schtasks is a rarely used but powerful scheduling utility. In this example, we are scheduling a daily database backup using the backup.bat file. We also have an example of scheduling the archived redo log backup and an example of how to remove a scheduled task: schtasks /create /tn "database backup" /sc weekly /d SUN /st 14:50:00 /tr "c:\bc\rman\backup.bat rob10r2 backup>\>c:\bc\rman\backup.output" rem schtasks /delete /tn "database backup" schtasks /create /tn "archivelog backup" /sc daily /st 14:50:00 /tr "c:\bc\rman\backup.bat rob10r2 arch>\>c:\bc\rman\backup.output" You have a number of scheduling options when using the schtasks scheduler. The schtasks scheduler will request the login ID of the user that will be running the job. RMAN Scripts for Unix These scripts were written and tested on Red Hat Linux Version 5. In this section, we have a backup script (backup.ksh) and the related command-line files that will be used to execute the actual backup. You can use Cron or at to schedule this script in Unix. First, here is our example shell script for our Unix backup: #/bin/ksh # Script name: backup.ksh # Usage: backup.ksh # Note: We assume the oracle environment is already setup except for # ORACLE HOME. If not, you will need to setup your environment correctly. set ORACLE SID $1 if [ "$2" "backup" ]; then rman target / cmdfile /home/oracle/scripts/backup.scr fi if [ "$2" "arch" ]; then rman target / cmdfile /home/oracle/scripts/arch.scr fi The backup.scr script is the same as you saw earlier: Backup as compressed backupset database plus archivelog delete input; As is the arch.scr script: Backup as compressed backupset archivelog all delete input; Please purchase PDF Split-Merge on to remove this watermark.
  7. This page intentionally left blank Please purchase PDF Split-Merge on to remove this watermark.
  8. APPENDIX C Setting Up an RMAN Test Environment Please purchase PDF Split-Merge on to remove this watermark.
  9. 626 Part V: Appendixes s the complexity of production enterprise environments grows with each passing A year, we DBAs are finding the same complexity creeping into our test environments. For example, in Oracle9i RMAN Backup & Recovery, the test environment was seemingly complex for us: a Windows laptop for minor tweaks and screen shots, another Windows server for more robust testing, and a Sun Blade 150 for multi-OS interaction and Unix commands. Among these three machines, we were able to do all technical reviews (combined with years of actual experience in the workplace, of course). For the 10g RMAN book, the test environment included two Linux boxes with a shared FireWire disk drive (running RAC, of course), Matthew’s trusty Windows laptop, that old Sun Blade, and a stand-alone Linux box. And Matthew still went hunting with his colleagues looking for other RAC clusters, tape storage jukeboxes, and Oracle Enterprise Manager repositories. That being said, things have taken an interesting turn since the last book. We authors had to travel significantly during the production of this book, so the needs changed dramatically, from a tactical standpoint. Because of the up and down, thrashed and trashed nature of B&R testing, testing from a remote location can be difficult. And you can’t connect to your datacenter from a plane yet. Yet. In addition, this was the first time that we wrote against Beta code (long story), so there are plenty of hiccups that simply prevented traditional solutions. So, what did our test environment look like this time? One late-model Apple MacBook Pro, running VMWare Fusion, and an external hard drive. That’s it. (Okay, Matthew still relied on those RAC clusters in the datacenter.) He installed RHEL 5, copied the VMWare slice, and had a multiserver environment running from his laptop— love modern times. Now, Matthew had gotta a completely mobile lab environment, with plenty of hard-drive space and a built-in way to trash everything and start over using his virtual snapshots. The only limit was that his late-model Mac had 3GB of memory, so he had to pick and choose environments carefully when running them simultaneously. With new models running up to 8GB, Matthew’s looking forward to having that problem solved soon as well. Granted, as discussed later in this appendix, this does not, in any way, come close to looking like a true production environment. Therefore, he can’t do any performance benchmarking on his laptop, or expect that he has ensured that scripts are free of bugs in production. But, with the exact OS running (RHEL) and exact database version, he has gone a long way toward assurance that he knows what he’s doing and how it will behave. As stated back in Oracle9i RMAN Backup & Recovery, test environments can be tricky to describe or to provide advice about. Every shop has its own concept of what testing is required, and at what level, for application design, quality assurance, version control, and so forth. And with RMAN playing a more integral role in a wider array of DBA activities, it’s increasingly difficult to separate an RMAN test environment from other test environments. But, you are looking at this book now, and we have opinions on testing backup strategies. As we like to say, everyone has a backup strategy. Few have a recovery strategy. Testing backups is only a fraction of the work. If you do not test your recovery strategies, then you don’t have backups, no matter how many files you’ve written to how many thousands of dollars’ worth of equipment. A test environment for backup and recovery is different from other testing environments. First of all, you have to be able to remove datafiles, or even the entire database, on a whim, without having to clear it with other users. In other words, you need your own database. Or two. If you begin testing RMAN functionality on a shared database, pretty soon you’ll either start getting angry phone calls from other users, or find yourself locked out of the machine by the SA. Please purchase PDF Split-Merge on to remove this watermark.
  10. Appendix C: Setting Up an RMAN Test Environment 627 A backup and recovery test environment is simply too volatile to share. Think about it from the other end: you’re busy testing a backup yourself, when suddenly the backup aborts because someone started removing datafiles in order to test their own restore and recovery. On the other hand, you need to test your strategies in an environment that most closely matches that of your production databases. Therefore, you can’t always run in isolation, because you might need to tune your backup on a large, production-grade server that has the same kind of load as production. What we suggest, then, is that you approach RMAN backup and recovery testing as a two- tiered investigation: First, get comfortable with functionality and behavior in the isolation of a small test server. Second, take the lessons you’ve learned, and schedule time to test on a larger, production-grade database server. That way, you can schedule time on a test box for a backup/ recovery test outage, and avoid spending that valuable time trying to learn lessons that you could have figured out on your workstation. So, what does this approach look like more specifically? The answer is provided in this appendix. The Test Box The first-level test machine for RMAN functionality doesn’t need to be a supercomputer. In fact, you should think of the first level of testing as just a rehearsal— you’re reading through your lines, getting the placement right, and talking through the steps with the other actors and the director. Match Your Production Environment If possible, your RMAN testing should take place on the same operating system that you run in production. This is a rather humorous thing to say, we know: who has a single OS in their environment anymore? Anyway, if you will be backing up only Solaris servers, it makes sense to invest a little money in a Sun workstation. That way, you can begin production environment matching as soon as possible. Go Cheap It’s not that critical to have your first wave of testing take place on the same OS as your production environment. RMAN acts the same on all platforms, and the exercises in this book work on all platforms. So, if you’re in the market for an RMAN test box, we have only two words: go cheap. Buy a commodity-priced computer that runs Windows or Linux. I’ve grown quite fond of my cut-rate Linux cluster that Scott Jesse outlined in the Oracle Press book Oracle Database 10g High Availability with RAC, Flashback, and Data Guard (2004). It is a two-node RAC tester for under $1,500, bought refurbished from Dell’s Outlet. As far as what to look for in a cheap test environment, we provide the following advice: ■ Processor speed Don’t worry about processor speed at the RMAN proof-of-concept level. RMAN simply does not rely on CPUs that heavily. As you move into heavy parallelization in production, CPU speeds might grow in testing importance. Even if you monitor for performance at this level, the data is meaningless when compared with your production environment. Instead, spend money on other resources, mainly disk space and memory. Please purchase PDF Split-Merge on to remove this watermark.
  11. 628 Part V: Appendixes ■ Memory You need enough memory to run three Oracle instances simultaneously, along with your media management software. If you will be testing with OEM or some other management software package, factor that in as well. This means that you need 2GB minimum. Don’t cut corners on memory, or you will get sucked down into time- consuming swap rat holes from which there is no escape. ■ Disk space Disks are cheap, and you don’t need some SCSI disk or anything, just space. Speed, again, is not important at this level. A 200GB hard drive should be sufficient. You’re doing concept testing at this level, so you can limit the size of databases to keep things under control. But keep in mind that you’re going to have more than one database, and you will also be backing up to disk (most likely), so you need space for RMAN backup pieces, as well. So load up on disk space if you can. If you decide to do a RAC tester, you need an external SCSI or FireWire drive in addition to whatever you load internally into your box. Again, consult Oracle Database 10g High Availability with RAC, Flashback, and Data Guard for a blow-by-blow description of RAC home clusters. The Oracle Configuration After you get your test box up and running, you need to think about your Oracle installation and configuration. This step depends on what you need to test: Will you be backing up multiple versions of Oracle? Will you be using OEM? Multiple Homes If you will be testing multiple versions of Oracle, be sure to install them in chronological order from oldest to newest; for example, install version 9.2.0 before 10.1.0, and 10.1.0 before 10.2.0. Before you get very far, patch Oracle to the latest patch level. There are always RMAN bugs getting fixed, so it makes sense to be at the most recent patch level. Creating Databases Obviously, you need at least one database created in each ORACLE_HOME that you have installed. These databases may be default databases created during Oracle installation, but an even better scenario would be to use databases that are configured somewhat like production databases. From a size perspective, that may not be possible, but you can scale datafile sizes down while keeping the same number of datafiles and tablespaces. In addition, try scaling down the memory utilization of these test boxes to be as low as possible. You won’t actually be doing that much processing, so you don’t need a lot of buffer cache available. The smaller you keep the System Global Area (SGA), the better off your little test box will be. You also need a recovery catalog database that is separate from the target databases that you are using for testing. We always recommend that your recovery catalog database be the most recent version, so put this in a 11.2 home. In a pinch, this can also be used as a target database, but try to keep your recovery catalog database out of the mix of databases that you blow away and rebuild. It just makes life easier. If at all possible, put your recovery catalog database on a different server. Put it on a Windows workstation or an old Linux box. Keep it out of the crash- and-burn destruction path. Please purchase PDF Split-Merge on to remove this watermark.
  12. Appendix C: Setting Up an RMAN Test Environment 629 Using Oracle ASM If you plan to test Oracle’s volume manager, Automatic Storage Management (ASM), you have to make preparations when you first configure your RMAN test box. In a production environment, you would simply add full, raw disks to an ASM disk group. In a test environment, if you want to test multiple ASM disk groups, you can simply use logical partitions on a single disk. But this means you have to think ahead and create some unused, raw partitions on your disks before you get too far into your OS setup. Oracle Enterprise Manager If you plan to use OEM, make sure there is enough memory to do so. As you learned in Chapter 13, there are two flavors of OEM you can choose from: Database Control and Grid Control. From a testing perspective, it might make sense to go with Database Control to save on resources and administration headaches. However, make the choice that matches your production environment: if you deploy Grid Control management in production, use Grid Control to manage RMAN backups in the test environment. That being said, try to avoid using production Grid Control for RMAN test environments. The databases will be down, up, down, lost, trashed, crashed, and lost. This means lots of alerts will be sent to the Oracle Management Service (OMS) and, consequently, e-mailed out to people. Avoid bot spam! If you have not already deployed a test Grid Control environment for your enterprise, get one set up for your RMAN backups, and then offer it to others for testing purposes. For Database Control, expect a memory hit of 150 to 200MB per instance. Also, Database Control makes heavy use of CPUs and uses up database space. Database Control generates about 200MB of archive logs per day just by itself, with an idle database. For Grid Control, you need a 2GB system all by itself for the repository database and OMS. Factor it in as a separate system. On the RMAN test system itself, the agent will use only about 60MB of memory and enough CPU to run its Perl scripts. OEM, either Database or Grid Control, is highly dependent on a stable and predictable networking sublayer, which means you cannot constantly change the hostname or IP address. Sorry. It’s just easier that way. If you have to, create your own subnet and manually assign dummy IP addresses in the hosts files. The easiest checks you can implement to ensure everything will operate correctly are the nslookup command on the hostname and a reverse lookup on the IP address. Media Management Considerations If possible, you should install a version of the media management client that you will be using in production. Then, install the Oracle Plug-In and do the backups to tape the same as you would in production. This gives you the best opportunity to anticipate what to expect when you implement your strategy in your enterprise. If you can’t get access to the media management product that is used for your enterprise, there is little alternative left. The best option is to try Oracle Secure Backup, as outlined in Chapter 5 of this book. If you simply need to test tape channel allocations, or the process of staging the flash recovery area to tape, you still have access to the Oracle SBT API, which enables you to write tape”“ backups to a disk location. This is described in the RMAN Workshop Test Tape Channels with “ the Oracle Default SBT Interface”in Chapter 4. Please purchase PDF Split-Merge on to remove this watermark.
  13. 630 Part V: Appendixes The RMAN Configuration Now that you have your system set up with Oracle installed and databases built, we have a few hints on the testing process: ■ Have a cold backup that remains untouched. Before you do any RMAN testing, shut down your database, take a cold OS copy backup, and place it in a folder that doesn’t get touched. This is your last line of defense if you completely mess everything up during your RMAN testing. ■ Switch your redo logs a lot. One of the biggest mistakes that happens with RMAN testing is that the timeframe between the backup and restore is unrealistically short. Confusion sets in because there is no space between the completion time of the backup and the until time”of the restore operation. So, after any backup, make sure you switch the log “ file three or four times, just to put a little distance”between operations. “ ■ Set the NLS_DATE_FORMAT environment variable. This is good advice for RMAN in general, but particularly in a test situation, where the timeframe between a backup and a restore will be unrealistically short, and you will want to know the timeframe of a backup to the second. So, before starting RMAN, be sure to run the following: export NLS DATE FORMAT 'mon-dd-yyyy hh24:mi:ss' Then, when you start RMAN and issue a list backup command, the time will always show details to the minute and second. ■ Leave your catalog database alone. You will be tempted to use the database that houses your catalog as a target and to perform some tests with it. That is fine— that’s why it’s called a test environment. But you can seriously undermine your testing if you foul up your catalog. Do yourself a favor and leave the catalog database alone. And export your catalog schema with a user-level export before any new test session begins. ■ Keep up with catalog maintenance. This may be your test environment, but you will be creating a lot of backups over time, and you have a limited amount of space on your little test box. Take the opportunity to test using retention policies to get rid of old backups. ■ Remove clones as soon as possible. Attack of the clones! If you use the duplicate command, you can end up with numerous different instances running and taking up precious memory and disk space. Hey, it’s a clone, and you’re in a test environment— get rid of it as soon as you make it. ■ Leave a clone file system in place. You don’t need to go through the steps of building the file system and the init.ora file for your duplicate database every time you want to test the duplicate or duplicate for standby command. Leave the file system and supporting files in place, and use the same DB_NAME and SID. On Windows, be sure to leave the Oracleservice in place in the Services control panel. Please purchase PDF Split-Merge on to remove this watermark.
  14. Appendix C: Setting Up an RMAN Test Environment 631 ■ Don’t get attached to your test environment. Sometimes you need to just blow everything away and start over from scratch, particularly if you don’t have good maintenance habits. Eventually, your database will get to the point that it has had tablespaces dropped; has had re-created, dropped, and forgotten files placed in the wrong directory; has had archive logs stored all over the place—basically it’s a rambling mess. Don’t worry. That’s why they call it testing. Don’t get too wrapped up in the environment you have; just whack everything and start over from the cold backup you took prior to testing. You’ll surely find some of your own valuable lessons after you’ve done a bit of testing. After you go through the conceptual learning, take the scripts you’ve built and the knowledge you’ve gained, and schedule some time on a production-grade system to make sure that everything is going to scale up to your enterprise. You’ll be glad you took the time to learn it before you went live. Please purchase PDF Split-Merge on to remove this watermark.
  15. This page intentionally left blank Please purchase PDF Split-Merge on to remove this watermark.
  16. Index A performing RMAN backup using alter database create standby TDPO, 199–203 controlfile command, 252 ACO (Advanced Compression recovering control file from alter database datafile end backup Option), 116 autobackup not using command, 267 active online redo log FRA, 273 alter database datafile offline loss of, 296 recovering SPFILE from specific command, 292 overview of, 17–18 backup set, 272 alter database disable block change recovering from loss of, 294 storing S3 as default SBT tracking, 256 Active Session History (ASH), channel, 149 alter database drop logfile command, V$ACTIVE_SESSION_HISTORY syntax details, 564–565 70, 295 view, 457 testing tape channels, 107 alter database enable block change admin class, OSB rights, 122 troubleshooting TSM tracking, 255 admin user, OSB installation, 120, backups, 206 alter database open command 125–126 allocate channel for maintenance ARCHIVELOG mode full Administration Center, TSM, 194 command, 565 recovery, 29 administrative data, OSB, 119–120 allocOperandList command, loss of current online redo log administrative domain, OSB, 612–613 group, 296 117–118 alter database activate standby offline RMAN backups using Advanced Compression Option database command, 493 default settings, 230–231 (ACO), 116 alter database add logfile command, point-of-failure database advise failure command, Data 70, 294–295 recoveries, 290 Recovery Advisor, 297, alter database add standby logfile alter database open resetlogs 299–300, 564 command, 70 command alert log messages alter database begin backup ARCHIVELOG point-in-time defined, 6 command, 28 recoveries, 30 managing space in FRA, alter database checkpoint completing repair failure 64, 67 command, 296 command with, 297 in new Fault Diagnosability alter database clear logfile recovery from complete Infrastructure, 74 command, 296 database loss online redo logs, 17 alter database clear logfile group (NOARCHIVELOG) with restore command failover, 271 command, 295–296 recovery catalog, 536 split mirror backups of alter database clear unarchived restoring database in datafiles, 522 logfile command, 296 NOARCHIVELOG mode, 282 allocate channel command, 85 alter database command alter database rename file command, maxpiecesize parameter, 240 managing online redo logs, 70, 256 offline RMAN backups without 19–20 alter system archive log current configured defaults, 233–235 referencing datafiles, 293 command, 247–248, 363 passing environment syntax details, 566 variable, 107 Please purchase PDF Split-Merge on to remove this watermark.
  17. 634 Oracle RMAN 11g: Backup and Recovery alter system checkpoint command, backups, modifying with change physical backups in, 27–28 294–296 command, 409 point-in-time recoveries in, 30–31 alter system command, 68 backups up with encryption, 96 recovering control file, 278 alter system set command, 56 creating image copies of, 255 restore and recovery of database alter system switch logfile command, crosschecking backups, 402 in, 29, 287–291 27, 62 as database physical RMAN requiring, 46 alter tablespace begin backup component, 15 tablespace and datafile recovery command, 27–28 defined, 7–8 in, 29–30 alter tablespace offline command, 29 full database recovery in taking datafile offline in, 14 alter tablespace online command, 29 ARCHIVELOG mode, 29 ARCHIVELOG mode, configuring alter tablespace tablespace_name listing backups of, 432–433 database in, 62–73 offline for recover command, 364 listing copies of, 436–437 destination directories, 62–64 alter tablespace users offline log sequence-based recovery FRA, 64–67 command, 292 of, 349 FRA and ASM, 70 alter tablespace users online log sequence number of, 9, 19 FRA benefits, 71 command, 292 online backups, 250–251 FRA views, 67–69 Amazon Web Services. See AWS recovery catalog views for, if you created database with (Amazon Web Services) 217, 219 ODBCA, 71–72 ANS errors, TSM, 205–206 recovery from complete database other FRA features, 70 ANU errors, TSM, 205–206 loss with recovery catalog, 541 overview of, 62 Apache web server backup daemon, recovery, troubleshooting, switching between OSB, 119 375–376 NOARCHIVELOG mode and, Application Backup Schedule, restoring from backup using 71–73 163–164, 167 RAC, 509 archivelog parameter, copy ARCH processes, 12–13, 18–20 restoring records to control file, command, 255 architectures 277–278 archivelogRecordSpecifier subclause, backup challenges of RAC, restoring specific, 350 613–614 502–503 restoring with recover archiving tables, Flashback Data Database Control, 313–314 command, 281 Archive, 397–398 duplication, 468–470 restoring with restore archlogRange parameter syntax Grid Control, 312–313 command, 280 diagram, 614 NetBackup, 159 RMAN duplication process, 472 as backupset parameter, backup Oracle and Data Protector sync and split technology for, command, 237 integration, 175 522–523 as compressed backupset Oracle backup and recovery. archivelog destination to parameter, set parameter, 237 See backup and recovery command, 350 ASH (Active Session History), architecture ARCHIVELOG mode V$ACTIVE_SESSION_HISTORY RMAN. See RMAN architecture archived redo logs in, 7–8 view, 457 archival backups, 240–241 case studies in recovery, 537– ASM (Automatic Storage Management) archive copy group, TSM, 192 542, 550–551 archive log backups in RAC, archive log deletion policies committing data change, 25 506–507 configuring RMAN default creating image copy of archived FRA and, 56, 70 settings, 97 redo log, 255 overview of, 16 OEM limitations, 321 database recoveries in, 287–291 restore operations in RAC, overview of, 242–243 database recovery after restoring 507–508 archived redo logs control file, 277 sharing files across multiple backup sets, modifying retention disk-only Oracle-suggested computers, 502 policy for, 240 backups in, 328 storing block change tracking file backups from standby database, full recovery in, 29 in, 256 499–500 incremental backups in, 255 testing Oracle installation/ backups in ARCHIVELOG mode, NOARCHIVELOG mode vs., configuration, 629 27–28 20–21 asynchronous backup I/O, 447, backups in RAC, 504–507 online backups in, 247 457–459 lease purchase PDF Split-Merge on to remove this watermark.
  18. Index 635 at sign (@) command, 563 B checking database for errors, 243 atClause parameter syntax diagram, 596 compression, 236–237 attributes, NetBackup policy, 161–163 BACKGROUND_DUMP_DEST creating restore points, 238 auditing tables, Flashback Data database parameter, alert log forcing backup of read-only Archive, 397–398 directory, 7 datafiles, 244 autobackup command backup and recovery architecture limiting backup impacts, configure controlfile from, 91 ARCHIVELOG vs. 238–239 restore control file from, 273–276 NOARCHIVELOG modes, limiting size of backup set, restore spfile from, 269–271 20–21 239–240 autoBackupOptList parameter syntax controlling database software, making copies of backups, 245 diagram, restore command, 598 10–11 modifying retention policy for autolocate feature, RMAN, 505 database physical components, backup set, 240–242 Automatic Backup Schedule, 14–16 multisection backups, 236 NetBackup, 164–165 high availability, 5 offline RMAN backups without automatic checkpoint tuning, 323 logical backup and recovery, 26 using configured defaults, 235 Automatic Diagnostic Destination Oracle database, 14–16 overriding configure exclude directory, 461 Oracle logical structures, 21 command, 243 Automatic Storage Management. Oracle memory and RMAN, with set command, 246–247 See ASM (Automatic Storage 13–14 skipping offline, inaccessible or Management) Oracle processes, 11–12 read-only datafiles, 243–244 auxiliary channel configuration, Oracle redo logs, 16–20 using standby database, 498–499 RMAN duplication, 469–470 Oracle terminology, 7–9 validate parameter, 369 auxiliary command, 79, 363 other Oracle components, 31–32 backup command, syntax details, auxiliary database overview of, 5 566–571 as clone database, 493–494 physical backup and recovery, backup control file command, 254 configuring parameter file for 26–31 backup control file, defined, 8 manual TSPITR, 361–362 planning, 7 backup copy group, TSM, 192 duplicating RAC database on requirements gathering, 6–7 backup current controlfile for standby single-node database, 510 shutdown of database, 23 command, 493 duplicating to remote server using startup of database, 21–22 backup database commands disk backups, 485 using database and internals, backing up datafiles based on last duplicating to same server using 23–26 backup time, 245 disk backups, 482 using OEM. See OEM (Oracle datafile backups in RAC, overview of, 51–52 Enterprise Manager) 503–504 RMAN compatibility and, 54, 79 backup and recovery strategy, getting started, 262 auxiliary destination, TSPITR, 357, 359 tuning, 450 offline RMAN backups, auxiliary instance, TSPITR, 357, backup archivelog all command, 229–230, 235 359–363 248, 250 optimization, 88 auxiliary set, TSPITR, 357 backup archivelog command, 88, backup datafile command, 250, 450 AVAILABLE status, crosschecking 244, 250–251 backup pieces, 233 backups, 400 backup as compressed backupset backup recovery area command, 66, AWS (Amazon Web Services) database command, 231 253, 508 EC2 and EBS, 145 backup as copy command, 253–254 backup redundancy backup retention establishing account with, 147 backup backupset command, 252, 481 policy, 405 Oracle and Amazon cloud, 145 backup command options, 236–247 backup retention policies, 405–408 OSB Cloud Module and, 144 archive log deletion policies, Backup Scheduling Wizard, 330–331 RMAN backup to S3, deploying, 242–243 backup selection list, NetBackup, 145–148 assigning tags to backups, 238 165–166 Simple Storage Service, 138, 145 backing up datafiles based on last backup sets storing S3 as default SBT backup time, 244–245 configuring backup in channel, 149 backing up to specific device RMAN, 321 understanding cloud computing, type, 240 crosschecking backups, 400–403 144–145 capturing elusive control file, 246 defined, 233 Please purchase PDF Split-Merge on to remove this watermark.
  19. 636 Oracle RMAN 11g: Backup and Recovery backup sets (continued) BACKUP_TAPE_IO_SLAVES parameter, using RMAN duplication to create limiting size of, 239–240 447, 449 historical subset of target modifying retention policy, backupTypeSpec parameter syntax database, 548–550 240–242 diagram, backup command, 570 catalog backupset command, 481 OEM settings, 319–320 base backup, incremental, 256–257 catalog command online backups, 252 begin backup command, 522 adding RMAN backups to recovering control file from, 276 binary compression, block-level recovery catalog, 212 recovering SPFILE from specific, backups, 46 cataloging other backups in 271–272 blank errors, media management, 111 RMAN, 417–418 recovery catalog views for, 219 block change tracking file (BCTF), defined, 209 restoring control file from 255–256, 320 recovering deleted backup, 416 RMAN, 186 block-level backups, RMAN, registering split mirror copies with RMAN default settings 44–47, 55 RMAN, 524–525 configuration, 87–88 block media recovery, 47 restoring RMAN-related records viewing corruption, 352 block media recovery (BMR), 351–353 to control file, 277–278 Backup Settings page, OEM, 319 blockObject parameter syntax diagram syntax details, 572 backup spfile command, 251 recover command, 592 catalog database, testing RMAN, 630 backup tablespace command, validate command, 612 catalog datafilecopy command, 481 250, 450 blockrecover command, 351–353 catalog, media manager, 103–104 backup throttling, and OEM, 321 blocks, 8 catalog start with command, 212, 278 backup, using media manager for tape, BMR (block media recovery), 351–353 catproc.sql script, 44 103–104 broken mirror backups, 518–520 Cell Manager, Data Protector, backup validate command, 340, 404 byte ordering, 372–373 176–177, 179–180 backup validate database command, central agent, Grid Control 351–352 C architecture, 312 backupCommands parameter syntax CF Block Integrity Check, OEM, 336 diagram, run command, 600 cancel-based recovery, 30–31, 349 cfauConf parameter syntax diagram, backupConf parameter syntax case studies, RMAN recovery configure command, 576 diagram, configure command, 576 from complete database loss change backuppiece uncatalog backupOperand parameter syntax (ARCHIVELOG), 537–542 command, 413, 415 diagram, backup command, 567 from complete database loss change command backups, RMAN, 225–238 (NOARCHIVELOG), 534–537 overview of, 408–413 backup command. See backup completing failed duplication recovering older control file command options manually, 547–548 backups, 275 compatibility issues, 227–228 considerations, 532–533 retention policy maintenance configuring settings in OEM, from loss of SYSTEM using FRA, 407–408 318–322 tablespace, 542 syntax details, 573–574 copies, 253–255 loss of unarchived online redo using, 413–416 getting started, 261–263 log, 544–545 change directory command, 123 incremental, 255–261 from lost datafile (ARCHIVELOG) change failure command, 297, managing in OEM, 341–343 using image copy in FRA, 301–302 monitoring status of, 228–229 550–551 change vectors, within redo logs, 15 offline, 229–235 online from loss of datafile or changeFailure parameter syntax online, 247–253 tablespace, 543 diagram, change command, 574 scripted backups vs., 226–227 overview of, 533–534 channel allocation taking from split mirror, 525–526 from running production datafile interfacing with MML, 107–109 verifying restorability of database, out of FRA, 552–553 recovery from complete database 366–371 through resetlogs, 545–546 loss (ARCHIVELOG), 538–539, backupSpec parameter syntax using Flashback Database/media 541–542 diagram, backup command, 568 recovery to open database with recovery from complete database backupSpecOperand parameter syntax resetlogs, 553–555 loss (NOARCHIVELOG), 535 diagram, backup command, 569 lease purchase PDF Split-Merge on to remove this watermark.
  20. Index 637 RMAN backup with clustered file systems, 502 replace script command, 595 automatic, 204 cmdfile parameter, RMAN stored report command, 595–596 to tape, using SBT interface, scripts, 418 reset database command, 106–107 cold backup mode. See offline (cold) 596–597 channels backups restore command, 597–599 configuring RMAN default command-line interface (obtool), resync catalog command, 599 settings, 84–87 OSB, 117 revoke command, 599–600 database backups and, 261 command line, RMAN configuration RMAN subclauses. See RMAN datablock backups and, 44–45 client compatibility, 79 subclause syntax details offline RMAN backups and, connect command, 79 run command, 600–601 233–235 connecting via, 76–78 send command, 601–602 RMAN process and, 42–43, 55 exiting RMAN client, 80 set command, 602–604 tuning backup and recovery running RMAN backup of Data show command, 604–605 hardware, 447 Protector-integrated shutdown command, 606 tuning with parallelized, 451 database, 185 spool command, 606 check logical option, backup command list syntax details SQL command, 606–607 command, 243, 245 @ command, 563 startup command, 607 check logical option, validate @@ command, 564 switch command, 607–608 command, 404 advise failure command, 564 transport tablespace command, check logical parameter, restore allocate channel command, 608–609 command, 369–370 564–565 unregister database command, 609 check readonly parameter, restore allocate channel for maintenance upgrade catalog command, 610 command, 350 command, 565 validate command, 610–612 checkers, OEM, 335–337 alter database command, 566 comments, storing script-related, 419 checkpoints backup command, 566–571 commit command, 25 database open process, 22 catalog command, 572 commit vector, 25 defined, 8 change command, 573–574 compatibility issues, RMAN overview of, 26 configure command, 574–578 auxiliary databases, 53 as required process, 12 connect command, 578 catalog databases and schema, 53 storing in control file, 15 convert command, 578–579 client, 79 checksyntax parameter, RMAN CLI, 78 create catalog command, 580 cross-platform transportable circular reuse records, 40 create script command, 580 tablespaces, 372 classes, OSB, 121–122 crosscheck command, 580–581 planning backups, 227–228 client delete command, 581–582 target and RMAN executable, 53 defined, 117 delete script command, 582 completedTimeSpec subclause, 614 exiting RMAN, 80 drop catalog command, 582–583 components RMAN compatibility drop database command, 583 configuring RMAN backups on guidelines, 79 duplicate command, 583–586 Data Protector, 181–182 TSM, 190, 192–194 execute command, 586 NetBackup, 155 client (database) servers, NetBackup, exit command, 586–587 Oracle and Data Protector 156–157, 166–167 flashback database configuration, 176–177 cloned database. See also duplication, command, 587 Oracle and Data Protector RMAN grant command, 587–588 integration, 174–176 from OEM, 311 host command, 588 Oracle Secure Backup, performing manual TSPITR, import catalog command, 588 117–118, 125 363–365 list command, 589–590 compression testing RMAN configuration, 630 print script command, 590–591 as backup command option, cloud computing, 144–145 quit command, 591 236–237 Cloud Module. See OSB (Oracle recover command, 591–594 configuring backup sets for disk Secure Backup) Cloud Module register database command, 594 backups, 319–320 Cluster Ready Services (CRS), RAC release channel command, 594 fast database backups with, 116 integration, 504 repair failure command, 594 RMAN, 86 Please purchase PDF Split-Merge on to remove this watermark.
Đồng bộ tài khoản