Oracle DBA - Provisioning, Installation & Configuration
Standing up and configuring Oracle databases for 19c and 23ai (EE; single_instance and
Data Guard; on-prem): software/Grid installs, ASM disk groups, CDB/PDB creation, Oracle
Net (listener / tnsnames / sqlnet), init/spfile parameters and fleet baselines, NLS /
character set, database links, directory objects, default tablespaces, and block-size /
storage standards. Everything self-executing is T1 (observe) or T2 (reversible,
dry-run-default). Architecture/design and from-scratch/destructive operations
(binary installs, custom CREATE DATABASE, character-set change, block-size design,
ASM disk add/drop/drop-group, DROP DATABASE/PDB, fixed-user link passwords) are T3
and live only in references/runbooks.md — they print exact commands for a human and
never self-execute.
Scope & risk map
| Task |
Level |
Tier |
Mechanism (script / sql / runbook path) |
Idempotent? |
| Oracle RDBMS binary installation |
L3 |
T3 |
references/runbooks.md#rdbms-install |
n/a — host install; verify via opatch lpinventory |
| Grid Infrastructure installation |
L3 |
T3 |
references/runbooks.md#grid-install |
n/a — host install; verify via crsctl/srvctl |
| ASM disk group creation |
L3 |
T2 |
scripts/asm_diskgroup.sh create / .ps1 -> sql/asm_diskgroup_create.sql (+ sql/asm_status.sql) |
yes — mounted DG of same name -> noop |
| ASM disk group status |
L1 |
T1 |
scripts/asm_diskgroup.sh status / .ps1 -> sql/asm_status.sql |
yes — read-only |
| ASM add/drop disk, rebalance, DROP DISKGROUP |
L3 |
T3 |
references/runbooks.md#asm-dg-manage |
partial — rebalance repeatable; DROP DISKGROUP irreversible |
| Database creation via DBCA (silent/template) |
L3 |
T2 |
scripts/create_cdb_dbca.sh / .ps1 -> sql/cdb_verify.sql |
yes — existing SID/service -> noop |
| Multitenant CDB creation |
L3 |
T2 |
scripts/create_cdb_dbca.sh / .ps1 (CDB always) -> sql/cdb_verify.sql |
yes — existing SID/service -> noop |
| Database creation via custom scripts |
L2 |
T2 |
scripts/create_database_custom.sh / .ps1 (renders runbook plan) -> sql/create_database_custom.sql, references/runbooks.md#custom-create |
yes — validates+previews; build is runbook-driven |
| PDB creation |
L2 |
T2 |
scripts/pdb_create.sh / .ps1 -> sql/pdb_create.sql (+ sql/pdb_status.sql) |
yes — existing PDB -> noop (converges OPEN + SAVE STATE) |
| PDB status |
L1 |
T1 |
scripts/pdb_create.sh --status / .ps1 -Status -> sql/pdb_status.sql |
yes — read-only |
| Listener creation & configuration |
L2 |
T2 |
scripts/listener_configure.sh / .ps1 |
yes — listener present+running on host/port -> noop |
| Listener status |
L1 |
T1 |
scripts/listener_configure.sh --status / .ps1 -Status |
yes — read-only |
| tnsnames.ora / sqlnet.ora setup |
L2 |
T2 |
scripts/tnsnames_configure.sh add-alias|set-sqlnet / .ps1 |
yes — identical alias / key=value -> noop |
| tnsnames connectivity check |
L1 |
T1 |
scripts/tnsnames_configure.sh check / .ps1 |
yes — read-only (tnsping) |
| init/spfile parameter set |
L2 |
T2 |
scripts/spfile_parameter.sh set / .ps1 -> sql/spfile_parameter_set.sql |
yes — already at value in scope -> noop |
| init/spfile parameter show |
L2 |
T1 |
scripts/spfile_parameter.sh show / .ps1 -> sql/spfile_parameter_show.sql |
yes — read-only |
| Parameter baseline standardization (fleet) |
L3 |
T2 |
scripts/parameter_baseline.sh check|apply / .ps1 -> sql/parameter_baseline_check.sql + sql/spfile_parameter_set.sql |
yes — params already at baseline -> noop |
| Character set / NLS configuration |
L3 |
T3 |
references/runbooks.md#charset-nls (NLS instance params via scripts/spfile_parameter.sh) |
no — charset change is destructive-capable |
| Database link create |
L2 |
T2 |
scripts/dblink.sh create / .ps1 -> sql/dblink_create.sql |
yes — existing name+scope -> noop |
| Database link drop |
L2 |
T2 |
scripts/dblink.sh drop / .ps1 -> sql/dblink_drop.sql |
yes — missing -> noop |
| Database link list |
L1 |
T1 |
scripts/dblink.sh list / .ps1 |
yes — read-only |
| Fixed-user link inline password (escape hatch) |
L3 |
T3 |
references/runbooks.md#dblink-fixed-user-password |
n/a — refused by dblink (wallet only) |
| Directory object create |
L2 |
T2 |
scripts/directory_object.sh create / .ps1 -> sql/directory_object_create.sql |
yes — same path + grant held -> noop |
| Directory object drop |
L2 |
T2 |
scripts/directory_object.sh drop / .ps1 |
yes — missing -> noop |
| Directory object list |
L1 |
T1 |
scripts/directory_object.sh list / .ps1 |
yes — read-only |
| Default tablespace & temp configuration |
L2 |
T2 |
scripts/default_tablespace.sh set / .ps1 -> sql/default_tablespace_set.sql |
yes — default already target -> noop per scope |
| Default tablespace show |
L1 |
T1 |
scripts/default_tablespace.sh show / .ps1 |
yes — read-only |
| Block size / storage standard definition |
L3 |
T3 |
references/runbooks.md#blocksize-storage |
no — set once at CREATE DATABASE; immutable after |
| DROP DATABASE / delete database (teardown) |
L3 |
T3 |
references/runbooks.md#drop-database |
n/a — refused by create_* scripts |
| Drop PDB (teardown) |
L3 |
T3 |
references/runbooks.md#pdb-drop |
n/a — refused by pdb_create |
Preconditions
- SQLcl MCP connection
dba_ai_conn is reachable and wallet-backed. All in-DB
prechecks, postchecks, idempotency probes, and sql/*.sql run through it via
connect_db / Connect-Db. Never SYS/SYSTEM — except inside a T3 runbook that
explicitly states AS SYSDBA (custom CREATE DATABASE, charset change, DROP), supplied
interactively by the operator. ASM SQL runs AS SYSASM on the local +ASM
instance via OS/grid-group auth (host op, not SQLcl MCP — restrict level 4).
- Secrets resolve from the Oracle Wallet / external password store. No plaintext
anywhere. SYS/SYSTEM and PDB-admin passwords come from wallet aliases
(
ODB_SYS_PWD_ALIAS, ODB_SYSTEM_PWD_ALIAS, ODB_PDB_ADMIN_PWD_ALIAS) read via a
site ODB_WALLET_READ_CMD and fed to dbca on STDIN — never argv/env/files. Remote
database-link credentials come from per-link wallet entries keyed to the TNS alias
(no inline IDENTIFIED BY). A value that looks like user/pass@db or password= is
rejected with ERR_SECRET (8).
- Helpers are sourced from
_common (scripts/lib.sh / lib.ps1): connect_db,
log_event, emit_metric, require_dry_run, guard_blocked_dry_run,
require_approval_token, precheck, postcheck, print_banner. Not reinvented.
- Logging: structured
key=value lines to the canonical paths
/var/log/oracle-dba/provisioning/provisioning.log (Linux) /
C:/ProgramData/oracle-dba/logs/provisioning/provisioning.log (Windows); skill
segment provisioning.
- T2 dry-run default: every T2 script previews and changes nothing unless given
--execute. Host editors (listener/tns/sqlnet) back up the existing file (timestamped)
before any change.
Procedures
Scripts ship as behaviour-equivalent .sh (Linux) / .ps1 (Windows) pairs. T2 scripts
default to --dry-run; pass --execute to act. See each script's --help / -Help.
In-DB tasks route to sql/*.sql via dba_ai_conn (mechanism sqlcl-mcp); host tasks
(installs, ASM SYSASM, listener/tns/sqlnet, dbca) are .sh/.ps1 (mechanism script).
ASM disk group create / status
- Trigger: provision storage on a fresh GI install (create); audit DG space (status).
- Precheck: connected to a
+ASM instance AS SYSASM; redundancy/AU/disk spec valid.
- Action:
scripts/asm_diskgroup.sh create --name DATA --redundancy EXTERNAL --disks "..." --execute / .ps1; status is T1. -> sql/asm_diskgroup_create.sql, sql/asm_status.sql.
- Postcheck:
V$ASM_DISKGROUP shows the group MOUNTED.
- Rollback note: a new DG can be dropped — that is T3
#asm-dg-manage (irreversible with INCLUDING CONTENTS).
DBCA / multitenant CDB creation
- Trigger: create a new multitenant CDB from a template (the automated path).
- Precheck: RDBMS home installed; datafile dest valid; no existing SID/service (else noop); wallet password aliases set for
--execute.
- Action:
scripts/create_cdb_dbca.sh --gdbname ORCL --sid ORCL --datafile-dest /u02/oradata --pdb PDB1 --execute / .ps1. -> verified by sql/cdb_verify.sql.
- Postcheck:
cdb_verify.sql reports CDB=YES, OPEN READ WRITE, registry VALID.
- Rollback note: delete via DBCA
-deleteDatabase — T3 #drop-database.
Custom CREATE DATABASE
- Trigger: a template will not do; full control over the CREATE DATABASE statement.
- Precheck: home installed; pfile + destinations ready; wallet SYS/SYSTEM aliases.
- Action:
scripts/create_database_custom.sh --db-name ORCL --data-dest ... --redo-dest ... validates + renders the exact ordered plan (--execute prints the runbook-gated plan). The SYSDBA build is runbook-driven: references/runbooks.md#custom-create (-> sql/create_database_custom.sql).
- Postcheck:
sql/cdb_verify.sql after the operator completes the runbook.
- Rollback note: SHUTDOWN ABORT + remove files mid-build; DROP DATABASE after — T3
#drop-database.
PDB create / status
- Trigger: add a pluggable database to a CDB (create); inventory PDBs (status).
- Precheck: connected to a multitenant CDB root; valid PDB name + file dest.
- Action:
scripts/pdb_create.sh --name SALESPDB --admin PDBADMIN --file-dest +DATA --execute / .ps1. -> sql/pdb_create.sql. --status is T1.
- Postcheck:
V$PDBS shows the PDB OPEN READ WRITE; SAVE STATE persisted.
- Rollback note: close + drop the PDB — T3
#pdb-drop (prefer UNPLUG over DROP).
Listener create / status
- Trigger: stand up or refresh an Oracle Net listener (configure); check it (status).
- Precheck: TNS_ADMIN resolvable + writable; valid name/host/port/protocol.
- Action:
scripts/listener_configure.sh --name LISTENER --port 1521 --host db01 --execute / .ps1. --status is T1.
- Postcheck:
lsnrctl status shows the listener on the requested port.
- Rollback note: the prior
listener.ora is backed up (timestamped); restore it and lsnrctl reload to revert.
tnsnames / sqlnet setup + check
- Trigger: add a client alias (add-alias) or set a sqlnet param (set-sqlnet); test (check).
- Precheck: TNS_ADMIN writable; valid alias/host/port/service or key.
- Action:
scripts/tnsnames_configure.sh add-alias --alias SALESDB --host db01 --port 1521 --service sales.example.com --execute / set-sqlnet --key SQLNET.WALLET_OVERRIDE --value TRUE --execute / .ps1. check is T1.
- Postcheck: alias present +
tnsping resolves / sqlnet key=value persisted.
- Rollback note: files are backed up before edit; restore the backup or re-run with prior values. No secrets ever written.
init/spfile parameter set / show
- Trigger: change one parameter (set); inspect running + spfile values (show).
- Precheck: parameter exists in
V$PARAMETER; value is not credential-looking.
- Action:
scripts/spfile_parameter.sh set --name open_cursors --value 1000 --scope BOTH --execute / .ps1. show is T1. -> sql/spfile_parameter_set.sql / sql/spfile_parameter_show.sql.
- Postcheck:
V$SPPARAMETER/V$PARAMETER reflects the new value.
- Rollback note: the script prints the prior value (your rollback); re-run with the old value, or
ALTER SYSTEM RESET. STATIC params need a restart (T3 runbook); never bounced here.
Parameter baseline standardization (fleet)
- Trigger: report (check) or enforce (apply) a fleet parameter baseline from a manifest.
- Precheck: manifest parsed + validated; values not credential-looking.
- Action:
scripts/parameter_baseline.sh check --manifest references/parameter_baseline.example.conf / apply ... --execute / .ps1. -> sql/parameter_baseline_check.sql then the idempotent sql/spfile_parameter_set.sql per param.
- Postcheck: post-apply drift report; only connect/set errors hard-fail (STATIC params legitimately remain DRIFT until a restart).
- Rollback note: the pre-apply
check output is your rollback record; re-apply a prior manifest. Static params need a restart (T3).
Database link create / drop / list
- Trigger: define (create) / remove (drop) / inventory (list) a database link.
- Precheck: valid link identifier; no credential-looking inputs; for NAMED,
--user + wallet credential on the TNS alias.
- Action:
scripts/dblink.sh create --name L --tns ALIAS --mode CONNECTED --execute / drop --name L --execute / .ps1. list is T1. -> sql/dblink_create.sql / sql/dblink_drop.sql.
- Postcheck:
DBA_DB_LINKS shows the link present (create) / absent (drop).
- Rollback note: create's reverse is drop. An inline fixed-user password is refused -> T3
#dblink-fixed-user-password.
Directory object create / drop / list
- Trigger: register (create) / remove (drop) / inventory (list) an Oracle DIRECTORY.
- Precheck: valid object name; path has no quotes; valid grantee (if any).
- Action:
scripts/directory_object.sh create --name DP_DIR --path /u01/dpdump --grantee DP_ROLE --execute / drop --name DP_DIR --execute / .ps1. list is T1. -> sql/directory_object_create.sql.
- Postcheck:
DBA_DIRECTORIES shows the directory present / absent.
- Rollback note: create's reverse is drop; drop only removes the dictionary entry (OS files untouched).
Default tablespace & temp set / show
- Trigger: set the DB default permanent/temp tablespace (set); inspect (show).
- Precheck: target tablespace exists and is the right type (SQL verifies).
- Action:
scripts/default_tablespace.sh set --perm USERS --temp TEMP --execute / .ps1. show is T1. -> sql/default_tablespace_set.sql.
- Postcheck:
DATABASE_PROPERTIES reflects the new defaults.
- Rollback note: current defaults are printed as rollback values; re-run
set with the old name. Does not move existing data.
Tier-3 runbooks
All installs, from-scratch database creation, character-set change, block-size/storage
design, ASM disk add/drop/drop-group, and DROP DATABASE/PDB are Tier 3 and live in
references/runbooks.md: #rdbms-install, #grid-install, #custom-create,
#charset-nls, #blocksize-storage, #asm-dg-manage, plus the escape hatches
#dblink-fixed-user-password, #drop-database, #pdb-drop.
These runbooks PRINT exact commands for a human operator and NEVER self-execute. They
are gated by require_approval_token / Require-ApprovalToken: an automated agent's only
sanctioned action is to print the relevant section and stop with ERR_APPROVAL (6) until
a human supplies a real change ticket/token (--token <TICKET> or ODB_APPROVAL_TOKEN;
placeholders rejected). The T2 scripts deliberately refuse the destructive/structural
escape hatches (DROP DATABASE/DISKGROUP/PDB, inline link passwords) and point to the
runbook instead. SYSDBA / SYSASM are T3-only, interactively-supplied exceptions. When in
doubt, runbook.
See references/version-notes.md for 19c-vs-23ai behavioural deltas, and
references/parameter_baseline.example.conf for the fleet-baseline manifest format.
Schedulable T1/T2 jobs: cron/crontab.d (Linux) and cron/task-scheduler.xml (Windows).
1---2name: oracle-dba-provisioning-installation-configuration3description: USE THIS SKILL WHENEVER the user mentions provisioning or installing Oracle, an RDBMS or Grid Infrastructure (GI) binary install, runInstaller / gridSetup / root.sh, ASM disk groups / CREATE DISKGROUP / +ASM, creating a database (DBCA silent/template or custom CREATE DATABASE), multitenant CDB creation, PDB creation / CREATE PLUGGABLE DATABASE, listeners / listener.ora / lsnrctl, tnsnames.ora / sqlnet.ora / tnsping, init or spfile parameters / ALTER SYSTEM SET / pfile, a parameter baseline or fleet standardization, character set / NLS / AL32UTF8, database links / CREATE DATABASE LINK, directory objects / CREATE DIRECTORY, default or temp tablespace configuration, or block size / storage standards — EVEN IF they do not name the exact task. Covers Oracle 19c and 23ai, EE, single_instance and Data Guard, on-prem. Follows the oracle-dba-common contracts: SQLcl MCP saved connection dba_ai_conn, Oracle Wallet secrets (never plaintext, never SYS/SYSTEM unless a runbook needs SYSDBA), --dry-run defaults on T2, and ti4---5# Oracle DBA - Provisioning, Installation & Configuration67Standing up and configuring Oracle databases for 19c and 23ai (EE; single_instance and8Data Guard; on-prem): software/Grid installs, ASM disk groups, CDB/PDB creation, Oracle9Net (listener / tnsnames / sqlnet), init/spfile parameters and fleet baselines, NLS /10character set, database links, directory objects, default tablespaces, and block-size /11storage standards. Everything self-executing is **T1 (observe)** or **T2 (reversible,12dry-run-default)**. Architecture/design and from-scratch/destructive operations13(**binary installs, custom CREATE DATABASE, character-set change, block-size design,14ASM disk add/drop/drop-group, DROP DATABASE/PDB, fixed-user link passwords**) are **T3**15and live only in `references/runbooks.md` — they print exact commands for a human and16never self-execute.1718## Scope & risk map1920| Task | Level | Tier | Mechanism (script / sql / runbook path) | Idempotent? |21|------|-------|------|------------------------------------------|-------------|22| Oracle RDBMS binary installation | L3 | **T3** | `references/runbooks.md#rdbms-install` | n/a — host install; verify via opatch lpinventory |23| Grid Infrastructure installation | L3 | **T3** | `references/runbooks.md#grid-install` | n/a — host install; verify via crsctl/srvctl |24| ASM disk group creation | L3 | T2 | `scripts/asm_diskgroup.sh create` / `.ps1` -> `sql/asm_diskgroup_create.sql` (+ `sql/asm_status.sql`) | yes — mounted DG of same name -> noop |25| ASM disk group status | L1 | T1 | `scripts/asm_diskgroup.sh status` / `.ps1` -> `sql/asm_status.sql` | yes — read-only |26| ASM add/drop disk, rebalance, DROP DISKGROUP | L3 | **T3** | `references/runbooks.md#asm-dg-manage` | partial — rebalance repeatable; DROP DISKGROUP irreversible |27| Database creation via DBCA (silent/template) | L3 | T2 | `scripts/create_cdb_dbca.sh` / `.ps1` -> `sql/cdb_verify.sql` | yes — existing SID/service -> noop |28| Multitenant CDB creation | L3 | T2 | `scripts/create_cdb_dbca.sh` / `.ps1` (CDB always) -> `sql/cdb_verify.sql` | yes — existing SID/service -> noop |29| Database creation via custom scripts | L2 | T2 | `scripts/create_database_custom.sh` / `.ps1` (renders runbook plan) -> `sql/create_database_custom.sql`, `references/runbooks.md#custom-create` | yes — validates+previews; build is runbook-driven |30| PDB creation | L2 | T2 | `scripts/pdb_create.sh` / `.ps1` -> `sql/pdb_create.sql` (+ `sql/pdb_status.sql`) | yes — existing PDB -> noop (converges OPEN + SAVE STATE) |31| PDB status | L1 | T1 | `scripts/pdb_create.sh --status` / `.ps1 -Status` -> `sql/pdb_status.sql` | yes — read-only |32| Listener creation & configuration | L2 | T2 | `scripts/listener_configure.sh` / `.ps1` | yes — listener present+running on host/port -> noop |33| Listener status | L1 | T1 | `scripts/listener_configure.sh --status` / `.ps1 -Status` | yes — read-only |34| tnsnames.ora / sqlnet.ora setup | L2 | T2 | `scripts/tnsnames_configure.sh add-alias\|set-sqlnet` / `.ps1` | yes — identical alias / key=value -> noop |35| tnsnames connectivity check | L1 | T1 | `scripts/tnsnames_configure.sh check` / `.ps1` | yes — read-only (tnsping) |36| init/spfile parameter set | L2 | T2 | `scripts/spfile_parameter.sh set` / `.ps1` -> `sql/spfile_parameter_set.sql` | yes — already at value in scope -> noop |37| init/spfile parameter show | L2 | T1 | `scripts/spfile_parameter.sh show` / `.ps1` -> `sql/spfile_parameter_show.sql` | yes — read-only |38| Parameter baseline standardization (fleet) | L3 | T2 | `scripts/parameter_baseline.sh check\|apply` / `.ps1` -> `sql/parameter_baseline_check.sql` + `sql/spfile_parameter_set.sql` | yes — params already at baseline -> noop |39| Character set / NLS configuration | L3 | **T3** | `references/runbooks.md#charset-nls` (NLS instance params via `scripts/spfile_parameter.sh`) | no — charset change is destructive-capable |40| Database link create | L2 | T2 | `scripts/dblink.sh create` / `.ps1` -> `sql/dblink_create.sql` | yes — existing name+scope -> noop |41| Database link drop | L2 | T2 | `scripts/dblink.sh drop` / `.ps1` -> `sql/dblink_drop.sql` | yes — missing -> noop |42| Database link list | L1 | T1 | `scripts/dblink.sh list` / `.ps1` | yes — read-only |43| Fixed-user link inline password (escape hatch) | L3 | **T3** | `references/runbooks.md#dblink-fixed-user-password` | n/a — refused by `dblink` (wallet only) |44| Directory object create | L2 | T2 | `scripts/directory_object.sh create` / `.ps1` -> `sql/directory_object_create.sql` | yes — same path + grant held -> noop |45| Directory object drop | L2 | T2 | `scripts/directory_object.sh drop` / `.ps1` | yes — missing -> noop |46| Directory object list | L1 | T1 | `scripts/directory_object.sh list` / `.ps1` | yes — read-only |47| Default tablespace & temp configuration | L2 | T2 | `scripts/default_tablespace.sh set` / `.ps1` -> `sql/default_tablespace_set.sql` | yes — default already target -> noop per scope |48| Default tablespace show | L1 | T1 | `scripts/default_tablespace.sh show` / `.ps1` | yes — read-only |49| Block size / storage standard definition | L3 | **T3** | `references/runbooks.md#blocksize-storage` | no — set once at CREATE DATABASE; immutable after |50| DROP DATABASE / delete database (teardown) | L3 | **T3** | `references/runbooks.md#drop-database` | n/a — refused by `create_*` scripts |51| Drop PDB (teardown) | L3 | **T3** | `references/runbooks.md#pdb-drop` | n/a — refused by `pdb_create` |5253## Preconditions5455- **SQLcl MCP connection `dba_ai_conn`** is reachable and wallet-backed. All in-DB56 prechecks, postchecks, idempotency probes, and `sql/*.sql` run through it via57 `connect_db` / `Connect-Db`. Never SYS/SYSTEM — except inside a T3 runbook that58 explicitly states `AS SYSDBA` (custom CREATE DATABASE, charset change, DROP), supplied59 interactively by the operator. **ASM** SQL runs **AS SYSASM** on the local +ASM60 instance via OS/grid-group auth (host op, not SQLcl MCP — restrict level 4).61- **Secrets resolve from the Oracle Wallet / external password store. No plaintext62 anywhere.** SYS/SYSTEM and PDB-admin passwords come from wallet aliases63 (`ODB_SYS_PWD_ALIAS`, `ODB_SYSTEM_PWD_ALIAS`, `ODB_PDB_ADMIN_PWD_ALIAS`) read via a64 site `ODB_WALLET_READ_CMD` and fed to dbca on STDIN — never argv/env/files. Remote65 database-link credentials come from per-link wallet entries keyed to the TNS alias66 (no inline `IDENTIFIED BY`). A value that looks like `user/pass@db` or `password=` is67 rejected with `ERR_SECRET` (8).68- **Helpers are sourced from `_common`** (`scripts/lib.sh` / `lib.ps1`): `connect_db`,69 `log_event`, `emit_metric`, `require_dry_run`, `guard_blocked_dry_run`,70 `require_approval_token`, `precheck`, `postcheck`, `print_banner`. Not reinvented.71- **Logging**: structured `key=value` lines to the canonical paths72 `/var/log/oracle-dba/provisioning/provisioning.log` (Linux) /73 `C:/ProgramData/oracle-dba/logs/provisioning/provisioning.log` (Windows); skill74 segment `provisioning`.75- **T2 dry-run default**: every T2 script previews and changes nothing unless given76 `--execute`. Host editors (listener/tns/sqlnet) back up the existing file (timestamped)77 before any change.7879## Procedures8081Scripts ship as behaviour-equivalent `.sh` (Linux) / `.ps1` (Windows) pairs. T2 scripts82default to `--dry-run`; pass `--execute` to act. See each script's `--help` / `-Help`.83In-DB tasks route to `sql/*.sql` via `dba_ai_conn` (mechanism `sqlcl-mcp`); host tasks84(installs, ASM SYSASM, listener/tns/sqlnet, dbca) are `.sh`/`.ps1` (mechanism `script`).8586### ASM disk group create / status87- **Trigger**: provision storage on a fresh GI install (create); audit DG space (status).88- **Precheck**: connected to a `+ASM` instance AS SYSASM; redundancy/AU/disk spec valid.89- **Action**: `scripts/asm_diskgroup.sh create --name DATA --redundancy EXTERNAL --disks "..." --execute` / `.ps1`; `status` is T1. -> `sql/asm_diskgroup_create.sql`, `sql/asm_status.sql`.90- **Postcheck**: `V$ASM_DISKGROUP` shows the group MOUNTED.91- **Rollback note**: a new DG can be dropped — that is T3 `#asm-dg-manage` (irreversible with INCLUDING CONTENTS).9293### DBCA / multitenant CDB creation94- **Trigger**: create a new multitenant CDB from a template (the automated path).95- **Precheck**: RDBMS home installed; datafile dest valid; no existing SID/service (else noop); wallet password aliases set for `--execute`.96- **Action**: `scripts/create_cdb_dbca.sh --gdbname ORCL --sid ORCL --datafile-dest /u02/oradata --pdb PDB1 --execute` / `.ps1`. -> verified by `sql/cdb_verify.sql`.97- **Postcheck**: `cdb_verify.sql` reports CDB=YES, OPEN READ WRITE, registry VALID.98- **Rollback note**: delete via DBCA `-deleteDatabase` — T3 `#drop-database`.99100### Custom CREATE DATABASE101- **Trigger**: a template will not do; full control over the CREATE DATABASE statement.102- **Precheck**: home installed; pfile + destinations ready; wallet SYS/SYSTEM aliases.103- **Action**: `scripts/create_database_custom.sh --db-name ORCL --data-dest ... --redo-dest ...` validates + renders the exact ordered plan (`--execute` prints the runbook-gated plan). The SYSDBA build is runbook-driven: `references/runbooks.md#custom-create` (-> `sql/create_database_custom.sql`).104- **Postcheck**: `sql/cdb_verify.sql` after the operator completes the runbook.105- **Rollback note**: SHUTDOWN ABORT + remove files mid-build; DROP DATABASE after — T3 `#drop-database`.106107### PDB create / status108- **Trigger**: add a pluggable database to a CDB (create); inventory PDBs (status).109- **Precheck**: connected to a multitenant CDB root; valid PDB name + file dest.110- **Action**: `scripts/pdb_create.sh --name SALESPDB --admin PDBADMIN --file-dest +DATA --execute` / `.ps1`. -> `sql/pdb_create.sql`. `--status` is T1.111- **Postcheck**: `V$PDBS` shows the PDB OPEN READ WRITE; SAVE STATE persisted.112- **Rollback note**: close + drop the PDB — T3 `#pdb-drop` (prefer UNPLUG over DROP).113114### Listener create / status115- **Trigger**: stand up or refresh an Oracle Net listener (configure); check it (status).116- **Precheck**: TNS_ADMIN resolvable + writable; valid name/host/port/protocol.117- **Action**: `scripts/listener_configure.sh --name LISTENER --port 1521 --host db01 --execute` / `.ps1`. `--status` is T1.118- **Postcheck**: `lsnrctl status` shows the listener on the requested port.119- **Rollback note**: the prior `listener.ora` is backed up (timestamped); restore it and `lsnrctl reload` to revert.120121### tnsnames / sqlnet setup + check122- **Trigger**: add a client alias (add-alias) or set a sqlnet param (set-sqlnet); test (check).123- **Precheck**: TNS_ADMIN writable; valid alias/host/port/service or key.124- **Action**: `scripts/tnsnames_configure.sh add-alias --alias SALESDB --host db01 --port 1521 --service sales.example.com --execute` / `set-sqlnet --key SQLNET.WALLET_OVERRIDE --value TRUE --execute` / `.ps1`. `check` is T1.125- **Postcheck**: alias present + `tnsping` resolves / sqlnet key=value persisted.126- **Rollback note**: files are backed up before edit; restore the backup or re-run with prior values. No secrets ever written.127128### init/spfile parameter set / show129- **Trigger**: change one parameter (set); inspect running + spfile values (show).130- **Precheck**: parameter exists in `V$PARAMETER`; value is not credential-looking.131- **Action**: `scripts/spfile_parameter.sh set --name open_cursors --value 1000 --scope BOTH --execute` / `.ps1`. `show` is T1. -> `sql/spfile_parameter_set.sql` / `sql/spfile_parameter_show.sql`.132- **Postcheck**: `V$SPPARAMETER`/`V$PARAMETER` reflects the new value.133- **Rollback note**: the script prints the prior value (your rollback); re-run with the old value, or `ALTER SYSTEM RESET`. STATIC params need a restart (T3 runbook); never bounced here.134135### Parameter baseline standardization (fleet)136- **Trigger**: report (check) or enforce (apply) a fleet parameter baseline from a manifest.137- **Precheck**: manifest parsed + validated; values not credential-looking.138- **Action**: `scripts/parameter_baseline.sh check --manifest references/parameter_baseline.example.conf` / `apply ... --execute` / `.ps1`. -> `sql/parameter_baseline_check.sql` then the idempotent `sql/spfile_parameter_set.sql` per param.139- **Postcheck**: post-apply drift report; only connect/set errors hard-fail (STATIC params legitimately remain DRIFT until a restart).140- **Rollback note**: the pre-apply `check` output is your rollback record; re-apply a prior manifest. Static params need a restart (T3).141142### Database link create / drop / list143- **Trigger**: define (create) / remove (drop) / inventory (list) a database link.144- **Precheck**: valid link identifier; no credential-looking inputs; for NAMED, `--user` + wallet credential on the TNS alias.145- **Action**: `scripts/dblink.sh create --name L --tns ALIAS --mode CONNECTED --execute` / `drop --name L --execute` / `.ps1`. `list` is T1. -> `sql/dblink_create.sql` / `sql/dblink_drop.sql`.146- **Postcheck**: `DBA_DB_LINKS` shows the link present (create) / absent (drop).147- **Rollback note**: create's reverse is drop. An inline fixed-user password is refused -> T3 `#dblink-fixed-user-password`.148149### Directory object create / drop / list150- **Trigger**: register (create) / remove (drop) / inventory (list) an Oracle DIRECTORY.151- **Precheck**: valid object name; path has no quotes; valid grantee (if any).152- **Action**: `scripts/directory_object.sh create --name DP_DIR --path /u01/dpdump --grantee DP_ROLE --execute` / `drop --name DP_DIR --execute` / `.ps1`. `list` is T1. -> `sql/directory_object_create.sql`.153- **Postcheck**: `DBA_DIRECTORIES` shows the directory present / absent.154- **Rollback note**: create's reverse is drop; drop only removes the dictionary entry (OS files untouched).155156### Default tablespace & temp set / show157- **Trigger**: set the DB default permanent/temp tablespace (set); inspect (show).158- **Precheck**: target tablespace exists and is the right type (SQL verifies).159- **Action**: `scripts/default_tablespace.sh set --perm USERS --temp TEMP --execute` / `.ps1`. `show` is T1. -> `sql/default_tablespace_set.sql`.160- **Postcheck**: `DATABASE_PROPERTIES` reflects the new defaults.161- **Rollback note**: current defaults are printed as rollback values; re-run `set` with the old name. Does not move existing data.162163## Tier-3 runbooks164165All **installs, from-scratch database creation, character-set change, block-size/storage166design, ASM disk add/drop/drop-group, and DROP DATABASE/PDB** are Tier 3 and live in167**`references/runbooks.md`**: `#rdbms-install`, `#grid-install`, `#custom-create`,168`#charset-nls`, `#blocksize-storage`, `#asm-dg-manage`, plus the escape hatches169`#dblink-fixed-user-password`, `#drop-database`, `#pdb-drop`.170171These runbooks **PRINT exact commands for a human operator and NEVER self-execute.** They172are gated by `require_approval_token` / `Require-ApprovalToken`: an automated agent's only173sanctioned action is to print the relevant section and stop with `ERR_APPROVAL` (6) until174a human supplies a real change ticket/token (`--token <TICKET>` or `ODB_APPROVAL_TOKEN`;175placeholders rejected). The T2 scripts deliberately refuse the destructive/structural176escape hatches (DROP DATABASE/DISKGROUP/PDB, inline link passwords) and point to the177runbook instead. SYSDBA / SYSASM are T3-only, interactively-supplied exceptions. When in178doubt, runbook.179180See `references/version-notes.md` for 19c-vs-23ai behavioural deltas, and181`references/parameter_baseline.example.conf` for the fleet-baseline manifest format.182Schedulable T1/T2 jobs: `cron/crontab.d` (Linux) and `cron/task-scheduler.xml` (Windows).