I am an accidental DBA..I have to restore an oracle database using RMAN utility. I don't know anything about backups and restoration and this is my first assigned task. Are there any good forum(s) that has specific information and scripts that I could use for doing the recovery? I need your advice on this. Once the database is restored, what queries should i run to test if everything is ok?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as too broad by Mark Storey-Smith, Kin, gbn, ypercubeᵀᴹ, swasheck May 8 '14 at 21:58
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
If this is not a production database, read the manual, try the things you learn by reading the manual and bring specific questions to specific efforts that you've hit a bump in the road.
If this is a production database, hire a professional Oracle DBA. Immediately.
The speech is quite long and complicated. However, the online documentation is really great. So take this answer as a very brief and standard guideline on RMAN. The question is fairly generic, then the answer will be generic.
The Recovery Manager (RMAN) utility is a way (available since Oracle 8i at no extra charge and recommended by Oracle) to provide backup and recovery activities, including full and incremental backup, reporting, detection of corrupt blocks, copy, restore and recovery of datafiles, control files, archived redo logs and spfiles. You can use either a GUI or command-line mode. Alsp you should build the repository. The repository is a very helpful separate source that contains the metadata about your taget database and all of the backup and recovery information for that database for maintenance purposes. This information can be used, for example, to restore files and recover the database by issuing very simple restore and recovery commands. This repository can be implemented in one of two ways: control files and recovery catalog database (recommended by Oracle).
Some operations in SQL*Plus
1) Let's create RMAN tablespace, catalog and user, and grant the authority to perform RMAN operations:
2) Let's create recovery catalog and register target database with the RMAN catalog:
3) Let's perform a back up of entire database:
4) Let's set up the environment for a restore and recovery:
RMAN can automate file restores and can be used to restore datafiles, controlfiles, and archive redo logs. You can perform every RMAN operations (not only restores, like in my example) using stored scripts, which are a set of RMAN commands that are stored in the recovery catalog. This option allows you to develop, test, and save commands. The following is a sample stored script that perform a full restore and recovery, and set a new archive log directory destination:
Take in account that each script is related to one target database only.
Verify whether database could be successfully restored
You can use the RMAN
More info here.
The best way to get a good grip on RMAN is to start learning from scratch. Being an accidental DBA, this could mean a few white-nights. RMAN is a very critical component, and not knowing how it works, might cause massive data loss. Start by looking here: RMAN DOCS & Oracle Backup/Recovery Guide
Being new into this area, I suppose that you do not know much about redo logs, archives, working in archivelog mode etc. You should also read about this. Again, Oracle docs could prove a solid source of knowledge.