In this article we will learn DR creation with log shipping :

Prerequisites : Source Database should be in Archive log mode .

Enable Archive Log Mode In Oracle RAC

Details :

Database Name Source DB IP DR DB IP
mgr 192.168.1.10 192.168.1.181

Step 1 : To create log shipping DR server force logging and supplemental logging should be enabled, if not enabled use following command to add force logging and supplemental logging at database level.

Step 2 :  Check size db_recovery_file_dest , it should be set according to your DB size.

Step 3 : Connect with RMAN and set controlfile autobackup on and redundancy as per your requirement.

Step 4 : Take rman backup with backup database command .

We can see here controlfile and spfile backup taken automatically.

Step 5 : Transfer backup to DR server.

Step 6 : Now connect to DR server.

Step 7 : Create necessary directory at DR server to restore database.

Step 8 : Transfer spfile from Source database . Before that as it log shipping server  we need to set user equivalence from DR to Source database .

User equivalence will allow us to password-less login that will help us to set automatic transfer of Archive logs.

Step 9 : Transfer spfile from source database to DR server.

We can see here , rsync has not asked us for password.

Step 10 : Start database in nomount stage.

Step 11 : Login to RMAN :

Step 12 : Restore controlfile from Autobackup :

Step 13 :  Change database stage to mount stage.

Step 14 : Restore database :

Step 15 : Transfer Archive logs generated after taking backup and recover database.

Step 16 : Transfer incremental archive logs from Source to DR and recover using following command :

Give auto when “recover database using backup controlfile ” command ask for it. It will automatically take path of next archive logs.

Now our DR server is all set for log shipping .

We just need to add script to make it Automatic , so it dont need much human intervene.I have added two scripts :

Run this script at Server’s console.

Stay tuned for More articles on Oracle RAC

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel : https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.