Tuesday, February 20, 2024

Logfiles In OCI - Part 1

 This post will dive into what can turn into an intimidating and frustrating topic - troubleshooting failures in OCI.  While it is fantastic that you can literally "press a button" and create a database, what happens when that action fails?  

You can actually create a dataguard copy of an existing OCI database using the console.  We will delve into the exact steps to do so separately.  However, in one case, after building several dataguard instances successfully, we recieved the message "Dataguard Build Failed - Contact Oracle Support".  

If you do this action, you will be prompted to open a support request.  The process to work through the request will involve collecting logs and other information.  To save time, there is documentation which will show you the information Oracle will need to help troubleshoot the issue.  Reading these documents yourself might just pinpoint the problem!

Logfiles for OCI operations will be created in addition to the general information contained in the Oracle alert logs and normal database locations.  

For example, OCI dataguard processing first step is the deployer, and it's logfiles will be located in the following directory on the target server:

/var/opt/oracle/log/<dbname>/dgdeployer/dgdeployer.log

The deployer will call the dbaasapi utility, and it's logs will appear in:

/var/opt/oracle/log/dbaasapi/db/dg/<job_ID>.log

Look for entries that contain dg_api.  A primary and standby log should be found in this location.

Any additional standby logs will be located here:

/var/opt/oracle/log/<dbname>/dgcc/dgcc.log

The "Oracle Cloud Deployment Engine" will also generate operational logs.  These will be located in:

/var/opt/oracle/log/<dbname>/ocde/ocde.log

Also, a Data Guard configuration log file is in:

/var/opt/oracle/log/<dbname>/dgcc/dgcc.log.

Each node of a RAC system will need to be reviewed and these logs will need to be examined and collected (if present) from all of them.  

These logs are in addition to standard database logs such as the alert log, trace files, and perhaps listener and sqlnet logs, as dataguard build are typically network-related.  


I know this is complicated, and daunting.  Oracle support may be needed to unravel the more complex situations.  The "dbaascli diag collect" utility can bundle needed artifacts from a failed process.   You may be asked by Oracle to collect these, as well as AHF and other log collection tools.


The next post will cover some of the issues and solutions associated with dataguard builds.  Just knowing where to look for analyzing the problem is a good first step!