![]() ![]() This will save us some time figuring out setting up many other parameters for the new database at later stages. It might sound bit unethical to ask you to create a new database using Oracle database creation wizard for this purpose, however this is what we will do for this exercise. Today we will see how to restore RMAN backup from Server A to Server B, ie, to a different physical server with a different database name. I suggest you to start using RMAN backups the soonest possible regardless whether your database is just few megabytes in size. No hassles like creating tablespaces, schemas and then waiting hours for the import process to complete! The biggest size of the database I ever dealt with is 550GB and a server with 2×4 core processors, 16GB total memory restores the 140GB backup in less than 1.5 hours. RMAN backups are the fastest, easiest incase if you are doing it right. If you want to restore RMAN backup to a higher version of Oracle database, it will be an entirely different exercise. That completes the simplest form of Oracle RMAN backups on Windows platform.Ĭurrently we are discussing about restoring the RMAN backup to same version of Oracle database. Don’t forget to copy those backup pieces to an external medium to insure maximum availability during a crisis. Depending upon the disk space available, you should adjust the retention policy for your backups. We are using 7 days retention policy with the script file, so on the 8th day obsolete backups will be purged. Everyday, at a said time, RMAN backups will be created and kept in the destination folder. Now fire up Windows Task scheduler and create a basic job Make sure the path ” D:\RMAN_BACKUP\logs” or equivalent exists prior running the scripts. ![]() Once again you can save this file with any name, provided the extension is either. Rman target / nocatalog cmdfile='D:\scripts\rman_backup.cmd' log='%filename%' Set filename="D:\RMAN_BACKUP\logs\%mydate%_%mytime%_rman_backup.log" Now, we will create another cmd file that will call the above script. Please note, I am taking backup on “D:\RMAN_BACKUP” folder, you should change “D:\RMAN_BACKUP” with the exact location that is used for the backup! Make sure you change the name in the next script incase if you choose a name other than “rman_backup.cmd”. You can save it with any other name ending with. ![]() runīACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT ' D:\RMAN_BACKUP\PROD_comp_%d_ lvl0_%U' TAG "dailyfull_db_lvl0_bkp" INCLUDE CURRENT CONTROLFILE īACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL FORMAT 'D:\RMAN_BACKUP\archive_%d_lvl0_%U' ĭELETE NOPROMPT archivelog all completed before 'sysdate-7' īackup current controlfile format 'D:\RMAN_BACKUP\bkpcontrol_file.ctl_%d_%T' ĭELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS Here are couple of batch files we will be using for making RMAN backup on Windows. Like cron jobs on Linux environment, for Windows we will use Task Scheduler for RMAN backups. I hardly see many articles explaining such for Windows platform in general.Ĭonsidering you have 11g database already installed
0 Comments
Leave a Reply. |