Rman
Rman
You can check the default Size and location of your Oracle FRA with the
help of ‘ db_recovery_file_dest ‘ parameter. Like this –
First open up the command prompt and log onto your database using the
sys user
C:>sqlplus / as sysdba
Next, to check the values that are set on above mentioned parameters we
just need to query the ‘ db_recovery_file_dest ‘ parameter like this –
1. db_recovery_file_dest_size, and
2. db_recovery_file_dest
The first parameter is used for setting the maximum disk size for your
FRA. Using it you set how much space your FRA can take on your hard
drive.
And, the second parameter is used for setting the location of your fast
recovery area. Whatever directory path you will set in this parameter will
be used by RMAN to save all the backups. In our demonstration that path
will be ‘D:\Oracle_FRA’.
C:\>SQLPLUS / AS sysdba
#Please refer to the 'What is the Right Size of the FRA' section above.
You can find the maximum size of your FRA and the amount of space that
has been used by writing a simple query
against v$recovery_file_dest dynamic view.
1. LOG_ARCHIVE_DEST_n, and
2. LOG_ARCHIVE_MIN_SUCCEED_DEST
Log_Archive_Dest_n Parameter
Log_Archive_Dest_n parameter is used to set a location for Archive Log
Destination Directory. Here are a few things about this parameter –
Mind here I emphasize on the keyword OPTIONAL . Let’s talk more about
it.
Let’s say you have two archive log directories created and both these
directories are optional in Nature. Then the Archiver Process (The
background process that is responsible for archiving your redo logs) does
not guarantee that in which directory your redo logs will get written or
even get written all together.
The Question
Now the question is – if by default archive log directories are optional then
How and When can we consider Online Redo logs archived successfully?
LOG_ARCHIVE_MIN_SUCCEED_DEST.
LOG_ARCHIVE_MIN_SUCCEED_DEST parameter sets the total number of
Archive Log Destination Directories that need to have successful copies of
the online redo logs in order to be considered as successfully archived.
That’s it for this tutorial. Hope you find it helpful. For more details watch
the video.
Thanks and have a great day.
First let’s learn how to connect with the container database using SYS
user as well as the common user that we created in the previous tutorial.
ORCL is the net service for the root container whereas pdborcl is the
service for pluggable database. In your case these names could be
different.
Here is how you can connect with the root container using net
service ORCL.
Here is how –
So, in my case the name of the TNS service which is registered for the
pluggable database is ORCLPDB. Let’s use this service to connect with
the pluggable database using RMAN
This command will connect the Recovery manager with the pluggable
database with which the NET Service ORCLPDB is registered.
Now let’s suppose you are already connected with the pluggable database
and you want to switch to a container database. One way is to disconnect
from RMAN and reconnect with it using the desired root container. This
requires you to exit from the RMAN prompt which is an inefficient way.
These are the ways to connect with the Recovery manager (RMAN) in
Oracle Database. Hope you learnt something new. Thanks and have a
great day!
Configure Oracle
Database to Store
Archive Redo Logs into
Fast Recovery Area
FRA is where Oracle Recovery Manager (RMAN) saves all the backups of
the database and necessary configuration files along with the metadata.
After enabling archivelog mode you should configure your database to
keep all the Archive logs into the Fast Recovery Area. This tutorial will
show how you can configure Archive redo logs to go to the Fast Recovery
area every time they are generated.
C:/>SQLPLUS / as SYSDBA
Next, we will run the alter system command
Again make sure you are connected with your database using the SYS
user. Next, write
VALIDATE command
VALIDATE command checks the SPFILE, CONTROL FILE, Data File, Archive
Redo logs and backup set pieces for corruptions like missing file or any
physical corruption.
RMAN>VALIDATE database;
This command will validate all the data files of your database, Including
data files of container database as well as all the pluggable databases.
This will also validate the current control file and SPFILE.
You can combine all these three commands into one and check your
database, control file and archive redo logs just by issuing only one
command like this –
Let’s say you want to check your database for Physical as well as logical
corruption. You can do that like so-
Now let’s check out the second way to read a control file in Oracle.
C>SQLPLUS / as SYSDBA
Step 2- Debug the current process
SQ>ORADEBUG UNLIMIT;
By default, the size of the trace file is not set to unlimited. We have to do
it manually
That is how you check what control file contains in Oracle Database. Do
make sure to subscribe to my YouTube channel. Since next we will be
learning how to multiplex control files in Oracle Database.
How To Multiplex a
Control File
There are many questions about multiplexing of control file that I am
going to address in this tutorial. Questions like, why multiplexing is
important and different ways of multiplexing control files in Oracle
database. And at the end I will demonstrate how to multiplex a control file
using SPFILE in Oracle Database.
But what if you don’t have a good backup of your control file. Now you are
stuck. In such scenarios, having more than one control file can come in
handy.
If you have multiple control files and one of them gets damaged then you
can use the other control files to get your database operational in no time.
Since we have a name and location of the SPFILE in the VALUE column,
this signifies that my database is using SPFILE.
First find out the control file. You can refer to my tutorial on how to find
the location of control file in Oracle. But for now
Now we will make a copy of the control file whose name and location we
copied earlier. For this I will open up a new command prompt.
Now we will start our database. If everything goes well then our database
will Mount and open for all the operations.
SQL> startup
You can even check whether you have successfully multiplexed your
control file or not. Simply by checking the value of control_files parameter,
like this: