Oracle Database 21c Creation via DBCA hangs at 36%


I installed Oracle Database 21c on Windows 10 successfully.

See the following video for the detailed installation steps:

After that I tried to create a sample database using the dbca (Database Configuration Assistant), but it hangs at 36%, as indicated in the following screen shot:

If we examined the dbca log file:

We will find that the dbca is stuck while executing the datapatch.bat program:
[CloneDBCreationStep.executeImpl:890]  executing datapatch D:\app\db21c\OPatch\datapatch.bat

If we examined the database alert.log file, we will not find any errors there:

I examined the running sessions on the database, there is no active sessions.
There is no heavy load on the server (in terms of memory and cpu utilization).
I’m running the dbca from an “Administrator” command window.
The login user is part of the ora_dba group.
I tried to login with the Adminstrator user, but no difference.
I stopped the firewall and antivirun, no difference.
I tried to use different database templates while running the dbca, same issue.
I modified the cpu_count initialization parameter to be 1 (to avoid a similar bug), but it didn’t help.
I left the dbca running for a couple of hours, no activity.
I generated the database creation scripts from the GUI dbca and run them from command window, still the same hang issue.

I run the dbca in the silent mode, same issue:

I cancelled the dbca and tried to run the datapatch.bat manually, it stuck also.

After two days of investigation, I was not able to identify the root cause of this issue, but I noticed that:
1- The issue is related to the datapacth script not the dbca.
2- From the datapatch log files, I found that the last line is:
D:\app\afattah21c\homes\OraDB21Home1\cfgtoollogs\sqlpatch\sqlpatch_19528_2021_10_23_04_47_14\sqlpatch_catcon__catcon_19528_exec_DB_script.done not found
3- I found that the datapacth is using the windows command “type” heavily.
4- Also, I noticed something strange with the “type” command. If I issue the following command:
type nul > sqlpatch_catcon__catcon_19528_exec_DB_script.done
The command is working fine but the file is not created, may be due to the existance of a another file in the same directory called: sqlpatch_catcon__catcon_19528_exec_DB_script.sql
but if you executed the same command with any other file name, like:
type nul > sqlpatch_catcon__catcon_19528_exec_DB_script_1.done
The file is get created successfully.

I know that “type” is an internal windows command (there is no type.exe), but when I issued the following command:
which type => I found that I have another type program in the path, that the related to one GNU Emulator:

At the same time, I found a nice post from Conner Mcdonald, that explains the difference when you run the “type” command directly from the command window and when you run it from “sqlplus host command”:

The HOST command in SQL*Plus and SQLcl

So, it is now very clear that the problem is mainly environmental, due to the existance of this addtional “type” command in the PATH.

Solution is very simple: You may remoave this program from the PATH variable, or rename it or even uninstall this emulator.

After fixing this issue, I run the dbca again successfully with out any issue:

Some other recommendations:

Always run the dbca from “Administartor” command window, using the following option (to avoid some other errors):
dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false

Before launching the dbac, ensure that you have a clean PATH & CLASSPATH variables (remove any un-needed references).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s