Moneycontrol Brokerage Recos

Sunday, November 29, 2026

Creating an Oracle 19c RAC Database Using DBCA-Generated Scripts on Exadata

Oracle 19c   /   RAC   /   Exadata

A practical, hands-on alternative to standard DBCA provisioning when the graphical interface hangs or silent creation rolls back at the final stage.

Key takeaway: Prepare and execute the generated master scripts on the remote RAC nodes first, then execute the master script on the designated local creation node. This was the sequence that worked in my environment.

Introduction

Oracle Database Configuration Assistant (DBCA) is the preferred utility for creating and configuring Oracle databases. It provides both graphical and silent-mode interfaces to simplify database provisioning.

However, there are situations where DBCA fails during initialization or post-creation configuration, preventing successful database provisioning despite the underlying database creation operations having completed.

I recently encountered such a scenario while provisioning an Oracle 19c RAC database on an Oracle Exadata X8M Database Machine.

The DBCA graphical interface was consistently hanging at the Loading Configuration Driver stage. Although silent-mode database creation progressed further, it eventually failed with the following error during post-creation configuration:

[FATAL] ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Unfortunately, DBCA initiated an automatic rollback and removed the newly created database, resulting in the loss of the completed database creation work.

After extensive troubleshooting and research, I successfully provisioned the RAC database using an alternative approach: generating database creation scripts through DBCA and executing them manually in the correct sequence.

This article describes the procedure that worked successfully in my environment.

1. Environment details

Component Configuration
Engineered system Oracle Exadata X8M
Virtualization Oracle Linux KVM
Operating system Oracle Linux
Grid Infrastructure Oracle 19c
Database version Oracle 19c
Database architecture Non-CDB
Database configuration Two-node Oracle RAC
Storage Oracle ASM
Database template General_Purpose.dbc
Creation method DBCA-generated scripts

For demonstration purposes, the following generic database and node names are used throughout this article:

Component Name
Database name RACDB
Instance 1 RACDB1
Instance 2 RACDB2
RAC node 1 racnode01
RAC node 2 racnode02
ASM data disk group +DATA
ASM recovery disk group +RECO
Script destination /tmp/racdb_scripts
Local creation node racnode02

2. Why use DBCA-generated scripts?

The traditional silent-mode database creation command is:

dbca -silent -createDatabase -responseFile /tmp/dbca.rsp

While this method automates the complete database creation process, a fatal error during the final configuration stage can initiate an automatic rollback.

An alternative is to use the DBCA generateScripts operation.

Instead of directly creating the database, DBCA generates the required shell scripts, SQL scripts, initialization parameter files and database restoration scripts.

These generated scripts can then be executed manually.

The main advantages of this approach are:

  • Greater control over database creation.
  • Improved visibility into individual database creation operations.
  • Ability to troubleshoot failures at specific stages.
  • Reduced dependency on the DBCA graphical interface.
  • Ability to avoid the normal DBCA automated creation rollback workflow.
  • Easier identification of database creation and configuration issues.

3. Step 1 — Prepare the DBCA response file

The first step is to prepare a DBCA response file containing all necessary database configuration parameters.

The default response file template is available at:

$ORACLE_HOME/assistants/dbca/dbca.rsp

Create a separate response file:

umask 077
cp "$ORACLE_HOME/assistants/dbca/dbca.rsp" /tmp/racdb.rsp

Restrict access because the response file may contain database and ASM credentials:

chmod 600 /tmp/racdb.rsp

Update the response file according to the database provisioning requirements.

The important parameters include:

gdbName=RACDB
sid=RACDB

databaseConfigType=RAC

nodelist=racnode01,racnode02

templateName=General_Purpose.dbc

createAsContainerDatabase=false

storageType=ASM

datafileDestination=+DATA

recoveryAreaDestination=+RECO

useOMF=true

characterSet=AL32UTF8

nationalCharacterSet=AL16UTF16

emConfiguration=NONE

registerWithDirService=false

Additionally, configure the required parameters for:

  • SYS and SYSTEM credentials.
  • ASM credentials, where required.
  • SGA and PGA allocation.
  • Database initialization parameters.
  • Database character set.
  • Redo log configuration.
  • Recovery area size.
  • Instance-specific undo tablespaces.
  • Database storage and recovery requirements.

The exact values should be determined according to the customer-approved database provisioning specifications.

4. Step 2 — Generate database creation scripts

Log in as the Oracle software owner on the RAC node designated for initial database creation.

In this example, the database creation scripts are generated on RAC node 2.

Verify the Oracle environment:

whoami
hostname
echo $ORACLE_HOME

Create the script destination directory:

umask 077

mkdir -p /tmp/racdb_scripts

