Oracle Database Backup and Recovery Interview Questions for freshers experienced :-
1. What is an Oracle database Partial Backup?
A Partial Backup is any operating system backup short of a full backup, taken while the database is open or shut down.
2. What is an Oracle database Full Backup?
A full backup is an operating system backup of all data files, on-line redo log files and control file that constitute ORACLE database and the parameter.
3. What is the difference between oracle media recovery and crash recovery?
Media recovery is a process to recover database from backup when physical disk failure occure.
cash recovery is a automated process take care by oracle when instance failure occure.
4. What is db_recovery_file_dest in oracle? When do you need to set this value?
Give me the steps to perform the point in time recovery with a backup which is taken before the reset logs of the db?
Tell me about the steps required to enable the RMAN backup for a target database?
In oracle db_recovery_file_dest specifies a default location of flash recovery area which contains multiplexed current control files,
online redo logs as well as archived logs, Rman backups,flash back logs.
db_recovery_file_dest_size should be specified as well.
5. What is Restricted Mode of Instance Startup in Oracle?
To Enable Restricted Session
Alter system enable restricted session;
To Disable Restricted Session
Alter system disable restricted session;
To Start the Database in Restricted Mode
STARTUP RESTRICT
By starting Instance in restricted mode it will not allow all users to access and only users with restriction privilege will be allowed to access.
This will be done time of make some data changes so that no users should be allowed to access data on time of changes happening
6. What is the difference between recovery and restoring of the oracle database?
Here is a scenario to understand Restore & Recovery
Sunday 10pm: Database is backed up. and is running fine.
Monday 11am: Went down / crashed due to some reason.
To bring up the database, we have 2 options:
- Simple Restore: copying files from backup taken sunday night and open the database. Here, we loose all the changes that are done since sunday night.
- Restore and Recovery: Copying files from backup taken sunday night and applying all the archivelog and redo log files to bring up the database to the point of failure. Here you dont loose the changes done until monday 11 am.
- Restore: copying files from the backup overwriting the existing database files
- Recovery: applying the changes to the database till point of failure. these changes are recorded in online redolog and archivelog (which are the backups of redolog) files.
7. What are the different tools available for hot backups in Oracle? Is it preferable to take it manually all the time or it depends on the size of the database?
A hot backup can be done by either RMAN,User Managed Backups by puting tablespace in backup mode my OEM which does the same as the user managed backup.But the Backup depends upon the size of the database you are using . if the database size in TB the RMAN backup will take more than 10 hours to complete and if the database is critical you can’ wait for long to go for so long in this case their are special backup techniques which are given by vendors like TIVOLI and Netbackup they provide BC Vol backup called Business content Volumn Sync which copies a snapshot of the primary data to another place and backsup the database from one SAN to another with in 15 min for 2 TB of database and is the preferable method for big companies.
8. What do you mean by Oracle MEDIA RECOVERY?
When physical disk fail, physical database file corrupt then media recovery required
9. What is the disk migration? what is the steps involved in oracle disk migration?
Disk migration is noting but, migration of data from one OS dependent database to another Dependent database. The steps involved in this are
- first go to your target database and export all your data into flat files
- next in the destination database during the installation of the database, it asks for data source ,instead of giving the data of the oracle provided , give the path of the flat file you exported previously .
10. What are the advantages of operating a database in ARCHIVELOG mode over operating it in NO ARCHIVELOG mode in Oracle?
Database in archivelog mode chance to take hot backup and no data loss in recovery. you can use RMAN for backup and recovery .disadvantage is poor ferformance, and more chance to crash disc.
11. Why more redos are generated when the oracle database is in begin backup mode?
During begin backup mode datafile headers get freezed and as a result row information cannot be retrieved as a result the entire block is copied to redo logs as a result more redo generated and more log switch and in turn more archive logs.
12. What is the use of FULL option in EXP command?
A flag to indicate whether full database export should be performed.
13. What is the use of OWNER option in EXP command?
List of table accounts should be exported.
14. What is the use of TABLES option in EXP command?
List of tables should be exported.
15. What is the use of RECORD LENGTH option in EXP command?
Record length in bytes.
16. What is the use of INCTYPE option in EXP command?
Type export should be performed COMPLETE, CUMULATIVE, INCREMENTAL.
17. What is the use of RECORD option in EXP command?
For Incremental exports, the flag indirect whether a record will be stores data dictionary tables recording the export.
18. What is the use of PARFILE option in EXP command?
Name of the parameter file to be passed for export.
19. What is the use of ANALYSE option in EXP command?
A flag to indicate whether statistical information about the exported objects should be written to export dump file.
20. What is the use of CONSISTENT option in EXP command?
A flag to indicate whether a read consistent version of all the exported objects should be maintained.
21. What is use of LOG (Ver 7) option in EXP command?
The name of the file which log of the export will be written.
22. What is the use of FILE option in IMP command?
The name of the file from which import should be performed.
23. What is the use of SHOW option in IMP command?
A flag to indicate whether file content should be displayed or not.
24. What is the use of IGNORE option in IMP command?
A flag to indicate whether the import should ignore errors encounter when issuing CREATE commands.
25. What is the use of GRANT option in IMP command?
A flag to indicate whether grants on database objects will be imported.
26. What is the use of INDEXES option in IMP command?
A flag to indicate whether import should import index on tables or not.
27. What is the use of ROWS option in IMP command?
A flag to indicate whether rows should be imported. If this is set to ‘N’ then only DDL for database objects will be executed.
28. What are the different methods of backing up oracle database?
- Logical Backups
- Cold Backups
- Hot Backups (Archive log)
29. What is a logical backup?
Logical backup involves reading a set of database records and writing them into a file. Export utility is used for taking backup and Import utility is used to recover from backup.
30. What is cold backup? What are the elements of it?
Cold backup is taking backup of all physical files after normal shutdown of database. We need to take.
- All Data files.
- All Control files.
- All on-line redo log files.
- The init.ora file (Optional)
31. What are the different kinds of export backups?
- Full backup – Complete database
- Incremental backup – Only affected tables from last incremental date/full backup date.
- Cumulative backup – Only affected table from the last cumulative date/full backup date.
32. What is hot backup and how it can be taken?
Taking backup of archive log files when database is open. For this the ARCHIVELOG mode should be enabled. The following files need to be backed up. All data files. All Archive log, redo log files. On control file.
33. What is the use of FILE option in EXP command?
To give the export file name.
34. What is the use of COMPRESS option in EXP command?
Flag to indicate whether export should compress fragmented segments into single extents.
35. What is the use of GRANT option in EXP command?
A flag to indicate whether grants on database objects will be exported or not. Value is ‘Y’ or ‘N’.
36. What is the use of INDEXES option in EXP command?
A flag to indicate whether indexes on tables will be exported.
37. What is the use of ROWS option in EXP command?
Flag to indicate whether table rows should be exported. If ‘N’ only DDL statements for the database objects will be created.
38. What is the use of CONSTRAINTS option in EXP command?
A flag to indicate whether constraints on table need to be exported.