Oracle VM / Azure Backup / Application Consistent/ Script to monitor when database is running/frozen

New Contributor

Hello everyone, I’ll need help with a technical context.
I have a Linux 7/ Azure VM "Oracle DB" on which I test Microsoft Azure Backup (without Azure File Share for Point-in-Time recovery)

My Oracle database is running.
I have my /etc/azure/workload.conf (by default)
My json file with VMSnapshotPluginConfig.json in the directory. (

Azure Portal :
• Snapshot : 8 minutes
• Application Consistent : 4 

Screenshot 2022-11-16 005517.jpg

Screenshot 2022-11-16 005819.jpg

I want to know when the Oracle database is frozen (8 minutes seems long)
I find nothing concrete in the logs of the Linux VM (directory alert.log)

I saw this Github repo that allowed you to customize the script with output codes : 
With a command sh -x, I saw : 
[root@VM2-Test /]# sh -x /scripts/
+ config_file_path=
+ pre_or_post=
+ success=0
+ error=1
+ warning=2
+ status=0
+ log_path=/config_error.log
+ '[' -eq 0 ']'
/scripts/ line 15: [: -eq: unary operator expected
+ '[' -a ']'
+ .
/scripts/ line 21: .: filename argument required
.: usage: . filename [arguments]

I believe that I have missing elements in my code and that in addition, I will not have the times when the database is started/ frozen/ stopped. :facepalm:

If anyone can help me with my problem, that would be nice :lol:

I also saw this way to collect times I want but I'm not sure to query correctly after setting up. 
sqlplus / as sysdba
SQL> CREATE PROCEDURE sysbackup.azmessage(in_msg IN VARCHAR2)
v_timestamp VARCHAR2(32);
INTO v_timestamp FROM DUAL;
DBMS_OUTPUT.PUT_LINE(v_timestamp || ' - ' || in_msg);
END azmessage;

Any assistance would be most welcome.
Have a good day ! 

3 Replies

@OlivierII - the documentation for setting up app-consistent Oracle database backups with Azure VM Backup (HERE) contains a lot of extraneous and unnecessary information, which I need to edit.


But it also contains correct information, specifically in the following sections...

  1. Set up Azure Files Storage for the Oracle archived redo log files

  2. Prepare the databases

    • steps 1-8 are important, but I have no idea why step 9 exists...
  3. Prepare the environment for an application-consistent backup

  4. Set up application-consistent backups

  5. Trigger an application-consistent backup of the VM


From here on, the documentation goes a little crazy.  Most of the tasks listed in the section entitled "Restore the VM" are irrelevant because the documentation is attempting to describe a use-case involving restoring each individual disk in the VM instead of simply using the Azure Portal functionality to restore the entire VM in one action.  Why the documentation goes off on this tangent, I can't imagine, so I apologize for that.


My recommendation is to resume testing restore/recovery of a VM (and database) from...


  1. Recover the VM
  2. Recovery after complete VM restore


I wouldn't recommend using more of the page than that, though there are some interesting bits in the unnecessary use-cases that the documentation is trying to describe.


Last, I strongly recommend looking at the AzBackup folder in Github HERE.  This folder consists of a sub-folder containing three training videos and a shell script named "".  The three videos are fairly brief (i.e. about 10 mins each) and the first two describe the setup of Azure VM Backup for app-consistent Oracle database backups.  The third video displays a use-case of restoring a new VM (a.k.a. cloning a VM) from an Azure VM Backup, then using that clone to execute the Oracle RMAN command "backup validate" to detect corrupted blocks within the cloned database.  The "" script is intended for troubleshooting installations of Oracle database with Azure Backup, and is described in more detail in the README of the folder.


Hope this helps...



Hello @TimGormanTech 
Thank you for your detailed answer, it’s very helpful.

I tried to work around the problem by doing a script. sh pre and post with only a date return of the snapshot execution. (VMSnapshotPluginConfig.json)

I have the values I’m interested in.

The idea was to see if the time displayed in the Azure portal (8:36) was the "freeze" time of the Oracle database. It seems that no, the time gap for the snapshot is 13 seconds on average.

I take this opportunity to test Azure Resource Graph Explorer and KQL requests in general to list all the VMs that have an Oracle database.
Or that would allow me to return the status "Application Consistent"
Screenshot 2022-11-18 121249.jpg


For database PaaS services, no worries, ARG has the right section.
But because the Oracle database is embedded in my vm, it's another Compute query, I think.

Screenshot 2022-11-18 121518.jpg



I thought I should look for "Snapshot" and make the right request, but I’m running out of ideas..
And I’m just getting started in my KQL learning

Screenshot 2022-11-18 121756.jpg

If you have an idea, I am listening :)

You're way ahead of me in KQL and Kusto. I'm just trying to make the flood of Oracle workloads moving into Azure more successful, and that is taking up every second of my workday.

I will say that Oracle databases do not figure into any ARM metadata. As far as Azure is concerned, the Oracle database is just an anonymous application within the VM. I'm sure the best you can do is monitor a VM and the storage attached to it.