chmod 700 /tmp/racdb_scripts

Execute DBCA in silent mode using the generateScripts operation:

$ORACLE_HOME/bin/dbca -silent \
-generateScripts \
-responseFile /tmp/racdb.rsp \
-templateName General_Purpose.dbc \
-gdbName RACDB \
-scriptDest /tmp/racdb_scripts

Once script generation completes successfully, verify the generated files:

cd /tmp/racdb_scripts

ls -ltr

Depending on the database template, architecture and Oracle release, DBCA may generate files similar to the following:

Generated file Purpose
RACDB.sh Master shell script
RACDB.sql Master SQL execution script
init.ora Database initialization parameters
CloneRmanRestore.sql Seed database restoration workflow
rmanRestoreDatafiles.sql RMAN datafile restoration
cloneDBCreation.sql Control file creation and database recovery
postScripts.sql Additional database configuration
postDBCreation.sql Post-creation operations
CreateClustDBViews.sql RAC-specific database configuration
lockAccount.sql Database account configuration
tempControl.ctl Temporary control file used during cloning

The actual filenames and number of generated files may vary.

Review the master shell script before proceeding. The example below uses RACDB.sh; if DBCA generates an instance-specific name such as RACDB1.sh or RACDB2.sh, use the exact file designated for that node.

5. Step 3 — Copy and execute scripts on remote RAC nodes

This is the most important step in the entire procedure.

In the generated workflow used in this implementation, the remote RAC nodes had to be prepared before executing the physical database creation workflow on the local creation node. Confirm the same dependency in your generated scripts.

In my environment, the scripts were generated on RAC node 2. Therefore, RAC node 1 was the remote node.

Copy the complete generated script directory from the local node to the remote RAC node.

Execute from RAC node 2:

scp -rp /tmp/racdb_scripts oracle@racnode01:/tmp/

Log in to RAC node 1:

ssh oracle@racnode01

Verify the Oracle environment:

hostname

echo $ORACLE_HOME

Navigate to the generated script directory:

cd /tmp/racdb_scripts

Identify the generated master shell script:

ls -l *.sh

Verify its contents and syntax before execution:

bash -n RACDB.sh

Execute the generated master shell script:

chmod u+x RACDB.sh

./RACDB.sh

For a RAC cluster containing more than two nodes, repeat this procedure on all remote RAC nodes, using the corresponding generated instance script where applicable.

The remote-node execution performs the node-specific preparation defined in the generated script.

Allow each remote-node script to complete successfully before proceeding.

6. Step 4 — Execute the master script on the local creation node

Once the generated master shell script has completed successfully on all remote RAC nodes, return to the node where the scripts were originally generated and where physical database creation is designated to occur.

In this example, RAC node 2 is the local creation node.

ssh oracle@racnode02

Verify the environment:

hostname

echo $ORACLE_HOME

Navigate to the script directory:

cd /tmp/racdb_scripts

Execute the generated master shell script:

./RACDB.sh

Monitor the script execution and review the generated logs.

In my implementation, executing this master script completed the end-to-end RAC database creation process, including:

  • Database initialization.
  • Password file creation.
  • RMAN seed database restoration.
  • ASM datafile creation.
  • Control file creation.
  • Database recovery and opening.
  • Database configuration.
  • Shared SPFILE configuration.
  • RAC database registration using SRVCTL.
  • RAC instance registration.
  • Database post-creation activities.
  • SQL patch application using datapatch.

No separate execution of the individual database creation SQL scripts was required.

7. Understanding the execution sequence

The successful execution sequence was:

OrderActivityExecution location
1Prepare DBCA response fileCreation node
2Generate scriptsCreation node
3Copy generated filesAll remote nodes
4Execute master shell scriptsRemote nodes first
5Verify remote preparationAll remote nodes
6Execute local master scriptCreation node last
7Complete physical database creation, RAC configuration and post-creation tasksCreation node
8Validate database and application connectivityAll nodes

The key takeaway is that the local creation node does not necessarily have to be RAC node 1.

In my case, the database creation scripts were generated on RAC node 2, and physical database creation was completed from that node after preparing RAC node 1.

Always review the generated script to confirm the designated creation node and its node-specific execution logic.

8. A common mistake — Executing individual SQL scripts directly

During the initial troubleshooting, I attempted to execute the following script independently:

@cloneDBCreation.sql

This resulted in SQL*Plus prompting for substitution variables:

Enter value for file0:
Enter value for file1:
Enter value for file2:
Enter value for file3:

These variables represent the database datafile mappings required during control file creation.

In an ASM-based database using Oracle Managed Files, these values must correspond to the actual restored datafiles.

