RMAN 的备份可以放到 ASM 里面吗?当然是可以的,但是不推荐,因为如果 ASM 出现问题,则备份也将不可读取访问。
找到一段 RMAN 备份到 ASM 的范例,摘录供参考。
You can use RMAN in conjunction with ASM. In the following sections, we will cover the following RMAN-related operations:
Copying database datafiles to an ASM disk with RMAN
Creating RMAN backups on ASM
**Copying Database Datafiles to an ASM Disk with RMAN
**
If you want to move your entire database to ASM, you can easily do this with RMAN. First you make an image copy of the database, copying it to an ASM disk group. Then use the RMAN switch database to copy command to switch the database from using the old datafiles to using the new datafiles that were copied onto the ASM drives. Here is an example of moving the database datafiles using the following commands:
RMAN>shutdown
RMAN>startup mount
RMAN>backup as copy database format ’+COOKED_DGROUP1’;
RMAN>switch database to copy;
RMAN>alter database open;
Creating RMAN Backups on ASM
RMAN backup sets can be made to ASM disks. This means that the database, archived redo logs, control-file backups, and spfiles can all be backed up to ASM disks. There are two different ways of using ASM for backups. You can send individual backups directly to an ASM disk group, or you can define the flash recovery area to be a disk group and cause backups to be sent to the flash recovery area. Let’s look at these two options in a bit more detail.
Backing Up from RMAN to ASM Directly
Backing up to an ASM disk group with RMAN is quite easy. Use the RMAN backup command and add the format parameter indicating the disk group to which you want to back up the database. Here is an example:
RMAN>backup as compressed backupset database format ’+COOKED_DGROUP1’;
You can also back up archived redo logs and database control files using RMAN via the same method.
Configuring and Backing Up to an ASM Flash Recovery Area
The flash recovery area is a directory structure that centralizes Oracle backups in one Oracle-defined backup structure (see Chapter 2 for more on the flash recovery area). You define the flash recovery area by setting the DB_ RECOVERY_FILE_DEST and DB_RECOVERY_ FILE_DEST_SIZE parameters as required. Here is an example of using the alter system command to point the flash recovery area to an ASM disk group.
alter system set db_recovery_file_dest=’+COOKED_DGROUP1’;
alter system set db_recovery_file_dest_size=4G;
Once these parameters have been set, RMAN backups will start using the flash recovery area and ASM since the flash recovery area has been configured to use an ASM disk group.
Summary
In this chapter, we showed you how Automatic Storage Management (ASM) can reduce or eliminate the headaches involved in managing the disk space for all Oracle file types,
including online and archived logs, RMAN backup sets, flashback logs, and even initialization parameter files (spfiles).
We reviewed the concepts related to a special type of instance called an ASM instance along with the initialization parameters specific to an ASM instance. In addition, we described the dynamic performance views that allow you to view the components of an ASM disk group
as well as to monitor the online rebalancing operations that occur when disks are added to or removed from a disk group. Starting and stopping an ASM instance is similar to starting and stopping a traditional database instance. Of course, other databases that use disk groups within the ASM instance will not be available to users if the ASM instance is not available to service disk group requests.
ASM filenames have a number of different formats and are used differently depending on whether existing ASM files or new ASM files are being referenced. ASM templates are used in conjunction with ASM filenames to ease the administration of ASM files.
Additionally, we reviewed ASM disk group architecture, showing how failure groups can provide redundancy and performance benefits while eliminating the need for a third-party logical volume manager. Dynamic disk group rebalancing automatically tunes I/O performance when a disk is added or deleted from a disk group or a disk in a disk group fails.