Following my advice, a customer migrated a database to multitenant using refreshable clone PDB. The CDB was on the same host as the non-CDB.
When we prepare the migration and create the refreshable clone, the users can no longer connect to the source database.
The users were getting ORA-01109: database not open when connecting to the source database.
But this was before the final refresh and before the migration was supposed to happen.
Why did the refreshable clone PDB interfere with operations in the source database?
The Details
The customer has a non-CDB called SALES, which they wanted to migrate into CDB1. They wanted the PDB to keep the original name, SALES.
Any database registers a default service at the listener. The name of the default service is the same as the name of the database.
In this case, the non-CDB registered the sales service:
$ lsnrctl status
Service "sales" has 1 instance(s).
Instance "SALES", status READY, has 1 handler(s) for this service...
The customer used AutoUpgrade for the migration. When preparing for the migration, they started in deploy mode, and AutoUpgrade created the refreshable clone.
Bear in mind that these steps are preparations only. The switch to the PDB should happen at a later time.
Look what happens to the listener:
$ lsnrctl status
Service "sales" has 2 instance(s).
Instance "CDB1", status READY, has 1 handler(s) for this service...
Instance "SALES", status READY, has 1 handler(s) for this service...
The CDB also registers a sales service. It does so because of the refreshable clone PDB with the same name.
The users were connecting to the default service, sales. The listener handed off the connections to the CDB, not the non-CDB.
Since the PDB was still a refreshable clone PDB, it was not open, and users received ORA-01109: database not open.
Besides that, the refreshing process didn’t work either. The refresh of the PDB happens over a database link to the source database. Guess what happened?
2025-05-09T07:25:58.854934+00:00
Errors in file /u01/app/oracle/diag/rdbms/cdb19/CDB19/trace/CDB19_ora_61633.trc:
ORA-17627: ORA-01109: database not open
ORA-17629: Cannot connect to the remote database server
ORA-17627 signalled during: ALTER PLUGGABLE DATABASE FTEX REFRESH...
Yes, it couldn’t connect to the source database either. It ended up trying to connect to itself.
Optimal Solution
The real problem is the connections to the default service, sales. The service with the same name as the database.
This service is not meant for general use. You should create your own service and have your application connect through that.
Why is using default services a bad idea?
- You can’t customize the default service.
- The default service is for administrative use only.
- You easily end up with collisions like this one. This can also happen with two PDBs in different CDBs on the same host.
- If you rename the database, you also rename the default service and have to update all connection strings.
Why are custom services a good idea?
- Custom services allow you to set many attributes. While this might not be important for a single-instance database, it is essential for Data Guard and RAC.
- When you clone a database, a custom service doesn’t follow with it. You have to create the services in the clone when and if it is appropriate.
You can create custom services using DBMS_SERVICE or srvctl. You can find more about that in a previous blog post.
Other Solutions
Other feasible solutions exist, but none of them address the real issue, which I believe is the use of the default service.
- Rename the PDB so it creates a default service with a different name. After migration, you can rename it.
- Create a static listener entry that forces the listener to route connections to the non-CDB. However, static listener entries are really not nice, and you should use dynamic registration whenever possible.
- Create a second listener for the CDB. That’s just cumbersome.
Recommendation
-
Keep using refreshable clone PDB for migrations. It’s a great way to migrate, patch, or upgrade databases.
-
Always create your own custom service. Don’t use the default service.