Providing a tablespace name or an arbitrary ASM filename can cause control file creation to fail.

This happens because the generated scripts are interdependent.

The preceding restoration workflow creates the datafiles and prepares the required mappings before the control file creation script is executed.

The generated master shell script coordinates these operations in the intended execution sequence.

Therefore, do not execute individual database creation SQL scripts independently unless you fully understand their prerequisites and dependencies.

Executing the generated master shell script in the correct node order resolves this dependency problem.

9. Step 5 — Validate the newly created RAC database

After successful execution of the master script, perform comprehensive database validation.

Verify Clusterware registration

srvctl config database -db RACDB

Verify RAC database status

srvctl status database -db RACDB -verbose

Verify database instances

srvctl config database -db RACDB
crsctl stat res -t

Verify database status

Connect to the newly created database:

sqlplus / as sysdba
SET LINES 200
SET PAGES 100

SELECT name,
       db_unique_name,
       open_mode,
       database_role,
       cdb,
       log_mode
FROM v$database;

Verify all RAC instances

SELECT inst_id,
       instance_name,
       host_name,
       status,
       database_status,
       startup_time
FROM gv$instance
ORDER BY inst_id;

Verify ASM datafiles

SELECT file#, name
FROM v$datafile
ORDER BY file#;

Verify SPFILE configuration

SHOW PARAMETER spfile
SHOW PARAMETER cluster_database

Verify redo threads

SELECT thread#, status, enabled
FROM v$thread;

Verify undo tablespaces

SELECT tablespace_name, status
FROM dba_tablespaces
WHERE contents = 'UNDO';

Verify Oracle database components

SELECT comp_id,
       comp_name,
       version,
       status
FROM dba_registry
ORDER BY comp_id;

Verify datapatch execution

SELECT patch_id,
       action,
       status,
       action_time,
       description
FROM dba_registry_sqlpatch
ORDER BY action_time DESC;

Verify invalid objects

SELECT owner, COUNT(*) AS invalid_objects
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner
ORDER BY owner;

Verify listener registration

srvctl status listener

srvctl status scan_listener

lsnrctl services LISTENER

From SQL*Plus:

SELECT inst_id, name, network_name
FROM gv$active_services
ORDER BY name, inst_id;

Complete application connectivity, backup, monitoring and customer-specific validation before handing over the database.

10. Traditional DBCA versus DBCA-generated scripts

Feature Traditional DBCA DBCA-generated scripts
Graphical interface required Optional No
Silent-mode support Yes Yes
Automated database creation Yes Through generated master scripts
Execution control Limited Greater
Troubleshooting visibility Moderate High
Automatic DBCA rollback Possible Normal DBCA creation workflow avoided
RAC configuration Automated Per generated script workflow
ASM support Yes Yes
Post-creation configuration Automated Per generated scripts
Suitable for troubleshooting failed provisioning Moderate Useful alternative

11. Lessons learned

This implementation highlighted several important lessons:

  • A DBCA graphical interface failure does not necessarily prevent database provisioning.
  • DBCA-generated scripts provide an alternative database creation approach.
  • The generated master shell script is the entry point for the coordinated creation workflow.
  • Remote RAC nodes must be prepared first in the demonstrated execution model.
  • Physical database creation should occur only once against shared ASM storage.
  • Individual SQL scripts should not be executed without understanding their dependencies.
  • RAC node numbering does not determine which node must perform physical database creation.
  • Successful database creation must always be followed by comprehensive infrastructure and database validation.

Conclusion

Creating an Oracle 19c RAC database using DBCA-generated scripts proved to be an effective alternative when the standard DBCA creation workflow repeatedly failed.

The solution was surprisingly straightforward once the correct execution order was established:

  1. Prepare the DBCA response file.
  2. Generate database creation scripts using DBCA silent mode.
  3. Copy the generated scripts to all remote RAC nodes.
  4. Execute the master shell script on the remote RAC nodes first.
  5. Execute the master shell script on the local database creation node.
  6. Validate the newly created RAC database.

In my Exadata X8M environment, this approach successfully completed database provisioning, including password file creation, RAC registration, instance configuration and datapatch execution.

For Oracle DBAs managing mission-critical RAC and Exadata environments, understanding this alternative provisioning method is valuable, particularly when troubleshooting complex DBCA failures.

References


This article is based on a successful hands-on implementation on Oracle Exadata X8M with Oracle Database 19c RAC and ASM storage. The generated script contents and automated operations may vary depending on the Oracle release, patch level, database template and environment.

Tags: Oracle Database, Oracle 19c, Oracle RAC, Exadata, ASM, DBCA, Database Administration, Oracle DBA, Database Provisioning, Troubleshooting