Professional Documents
Culture Documents
Rman Interview Questions 2019
Rman Interview Questions 2019
Answer :
The SCN is an Oracle server–assigned number that indicates a committed version of the database. It’s quite possible
that different datafiles in the database might have a different SCN at any given point in time.
At checkpoint, the server will makes all database file SCNs and control file SCN consistent with respect to an identical
SCN.The datafiles will not contain any database changes beyond that common SCN. This synchronization of the SCNs
will make sure we have a consistent backup of database.
When you are doing hot backup, you may end up with backups of the various datafiles at various time points and
different SCNs and you can not open a database without synchronizing the SCN on all data files, so you will have to apply
archive logs to make the data current and synchronize the SCNs across the datafiles.
2. Question 2. What Is The Significance Of Fast_start_mttr_target Parameter?
Answer :
You use the Oracle initialization parameter fast_start_mttr_target to specify the number of seconds you want the crash
recovery to take. Oracle will try to recover the
instance as close as possible to the time that you specify for the fast_start_mttr_target parameter. The maximum value
of this parameter is 3600 seconds (1 hour).
During instance recovery, in the first roll forward operation, the database server must apply all transactions between
the last checkpoint and the end of the redo log to the datafiles. Thus, in order to tune instance recovery, you control
the gap between the checkpoint position and the end of the redo log. This is called Mean Time to Recover (MTTR).
3. Question 3. There Was A Media Failure. How Can You Find Which Files You Must Recover?
Answer :
By querying the V$RECOVER_FILE view, which lists all files that need media recovery.
4. Question 4. What Are The Benefits Of Rman Over User-managed Backup-recovery Process?
Answer :
powerful Data Recovery Advisor feature
1.simpler backup and recovery commands
2.automatically manages the backup files without DBA intervention.
3.automatically deletes unnecessary backup datafiles and archived redo log files both from disk and tape.
4.provides you with detailed reporting of backup actions
5.Easy to duplicate a database or create standby database.
6.Without actually restoring data, you can test whether you will be able to do it or not
7.Incremental backup! only RMAN can do that.
8.Active Duplication! (11g new feature), you can perform database duplication without backups by using
the network enabled database duplication feature
9. automatically detects corrupt data blocks during backups
10. Data block level recovery possible in case only few DB blocks are corrupt
11. Encrypted backups possible
12. Use RMAN with a variety of third-party storage systems easily
With so many benefits, RMAN shold be used as primary backup-recovery tool.
5. Question 5. How Important Is Database Redundancy Set And Where You Should Plan To Keep It?
Answer :
Database Redundancy Set is essential set of recovery-related files. As a DBA, you need to be well prepared for any kind
of contingency situation.
It should contain below:
o Recent backups of all datafiles & control file (duplex or triplex the control file at database level)
o All archived redo logs made after the last backup
o Current control files and online redo file copies (duplex online redo files at database level)
o Oracle database-related configuration file copies (spfile, password file, tnsnames.ora and listener.ora files
etc)
Operating system mirroring is good, but you should do database level mirroring wherever possible.
If you using ASM, try to have atleast Normal redundancy.
When setting up production systems, use at least two disk drives(one for the redundancy set and the other for the
datafiles). They should be completely separated by using different volumes, file systems, disk controllers, and RAID
devices to hold the two sets of files
You can set up FRA for keeping the redundancy set. Oracle recommends the flash recovery area as a logical candidate
to keep a copy of all the files belonging to the redundancy set (which includes the most recent database backup) on disk.
6. Question 6. What Is The Benefit Of Making Automatic Control File Backup To On?
Answer :
Remember that control file is absolutely necessary during a recovery.
Below command can be used to have automatic control file backup to be taken. This is highly recommended.
RMAN> configure controlfile autobackup on Now at the end of every RMAN backup command, RMAN automatically
backs up the control file.
Even when you make some changes via SQL*Plus( say creating a new tablespace or adding or renaming a datafile or an
online redo log member), the control file is automatically backed up.
Also, you can restore RMAN’s backup and recovery information (called RMAN’s repository), when you lose all your
control files and aren’t using the optional recovery catalog.
7. Question 7. What All You Can Store In Flash Recovery Area(fra)? Can One Fra Directory Be Used For More Than One
Database?
Answer :
Oracle can store different kind of files under FRA:
o backupset: for RMAN regular backups.
o datafile: for RMAN image copies.
o autobackup: for control file autobackups.
o flashback: If your database runs in flashback mode, you will see flashback logs in this subdirectory.
o archivelog: for Archived redo logs
o controlfile: The control file, if configured to go to the flash recovery area.
o onlinelog: Online redo logs can also be made to go to the flash recovery area
You can use the same flash recovery area for as many databases as you want. The RMAN backup process will create a
subdirectory called <SID_NAME>, the same name as the database you are backing up.
8. Question 8. Which Views Can Be Used For Checking Space Usage In The Fra?
Answer :
Check Below..
SQL> select NAME,SPACE_LIMIT/1024/1024/1024 TOTAL_GB,SPACE_USED/1024/1024/1024
USED_GB,SPACE_RECLAIMABLE,NUMBER_OF_FILES from v$recovery_file_dest;
NAME TOTAL_GB USED_GB SPACE_RECLAIMABLE NUMBER_OF_FILES
————————————————– ———- ———- —————– —————
/u01/oracle/DB11G/fast_recovery_area 16 1.13197899 0 3
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES——————– —————— —
———————- —————
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG .12 0 1
BACKUP PIECE 6.95 0 2
IMAGE COPY 0 0 0
FLASHBACK LOG 0 0 0
FOREIGN ARCHIVED LOG 0 0 0
7 rows selected.
9. Question 9. Is Putting Control File And Online Redo Logs In Flash Recovery Area (fra) Advisable?
Answer :
Control file is very important file for the database operation. Loosing a single control file will make the database unstable
and will lead to interruption in service.
So we will always try to put control file in a safe and stable place.
Similarly online logs are equally important and loosing them can also cause database to crash, incomplete recovery and
possible data loss.
CASE 1:
Usually the flash recovery area and the main database disks are located in such a way that the probability of both going
down at the same time is very slim.
And If your flash recovery area is in a storage location as reliable as the main database storage, then you should put one
control file and one redo member/log group there.
It will surely help you in quick and complete recovery.
CASE 2:
If your flash recovery area is NOT as reliable as the main database storage, the chance of failure in the flash recovery
area is greater compared to the main database disks. If the flash recovery area fails, then you lose one of the control
files and the online redo log. You will be able to start database easily by removing that control file from the control file
parameter in the initialization parameter file (copying online log from the secondary Non-FRA location) and restarting it
but you will have an interruption of production service, which is very undesirable.
Scenario A: Besides FRA, we have multiplexed Control files to two other separate location, so risk of loosing control file
(and fear of not able to do complete recovery) is minimized We won’t be putting even a single control file in the FRA.
Scenario B: Besides FRA, we have multiplexed Control files to only one other separate location, so risk of loosing control
file and (and fear of not able to do complete recovery) is more. Complete recovery of database is of primary importance
to you than the database interruption.
Here we can go and put the control file in FRA.
10. Question 10. How Can You Make Sure That Only One Of The Redo Log Member Is Created In Fra?
Answer :
If you want only one member of the group in the flash recovery area and the other one in the regular database file
location, you should define two parameters—the flash recovery area and db_create_file_dest.
SQL> Show parameter db_recovery_file_dest
NAME TYPE VALUE
———————————— ———– ——————————
db_recovery_file_dest string /u01/oracle/DB11G/fast_recovery_area
SQL> alter system set db_create_file_dest =’/u01/oracle/DB11G/oradata’;
System altered.
SQL> alter database add logfile group 4;
Database altered.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE
3 ONLINE /u01/oracle/DB11G/oradata/brij/redo03.log NO
2 ONLINE /u01/oracle/DB11G/oradata/brij/redo02.log NO
1 ONLINE /u01/oracle/DB11G/oradata/brij/redo01.log NO
4 ONLINE /u01/oracle/DB11G/oradata/brij/BRIJ/onlinelog/o1_mf_5_9hl8zjmt_.log NO
4 ONLINE /u01/oracle/DB11G/fast_recovery_area/BRIJ/onlinelog/o1_mf_5_9hl8zjsz_.log YES
11. Question 11. How Can You Create Log Of Your Rman Activity?
Answer :
Two ways to do it
A) WHILE STARTING RMAN
$ rman log=’tmp/rman_log.log’ OR $ rman log /tmp/rman_log.log append
(use with append clause if you don’t wanna overwrite existing file)
Also If you are running RMAN interactively and you want to see output on your terminal screen as well as have it
written to a log file, use tee command:
$ rman | tee /tmp/rman.log
B) WHILE INSIDE RMAN
$rman
RMAN> spool log to ‘/tmp/rman_log.log’;
(use with append clause if you don’t wanna overwrite existing file “spool log to ‘/tmp/rman_log.log’ append.)
..
RMAN> spool log off;
** you can use any writeable directory and log file name.
12. Question 12. Can Recovery Catalog Database Also Be Shutdown From Rman Prompt Like Target Database Can Be Done?
Answer :
All the shutdown and startup commands applies only to the target database. You can’t start and stop the recovery
catalog instance from RMAN. The only way to start up and shut down the recovery catalog instance is by connecting to
the recovery catalog database as the target database and by issuing the relevant commands to start or stop the instance.
13. Question 13. How To Check The Syntax Of Rman Commands?
Answer :
Start the RMAN client with the operating system command-line argument checksyntax.
$ rman checksyntax
Recovery Manager: Release 11.2.0.4.0 – Production on Wed
RMAN> connect target /
The command has no syntax errors
RMAN> backup database;
The command has no syntax errors
You can also use the checksyntax argument to check the syntax of RMAN commands that are part of a command file.
Example:
$ rman checksyntax @/tmp/rmancmdfile
14. Question 14. Does Using Recovery Catalog Means Rman Won’t Use The Control File To Store Information?
Answer :
No. Even when you choose to use a recovery catalog, backup information will continue to be stored in the control file
as well by default.
15. Question 15. What Is The Benefit Of Using Recovery Catalog?
Answer :
1. provides larger storage capacity, thus enabling access to a longer history of backups
2. you can create and store RMAN scripts in the recovery catalog and Any client that can connect to the
recovery catalog and a target database can use these stored scripts
3. Can service many target databases
4. you can use ‘KEEP FOREVER’ clause of RMAN backup command.
5. Allows you to list the data files and tablespaces that are or were in the target database at a given time
16. Question 16. What Is The Significance Of ‘resync Catalog’ Rman Command?
Answer :
The resync catalog command is used in order to update or resynchronize a recovery catalog from the target database
control file. Since sync is done from Target database control file, so you must connect to the recovery catalog as well as
to the target database in order to perform the resynchronization.
RMAN> resync catalog;
starting full resync of recovery catalog
full resync complete
When above command is executed, RMAN will first create a snapshot control file. It’ll then compare the contents of the
recovery catalog to the contents of the snapshot control file and update the recovery catalog by adding the missing
information and modifying the changed backup and schema related records.
It means that we will keep parameter control_file_record_keep_time longer than our backup interval, so that the data
in the control file gets transferred to the recovery catalog before that data is overwritten.
When you issue certain RMAN commands such as the backup command, RMAN automatically performs a
resynchronization.
17. Question 17. You Want To Move Your Recovery Catalog From One Database To Another. How You Can Do It?
Answer :
Moving Recovery catalog to another database is simple process
o Create a new recovery catalog in the target database. You don’t need to register any database to it
o Use the import catalog command in RMAN after connecting to the target database:
$ rman
RMAN> connect catalog rman_new/rman@target_database
RMAN> import catalog rman_old/rman@source_database;
The import catalog command will import the source recovery catalog contents into the target recovery catalog.
18. Question 18. What Are The Most Important Recovery Catalog Views?
Answer :
Below are some of the frequently used views:
o RC_STORED_SCRIPT: Information about RMAN scripts stored in the recovery catalog.
o RC_UNUSABLE_BACKUPFILE_DETAILS: Lists the unusable backup files recorded in the recovery catalog.
o RC_RMAN_STATUS: Similar to V$RMAN_STATUS view and shows the status of all RMAN operations. This view
doesn’t contain information about any operations that are currently executing.
o RC_RMAN_CONFIGURATION: Information about persistent configuration settings.
o RC_DATAFILE: Shows all datafiles registered in the recovery catalog.
o RC_DATABASE: Shows the databases registered in the recovery catalog.
o RC_ARCHIVED_LOG: Provides historical information on both archived as well as unarchived redo logs.
19. Question 19. How To Check The Version Of Your Recovery Catalog?
Answer :
You can easily check the version of your recovery catalog by issuing the following command from SQL*Plus after logging
in as the recovery catalog owner:
RMAN@rmandb > select * from rcver;
VERSION
—————
11.02.00.04
20. Question 20. What All Files Can Not Be Backed Up By Rman?
Answer :
o Oracle home-related files
o External files
o Network configuration files
o Password files
RMAN is an Oracle Database client that performs backup and recovery tasks on your databases and automates the
administration of your backup strategies. It greatly simplifies the dba jobs by managing the production database’s backing
up, restoring, and recovering database files.
This tool integrates with sessions running on an Oracle database to perform a range of backup and recovery activities,
including maintaining an RMAN repository of historical data about backups. There is no additional installation required for
this tool. It’s by default get installed with the Oracle database installation. The RMAN environment consists of the utilities
and databases that play a role in backing up your data. You can access RMAN through the command line or through Oracle
Enterprise Manager.
Why to use RMAN?
RMAN gives you access to several backup and recovery techniques and features not available with user-managed backup
and recovery. The most noteworthy are the following:
Automatic specification of files to include in a backup: Establishes the name and locations of all files to be backed up.
Maintain backup repository: Backups are recorded in the control file, which is the main repository of RMAN metadata.
Additionally, you can store this metadata in a recovery catalog.
Incremental backups: An incremental backup stores only blocks changed since a previous backup. Thus, they provide
more compact backups and faster recovery, thereby reducing the need to apply redo during datafile media recovery.
Unused block compression: In unused block compression, RMAN can skip data blocks that have never been used.
Block media recovery: You an repair a datafile with only a small number of corrupt data blocks without taking it offline
or restoring it from backup.
Binary compression: A binary compression mechanism integrated into Oracle Database reduces the size of backups.
Encrypted backups: RMAN uses backup encryption capabilities integrated into Oracle Database to store backup sets
in an encrypted format.
Corrupt block detection: RMAN checks for the block corruption before taking its backup.
RMAN backup and recovery operation for a target database is managed by RMAN client. RMAN uses the target database
control file to gather metadata about the target database and to store information about its own operations. The RMAN
client itself does not perform a backup, restore, or recovery operations. When you connect the RMAN client to a target
database, RMAN allocates server sessions on the target instance and directs them to perform the operations. The work of
backup and recovery is performed by server sessions running on the target database. A channel establishes a connection
from the RMAN client to a target or auxiliary database instance by starting a server session on the instance. The channel
reads data into memory, processes it, and writes it to the output device.
When you take a database backup using RMAN, you need to connect to the target database using RMAN Client. The RMAN
client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target
host through Oracle Net. For backup, you need to allocate an explicit or implicit channel to the target database. An RMAN
channel represents one stream of data to a device and corresponds to one database server session. This session dynamically
collects information of the files from the target database control file before taking the backup or while restoring.
For example, If you give ‘Backup database’ from RMAN, it will first get all the datafiles information from the controlfile.
Then it will divide all the data files among the allocated channels. ( roughly equal size of work as per the datafile size ). Then
it takes the backup in 2 steps. In the first step, the channel will read all the Blocks of the entire data file to find out all the
formatted blocks to backup. Note: RMAN does not take the backup of the unformatted blocks. In the second step, it takes
the backup of the formatted blocks. This is the best advantage of using RMAN as it only takes the backup of the required
blocks. Let’s say in a data file of 100 MB size, there may be only 10 MB of use full data and rest 90 MB is free then RMAN
will only take the backup of those 10 MB.
RMAN always connect to the target or auxiliary database using the SYSDBA privilege. In fact, the SYSDBA keywords are
implied and cannot be explicitly specified. Its connections to a database are specified and authenticated in the same way
as SQL*Plus connections to a database.
The O/S user should be part of the DBA group. For remote connection, it needs the password file Authentication. Target
database should have the initialization parameter REMOTE_LOGIN_PASSWORDFILE set to EXCLUSIVE or SHARED.
RMAN terminology
A target database: An Oracle database to which RMAN is connected with the TARGET keyword. A target database is a
database on which RMAN is performing backup and recovery operations. RMAN always maintains metadata about its
operations on a database in the control file of the database.
A recovery Catalog: A separate database schema used to record RMAN activity against one or more target databases. A
recovery catalog preserves RMAN repository metadata if the control file is lost, making it much easier to restore and recover
following the loss of the control file. The database may overwrite older records in the control file, but RMAN maintains
records forever in the catalog unless deleted by the user.
Backup sets: RMAN can store backup data in a logical structure called a backup set, which is the smallest unit of an RMAN
backup. One backup set contains one or more datafiles a section of datafile or archivelogs.
Backup Piece: A backup set contains one or more binary files in an RMAN-specific format. This file is known as a backup
piece. Each backup piece is a single output file. The size of a backup piece can be restricted; if the size is not restricted, the
backup set will comprise one backup piece. Backup piece size should be restricted to no larger than the maximum file size
that your filesystem will support.
Image copies: An image copy is a copy of a single file (datafile, archivelog, or controlfile). It is very similar to an O/S copy of
the file. It is not a backupset or a backup piece. No compression is performed.
Snapshot Controlfile: When RMAN needs to resynchronize from a read-consistent version of the control file, it creates a
temporary snapshot control file. The default name for the snapshot control file is port-specific.
Database Incarnation: Whenever you perform incomplete recovery or perform the recovery using a backup control file, you
must reset the online redo logs when you open the database. The new version of the reset database is called a new
incarnation. The reset database command directs RMAN to create a new database incarnation record in the recovery
catalog. This new incarnation record indicates the current incarnation.
RMAN Configuration
What is RMAN Configuration and how to Configure it?
The RMAN backup and recovery environment is preconfigured for each target database. The configuration is persistent and
applies to all subsequent operations on this target database, even if you exit and restart RMAN. RMAN configured settings
can specify backup devices, configure a connection to a backup device, policies affecting backup strategy, encryption
algorithm, snapshot controlfile location, and others.
By default there are some default configurations are set when you login to RMAN. You can customize them as per your
requirement. Any time you can check the current setting by using the “show all” command. CONFIGURE command is used
to create persistent settings in the RMAN environment, which apply to all subsequent operations, even if you exit and
restart RMAN.
RMAN>Show all;
How to Reset to default Configuration?
This is a separate database which contains catalog schema. You can use the same target database as the catalog database
but its not at all recommended. For more details on Recovery catalog kindly refer the Note 452529.1: Recovery catalog for
RMAN backup.
You can have multiple catalog database for the same target database. But at a time you can connect to only 1 catalog
database via RMAN. It’s not recommended to have multiple catalog database.
Catalog database is secondary storage of backup metadata. It’s very useful in case you lost the current controlfile, as all the
backup information are there in the catalog schema. Secondly from contolfile the older backup information are aged out
depending upon the control_file_record_keep_time. RMAN catalog database maintains the history of data.
Catalog database is like any other database which contains the RMAN catalog user’s schema.
Since the catalog database is an option one there is no direct effect of loss of catalog database. Create a new catalog
database and register the target database with the newly created catalog one. All the backup information from the target
database current controlfile will be updated to the catalog schema. If any backup information which is aged out from the
target database then you need to manually catalog those backup pieces.
RMAN backup
What are the database file’s that RMAN can backup?
RMAN can backup Controlfile, Datafiles, Archive logs, standby database controfile, Spfile.
What are the database file’s that RMAN can not backup?
RMAN can not take the backup of the pfile, Redo logs, network configuration files, password files, external tables and the
contents of the Oracle home files.
No. we can not put datafiles and archive logs in the same backupset.
Yes. If the controlfile autobackup is not ON then RMAN takes the backup of controlfile along with the datafile 1, whenever
you take the backup of the database or System Tablespace.
Yes! You can set the max size of the backupset as well as the backup piece. By default one RMAN channel creates a single
backupset with one backup piece in it. You can use the MAXPIECESIZE channel parameter to set limits on the size of backup
pieces. You can also use the MAXSETSIZE parameter on the BACKUP and CONFIGURE commands to set a limit for the size
of backup sets.
What is the difference between backup set backup and Image copy backup?
A backup set is an RMAN-specific proprietary format, whereas an image copy is a bit-for-bit copy of a file. By default, RMAN
creates backup sets.
A consistent backup occurs when the database is in a consistent state. That means backup of the database taken after
shutdown immediate, shutdown normal or shutdown transactional. If the database is shut down with abort option then its
not a consistent backup. A backup taken when the database is Up and running is called an inconsistent backup. When a
database is restored from an inconsistent backup, Oracle must perform media recovery before the database can be opened,
applying any pending changes from the redo logs. You can not take an inconsistent backup when the database is in
noarchivelog mode.
No ! You can take RMAN backup only when the target database is Open or in Mount stage. Its because RMAN keeps the
backup metadata in controlfile. Only in open or mount mode controlfile is accessible.
Do I need to place the database in begin backup mode while taking RMAN inconsistent backup?
RMAN does not require extra logging or backup mode because it knows the format of data blocks. RMAN is guaranteed not
to back up fractured blocks.No extra redo is generated during RMAN backup.
Note: RMAN compressed backup with BZIP2 provides great compression but is CPU intensive. Using ZLIB compression
requires the Oracle Database 11g Advanced Compression Option and is only supported with an 11g database. The feature
is not backward compatible with 10g databases.
Can I encrypt RMAN backup?
RMAN supports backup encryption for backup sets. You can use wallet-based transparent encryption, password-based
encryption, or both. You can use the CONFIGURE ENCRYPTION command to configure persistent transparent encryption.
Use the SET ENCRYPTION, command at the RMAN session level to specify password-based encryption.
Miscellaneous
Can RMAN take backup to Tape?
Yes! you can use RMAN for the tape backup. But RMAN can not able to write directly to tape. You need to have third-party
Media Management Software installed. Oracle has published an API specification which Media Management Vendor’s who
are members of Oracle’s Backup Solutions Partner program have access to. Media Management Vendors (MMVs) then
write an interface library which the Oracle server uses to write and read to and from tape.
Before performing a backup or restore to a media manager, you must allocate one or more channels or configure default
channels for use with the media manager to handle the communication with the media manager. RMAN does not issue
specific commands to load, label, or unload tapes. When backing up, RMAN gives the media manager a stream of bytes and
associates a unique name with this stream. When RMAN needs to restore the backup, it asks the media manager to retrieve
the byte stream. All details of how and where that stream is stored are handled entirely by the media manager.
A proxy copy is a functionality, supported by a few media manager in which they handle the entire data movement between
datafiles and the backup devices. Such products may use technologies such as high-speed connections between storage
and media subsystems to reduce the load on the primary database server. RMAN provides a list of files requiring backup or
restore to the media manager, which in turn makes all decisions regarding how and when to move the data.
Oracle Secure Backup is a media manager provided by oracle that provides reliable and secure data protection through file
system backup to tape. All major tape drives and tape libraries in SAN, Gigabit Ethernet, and SCSI environments are
supported.
During RMAN backup we are getting “failed to create sequential file” error. What is the reason?
a. The reason would be lost of contact with tape drive, so we need to check with backup team
We are getting “control file enqueue” error in RMAN backup log file, what action you will take?
a. It means two backups on same database are trying to take controlfile backup and one of the backup is placed in
queue until first one completes
If we don’t use recovery catalog, where the backup information is stored and till how many days?
a. It will be stored in controlfiles and no of days are dependent on CONTROLFILE_RECORD_KEEP_TIME
parameter. Generally it is 7 days
How many recovery catalogs you will create for 100 prod databases?
Only one is enough
If you are the DBA, will you choose differential or cumulative and why?
I will choose differential because it will complete faster
I have a image copy of database, can we apply level 1 incremental backup on that and recover the database?
Yes we can apply
Which process is responsible in writing latest SCN to controlfiles which are re- created?
Server process
Out of 100 datafiles, I lost 29 files. How you will identify which files to recover?
Using the view v$recovery_file
I placed a tablespace in hot backup mode and datafile which is being backup is lost. How you will recover it?
We can restore from old backup and apply all the archives till now
Yesterday night backup is successful. Today morning we added a datafile at 11 AM. After noon 3’o clock the newly added
datafile is lost. Can I recover that datafile? If so, how?
Yes we can recover it. We need to create that datafile using “alter database create datafile ‘path’;” command and then
apply all the archives
How you will recover database when all copies of control file are lost?
We can do a complete recovery if we have a latest trace of it. Or else, we need to do incomplete recovery by restoring
controlfile from last successful backup
Application team informed that an important table is dropped. How you will recover it?
We can recover it by doing until time recovery. But this will affect other user transactions, so we need to get approval
for this first
What are the pre-requisite factors you will consider before performing until time recovery?
We need to see if other users are not getting any affect by doing this
You need to restore the database and then realized there are no control files. How you will proceed?
Either we can resotre controlfiles first and do recovery (but a data loss is there as its incomplete recovery) or we can
create new controlfile if we have a latest trace
2. A database is running in NOARCHIVELOG mode then which type of backups you can take?
Ans :- only cold backup (consistence backup)
3. Can you take partial backups if the Database is running in NOARCHIVELOG mode?
Ans:- No, Partial backup cannot take while database is not in archive log mode.
Partial backup will not be synchronized with the rest of the database. It is a copy of just part of the database, at a particular
moment in time.
4. Can you take Online Backups if the the database is running in NOARCHIVELOG mode?
Ans :- No, we can’t take online backup while database is running in no archive log mode.A datafile that is backed up online
will not be synchronized with any particular SCN, nor it will be synchronized with other data fileor the control files.
5. How do you bring the database in ARCHIVELOG mode from NOARCHIVELOG mode?
Ans: – Sql> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG
Sql> shut down immediate;
Sql> startup mount;
sql> alter database noarchivelog;
sql> select log_mode from v$database;
LOG_MODE
————
NOARCHIVELOGNo Archive log mode to archive log mode
Sql> select log_mode from v$database;
LOG_MODE
————
NOARCHIVELOG
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 14
Current log sequence 17
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
LOG_MODE
————
NOARCHIVELOG
SQL> alter database archivelog;
Database altered.
SQL> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG
SQL> select log_mode from v$database;
LOG_MODE
————
ARCHIVELOG
6. You cannot shutdown the database for even some minutes, then in which mode you should run the database?
Ans:- Database must be running in Archive log mode.
Differences concerning backups
No archive log
Archive log
Must backup entire database.
In case of a failure, all changes sinces the last backup will be lost
7. Where should you place Archive logfiles, in the same disk where DB is or another disk?
Ans:- For the database performance reason and disk failure , we should store the archive log file at another disk .
10. Should you take the backup of Logfiles if the database is running in ARCHIVELOG mode?
Ans:- No, there is no need to take the backup of online redo log file while our database is running in no archivelog mode,
why because whatever information is containg by redo log jhas already been moved to archived redo log file before
switching to next redo. So there is no benefit to take up the backup of online redo log files.
1). copies only the filled blocks i.e. even if 1000 blocks is allocated to datafile but 500 are filled with data then RMAN will
only create a backup for that 500 filled blocks.
5). can create and store the backup and recover scripts.
6). increase performance through automatic parallelization( allocating channels) less redo generation.