How To Synchronize Applications

How To Synchronize Applications

September 27, 2021 Off By dianarobete

In previous blog post we talked about maintenance in the application root container. If you remember, I mentioned that the changes you deploy to the application root, will not be applied on the application PDBs. If you install/upgrade/patch the application root container, these changes will not get propagated to the application PDBs.

The application PDBs will synchronize with the root container when the DBA manually issues the sync command. This is a manual operation, that must be explicitly issued by the DBA. Before issuing the sync command, you must connect to the application PDB, where you want the sync to happen. When you synchronize the application PDB, you can synchronize to a specific patch number or version number. You can also synchronize multiple applications at once. The main command to use is:

alter pluggable database application <application name> sync;

Here is an example:

--connect to the application PDB you want to synchronize
alter session set container=app_pdb1;

--snchronize the application 
SQL> alter pluggable database application hr_app sync;

One thing to keep in mind: Application Containers should always be setup as OMF. When you create the application container, it will not error out or fail if you don’t use OMF. However, if you create a tablespace inside the application root container, you will never be able to sync the application PDB with the application root, as you will get the following error: ORA-01537

alter pluggable database application hr_app2 sync
ERROR at line 1:
ORA-01537: cannot add file 'C:\ORACLE\ORADATA\TESTDB\APP_CONT2\hr_app_data.dbf'
- file already part of database

So far we covered the application containers and the operations we can perform. In the next post, I want to walk you through an exercise/demo from start to end, where we create the application container, run some maintenance, and sync the application PDBs. Stay tuned for more!

If you enjoyed this article, and would like to learn more about databases, please sign up to my weekly email, and you will receive my FREE guide: 7 Questions to Ask When Troubleshooting Database Performance Problems!

If you are interested in improving your Oracle Tuning skills, check out my course theultimatesqltuningformula.comFollow the link to get the Fall Special, only $16.99 CAD !