Databases Reference
In-Depth Information
The structure allows several databases to share the same fast recovery area. However, you may wonder, what
happens when two databases with the same name want to share the same fast recovery area? They can't have two
directories with the same name.
Solution
The solution is rather simple. The directory for <Database Name> does not refer to the database name; rather, it refers
to the unique name of the database. To check the unique name, use the following query:
SQL> select db_unique_name
2 from v$database;
DB_UNIQUE_NAME
------------------------------
PRODB2
By default, the unique name of a database is the same as the database name. If you want to use the same
fast recovery area for two databases, you must use different unique names. Unfortunately, you can't change this
dynamically. You have to put the following parameter in the initialization file and restart the database:
db_unique_name = <Unique Name of the Database>
Once done, the RMAN backups are automatically created in the appropriate directory.
How It Works
This solution has some caveats. It works fine in most cases but not all. For instance, suppose you had a database
called PRODB2 and the unique name was also PRODB2. The backups go in the directory +FRA/prodb2/
backuppiece/2012_08_02. Later you configure another database also called PRODB2 to share the same fast recovery
area. Of course you have to use a different unique name, but for which database? You have two choices:
Change the unique name of the new database to PROD2, and let the old one keep the unique
name PRODB2.
Change the unique name of the old database to PROD2, and let the new one have the unique
name PRODB2.
If you choose the former, then a new subdirectory, PROD2, will be created in the directory specified as the fast
recovery area, and all the backups of the new database will go there. This is the easiest and the least intrusive option.
We recommend this, if you have a choice. In most cases, this will be possible.
However, sometimes it may not be possible to give a new unique name to the new database. You may have to
change the unique name of the old database. This will also create a new subdirectory—PROD2—in the fast recovery
area. But here is the problem: prior to renaming the unique name, the backups of the old database were going to the
following directory:
+FRA/prodb2/backuppiece/2012_08_02
After renaming, however, the backup pieces go in this directory instead:
+FRA/prod2/backuppiece/2012_08_02
 
Search WWH ::




Custom Search