Skip to content

SingleInstance 23.26.1: fix standby/clone database creation (DBT-05514, DBT-16141) - #3110

Open
fmnapoli wants to merge 1 commit into
oracle:mainfrom
fmnapoli:fix-standby-clone-dbca-stdin
Open

fmnapoli wants to merge 1 commit into
oracle:mainfrom
fmnapoli:fix-standby-clone-dbca-stdin

Conversation

@fmnapoli

Copy link
Copy Markdown

Fixes #3109.

Problem

The standby/clone path of OracleDatabase/SingleInstance/dockerfiles/23.26.1/createDB.sh cannot succeed with the 23.26 dbca, for two stacked reasons:

  1. dbca -createDuplicateDB prompts on stdin for the remote (primary) SYS password and then for the new database's SYS password. It ignores the sysPassword= entry in the -responseFile the script generates, and it ignores -useWalletForDBCredentials for the remote credential. Since the script feeds nothing on stdin, dbca reads EOF three times and aborts with DBT-05514 within seconds.
  2. With credentials fixed, dbca then fails with DBT-16141: it requires listener information, which the standby/clone invocations do not pass (unlike the -createDatabase path in the same script, which passes -createListener LISTENER:1521).

Full analysis and reproduction (plain docker, public database/free image) in #3109.

Fix

Minimal and consistent with patterns already in the file:

  • Feed both passwords to dbca via a heredoc — the same pattern the TrueCache path already uses (<<EOF ${ORACLE_PWD} ... EOF), converting the || cat chain to the [ $? -eq 0 ] || cat ... || cat ... form used there.
  • Add -createListener LISTENER:1521 to the two -createDuplicateDB invocations — the same listener the -createDatabase path creates.

Verification

Executed end-to-end with container-registry.oracle.com/database/enterprise:23.26.1.0 in plain docker:

  • Primary created with ENABLE_ARCHIVELOG=true / ENABLE_FORCE_LOGGING=true; remote SYSDBA over the network verified with sqlplus.
  • Standby container running this patched createDB.sh (STANDBY_DB=true, PRIMARY_DB_CONN_STR=<primary>:1521/ORCL, ORACLE_SID=ORCLSB): dbca duplicated the primary and the instance came up as PHYSICAL STANDBY / READ ONLY, ending with DATABASE IS READY TO USE!.
  • The same setup with the unpatched script fails within seconds with DBT-05514.

Note: OCA signature is in progress (evaluating individual vs. company agreement) — the OCA bot flag is expected for now.

…141)

The standby/clone path of createDB.sh cannot succeed with the 23.26
dbca, for two stacked reasons:

1. dbca -createDuplicateDB prompts on stdin for the remote (primary)
   SYS password and then for the new database's SYS password; it
   ignores the -responseFile sysPassword entry and
   -useWalletForDBCredentials for the remote credential, so it always
   fails with DBT-05514. Feed both passwords via heredoc, the same
   pattern the TrueCache path already uses.
2. With credentials fixed, dbca then fails with DBT-16141: it now
   requires listener information. Pass -createListener LISTENER:1521,
   the same listener the -createDatabase path already creates.

Verified end-to-end with database/enterprise:23.26.1.0 in plain
docker: with the shipped script the standby fails in seconds with
DBT-05514; with this fix dbca duplicates the primary and the instance
comes up as PHYSICAL STANDBY / READ ONLY.
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Aug 17, 2026
@fmnapoli

Copy link
Copy Markdown
Author

Scope update after the findings in #3109 (testing on the 23.26.3 free image at the maintainer's request):

  • The standby half of this PR is already implemented — better — in the scripts shipped inside the 23.26.3 free image builds (stdin herestring + -createListener LISTENER:${SVC_PORT}, plus a larger rework of the standby path). This repo's dockerfiles/23.26.1 scripts predate that rework.
  • The clone half is still needed everywhere: the CLONE_DB=true branch remains broken (no stdin feed, no -createListener) even in the 23.26.3 image scripts — reproduced live with the original DBT-05514 signature.

So this PR is still relevant as-is for the repo's 23.26.1 scripts; alternatively, if the repo is going to be refreshed with the 23.26.3 script rework, only the clone-branch portion of this fix needs to be carried over there. Happy to rework the PR either way.

@yunus-qureshi

Copy link
Copy Markdown
Member

@fmnapoli plz resolve the conflicts and sign the OCA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

2 participants