When you migrate or upgrade with refreshable clone PDBs, you sometimes want to decide when the final refresh happens. Perhaps you must finish certain activities in the source database before moving on.
Here’s how to do that in AutoUpgrade.
The Final Refresh Dilemma
In AutoUpgrade, the final refresh happens at the time specified by the config file parameter start_time.

You specify start_time in the config file, but once you start the job, you cannot change it. Remember that you normally start AutoUpgrade a long time before start_time to allow the creation of the new PDB.
In some situations, you want more control. You might want to finish some work on the source database before AutoUpgrade starts the final refresh. Perhaps you need to kick users off or coordinate activities with other teams.
In that case, a fixed start time is not very flexible.
The Solution
Update: Check out the new proceed command.
Imagine my downtime window starting on Saturday, 30 November, 02:00.
At that time, I need to ask the application team to shut down the applications in the database, I need to run certain pre-migration tasks, and finally kill sessions if needed. So, I don’t want AutoUpgrade to start at 02:00 – I want to decide at which point after 02:00 that AutoUpgrade should start.
Here’s my approach
- I create a config file and set the
start_timeparameter to the start of my downtime window.upg1.start_time=30/11/2024 02:00:00 - I start AutoUpgrade in deploy mode before my downtime starts:
java -jar autoupgrade.jar -config ... -mode deploy- I must start well before the downtime window so AutoUpgrade has enough time to copy the database.
- Imagine my tests show it takes around four hours to copy the database. I decide to start on Friday, 29 November, 16:00, so the copy should end around 20:00 – well enough time before my downtime window.
- AutoUpgrade now starts the CLONEPDB phase:
+----+-------+--------+---------+-------+----------+-------+---------------------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE| +----+-------+--------+---------+-------+----------+-------+---------------------------+ | 100| TEAL|CLONEPDB|EXECUTING|RUNNING| 02:00:00| 4s ago|Creating pluggable database| +----+-------+--------+---------+-------+----------+-------+---------------------------+- Note the START_TIME value. It is the time when the final refresh happens.
- I wait for AutoUpgrade to create the PDB and enter the REFRESHPDB phase:
+----+-------+----------+---------+-------+----------+-------+----------------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS|START_TIME|UPDATED| MESSAGE| +----+-------+----------+---------+-------+----------+-------+----------------------+ | 100| TEAL|REFRESHPDB|EXECUTING|RUNNING| 02:00:00| 2s ago|PDB TEAL was refreshed| +----+-------+----------+---------+-------+----------+-------+----------------------+ - Then I stop the job:
upg> stop -job 100- If I exit AutoUpgrade after stopping the job, don’t worry. As soon as I restart AutoUpgrade, it will pick up from where it left and continue with the job.
- When I stop the job, there is no periodic refresh. I should refresh the PDB in the target CDB manually at regular intervals:
SQL> alter pluggable database teal refresh;- If I don’t perform any periodic refresh, the redo will accumulate, and the final refresh will take longer. Keep the final refresh shorter by refreshing more often.
- After the start of my downtime window (the
start_timeparameter), when I’m done on the source database and want to proceed with the final refresh, I resume the job in AutoUpgrade.upg> resume -job 100 - AutoUpgrade now realizes it is past the defined
start_timeand immediately moves on with the final refresh and the rest of the job.
Wrapping Up
Ideally, AutoUpgrade should offer better control over the process. We have a task on our backlog to come up with a better solution.
Update: Use the proceed command in AutoUpgrade to control the start time
However, refreshable clone PDBs are still a fantastic method for non-CDB to PDB migrations and for upgrades of individual PDBs.
There are a few quirks to be aware of, and if you are using Data Guard bear in mind that you can only plug in with deferred recovery. Other than that – it’s just to say…
Happy Migrating!
Further Reading
- A Few Details about Using Refreshable Clone PDB for Non-CDB to PDB Migration
- Upgrade Pluggable Database to Oracle Database 23ai
- How to Upgrade to Oracle Database 19c and Migrate to a PDB Using Refreshable Clone PDBs
- Move to Oracle Database 23ai – Everything you need to know about Oracle Multitenant – Part 1
- Hey, Let Me Kill Your Network!













