An introduction to rman with examples
For beginners and non, rman is one of the most obscure Oracle tools, but in reality it is basedon quite simple principles. It is true, though, that a restoration can be distructive for adatabase.
Why is rman dangerous?
rman is dangerous because it works at the database physical level; to understand why, let'ssay that rman is not "too" different from WinZip. Since everybody knows WinZip, it willprobably be easier to understand rman.
Is WinZip dangerous?
The creation of a zip archive is not dangerous, unless you choose the same name for theoutput file, or the archive is so big that you fill a device or the temporary directory etc. Thesame thing can be said about rman: taking an rman backup cannot be dangerous (unless youstop the database, or close it intentionally) and you don't overwrite previous backups (you canprevent it).rman creates a compressed backup of the physical database files, including controlfiles,datafiles, archived logs and stores them somewhere. This somewhere can be a disk (likeWinZip) or a tape.Therefore, the first important point to remember is:
rman creates compressed backups of the physical database; if you prefer, rman zipsthe database, entirely or not.
Is Unzip dangerous?
Unzip, on the other hand, can be very dangerous. The risk is overwriting files that should notbe overwritten and, therefore, losing important content. The very same applies to rmanrestores: since they overwrite database files, you should know whether this is the rightdecision because, otherwise, you may lose your data. This is the main difference between animport and an rman restoration: an rman restoration (restore) overwrites one or moredatafiles; this means WATCH OUT.
Our first rman backup
The only requirements for taking simple, useful rman backups are two:
You database is in archivelog mode
You have enough disk space somewhereOn our Windows 2000 workstation we open a CMD window and type the following few lines:
E:\>rman target /Recovery Manager: Release 18.104.22.168.0 - ProductionCopyright (c) 1995, 2002, Oracle Corporation. All rights reserved.connected to target database: ARK9201 (DBID=3564144589)