Certification insights, news and tips
from the Oracle Certification Program.

  • December 14, 2018

Lin Cong Solves a Major Database Issue With Skills Learned While Preparing for OCM Exam

Brandye Barrington
Sr. Program Manager

There is a little something for everyone in this post written by Lin Cong, Oracle Certified Master! The story begins with sage advice about preparing for the Oracle Certified Master exam. It goes on to give a detailed account of an actual issue solved by Lin (failures and all!) with skills and knowledge gained while preparing for the OCM exam. 

by Lin Cong

Here are some ideas Database Administrators (DBAs) may not have been exposed to without pursuing training and certification:

  • Training and certification can improve your technical skills.
  • Getting an OCM certificate increases your odds of being recognized by the companies in the industry.
  • OCM training is a tough process. Getting the OCM certificate validates your efforts and boosts your confidence.
  • Getting the OCM certificate inspires you to continue learning. OCM represents the highest level of certification in Oracle databases, but I know very well that I don't have all of the corresponding skills, so the only way to avoid hearing things like, ‘Can’t you solve the problem? You're an OCM!’ is to keep learning.

Related:  Liu Denfeng Gives Advice on Beginning Your Own Exciting Journey to OCM Certification

Things learned through OCM prep that will help other DBAs:

  • The nine scenarios in the OCM exam constitute the core skills that an excellent Oracle DBA should have. In OCM prep, you need to connect the individual elements of what you have learned and go through it again systematically.
  • The Oracle official documentation is must-have material in OCM prep. I had not read the official documentation before, but after going through the process of OCM prep, I am now able to solve the problems I encounter in my work and study by referring to the documentation rather than relying on searching the internet. This has saved me much time and effort.
  • Through repeated training, I have memorized the most frequently used commands, so that I do not have to refer to the documentation or the manual, making me seem more professional at work.
  • The biggest reward of OCM prep is not the final certificate but the awareness of the value of persistence. I believe that every OCM trainee of Vastdata Education has experienced the transition from spending over 10 hours on the first scenario to finishing it in less than an hour. Only the participants can understand the hard work required to accomplish that transition. Work hard and get a little closer to your goal every day, and someday you will find that the goal which used to be far away is now within your grasp.

Related:  See How Franck Pachot Stays One Step Ahead With Oracle Certification

Tips for preparing for OCM exams - mentorship-type information:

  • The official documentation is crucial. The answers to all exam questions can be found in the documentation, so it is vital to memorize every concept.
  • Try to remember all the commands. Given the exam's time limit, it is not possible to refer to the documentation for every question.
  • Repeated practice is an absolute necessity; practice makes perfect.
  • Master all the keyboard commands and have a decent knowledge of Linux.
  • Be detail-oriented in your practice. Pay attention to the mistakes you have made, and try to figure out their causes and solutions, as they may come up in the exam.

Use this advice to start your own Oracle Certified Master journey!

QUESTION: How did you solve a business problem using the skills you’ve learned along your professional journey?

A case of production data recovery (where I applied what I have learned in practice for the first time)

  1. Background

On the evening of day "T", I got an unexpected call from the development manager and learned that the operator had accidentally double-clicked on batch processing while running the EOD processes, causing sysdate to switch to T+2 (it should have been T+1). The boss asked if the database could be restored to what it was before the batch processing. Upon hearing this, I felt as if I had momentarily lost my reason . Although I knew that theoretically it could be restored to any point in time, if there was an RMAN full backup with archive logs (I learned this from training courses), but I had never tried it before. I was very nervous.

I designed the disaster recovery system for the company. The specific strategies are as follows:

  • Take an RMAN full backup at 1:00 am every day (including archive logs and control files)
  • Delete archive logs after a successful backup
  • Configure retention policy to a recovery window of 30 days
  • Create two physical standby databases using DataGuard
  • Delete archive logs from the physical databases using the script I wrote, which deletes archive logs daily after they have been applied.
  1. Recovery process


  • Instruct field personnel immediately to stop operations on the database (that had already come a bit late,:another operation had occurred after the error. The right thing to do is to shut down the applications right away to avoid any further change in the data)
  • Make sure that there had been no operations on the production database and that the database was restored to the test environment
  • Establish the specific point in time it needed to be restored to: 19: 49:42
  • Set up a test environment with sufficient disk space

After the preparation, I started the recovery process. The first thing that occurred to me was to immediately take a full backup of the database using RMAN, and then to restore the backup data into the test environment. But this approach turned out to be wrong, because that full backup was taken after the mistaken operation, and the database could not be restored to an earlier point in time using archive logs with the existing data. In other words: if you want to return the database to a specified point in time, you must have a full backup of the database before that time. Therefore, my first trial of database recovery ended in failure.

In my second trial of data recovery, I found the RMAN full backup taken at 1:00 am that day and restored the backup to the test environment.

Production environment: RAC + ASM.

Test environment: single-instance + file system.

  • First, create a parameter file for the test database matching that of the production database (The contents of the parameter file will not be detailed here)
  • Restore the controlfile from a specific backup piece:

  • Mount the database:

  • Specify the catalog for the backup set:

  • Specifying the catalog for archive logs:

  • Restore the database:

  • Relocate database rename file:

  • Open the database:

  • As of 00:00, the database was successfully recovered. 
  1. Conclusion
  • When there is a need to recover the database due to mistaken operations, the applications must be stopped first, and any other operations on the database must be stopped as well, to prevent further issues.
  • The purpose of backup is recovery. No matter how well the backup strategy is written, it is a total waste if it does not work at the time of recovery.
  • Backup and recovery tests should be conducted for a variety of situations on a regular basis. Emergency plans should be prepared and practiced so that there is no disorderly haste at the time of recovery.

Start your own Oracle Certified Master journey!

*This article was provided and authorized by Home of Oracle Certified Master. To reprint, please contact Oracle University and indicate the source.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.