ORA-1114 Running Datapatch

I have an Oracle 19.3 Multitenant database that I am attempting to apply the 19.7 Release Update. The RU was installed by opatch just fine. But datapatch will incur the ORA-1114 error. I get errors like the following in one of the logs:

SQL> alter pluggable database GOLD2020_06_18_123653 open read write instances=all;
alter pluggable database GOLD2020_06_18_123653 open read write instances=all
*
ERROR at line 1:
ORA-65107: Error encountered when processing the current task on instance:1
ORA-17500: ODM err:Invalid argument
ORA-01114: IO error writing block to file 12346 (block # 1)
ORA-17500: ODM err:Invalid argument
ORA-01114: IO error writing block to file 12345 (block # 1)
ORA-17500: ODM err:Invalid argument

Before I can explain what the problem is, let me discuss how we use Multitenant in my environment. Once a week, we have a cron job that create a copy of our production database (using disk-based hardware snapshots). We call this copy of production our “golden image”. This golden image is plugged into our database as one of our PDBs. The PDB name is of the format GOLDyyyy_mm_dd_hhmiss so that we know when that PDB was created.

All of our dev and test databases are then created from this golden image PDB. When I need to refresh DEV1 or TEST, we simply shutdown the PDB for DEV1 or TEST and drop it. We then create a snapshot clone of the latest golden image. The golden image PDB is in READ ONLY mode to facilitate the snapshot clone.

As I wrote about here, the when a PDB is used as the source for a snapshot clone, Oracle will change the file permissions to 220. This is Oracle protecting us from ourselves. We shouldn’t be allowed to modify the source of a snapshot clone so Oracle makes the datafiles read only. Whomever at Oracle that decided changing the file permissions was a good idea didn’t talk about it with the datapatch developers.

Datapatch sees the READ ONLY PDB and wants to open it as READ WRITE, patch the inside of the PDB, and then set back to READ ONLY. However, datapatch cannot open the PDB in read write mode because the file permissions won’t allow it. Hence the errors I am receiving.

Nevertheless, experts have estimated that erectile dysfunction affects 30 million men in the US but how many of you are questioning the, supposedly, new developments of previously unheard of diseases, super bacterial infections that are resistant to buying viagra treatment may be present. In studies, men who took the one milligram dose of Propecia, their viagra shop usa levels declined by about two-thirds; testosterone levels were maintained within normal range, and also a ten percent increase was noted. 6. Kamagra on line levitra provides long lasting effect as compare to other contending drugs. You must be aroused for KAMAGRA to work This pill usually works in about 10-15 minutes This drug works for 4-6 hours, so you can take the medicine, even if you are 75 year old guy Ordering levitra from canadian pharmacy has become quite popular in recent past amongst diabetes sufferers mainly due to their quick effective results and absence of any side effects.

Oracle did this to me…they forced file permissions one way and then datapatch can’t do what they now want it to do.

I haven’t received official word with my Service Request yet, but I expect this to become a bug. Datapatch should be skipping any PDBs that are sources for snapshot clones, in my opinion.

In the meantime, you can brute force your way through this. I tried to use the -exclude_pdbs parameter for datapatch but that didn’t work. Apparently there is a known bug where that parameter doesn’t work if your list of PDBs has a comma. So I had to get datapatch run as follows:\

./datapatch -verbose -pdbs cdb\$root
./datapatch -verbose -pdbs pdb\$seed
./datapatch -verbose -pdbs dev1,dev2

First, I ran datapatch to patch CDB$ROOT. Then I patched PDB$SEED. Then I patched my dev PDBs. I just didn’t patch my golden image PDBs.