apps-dba journal

A working journal for Oracle DBAs.

October 02, 2026

Oracle DBA Lesson 24B — Check a Database After DBCA Creation

DBCA creates the database from the configuration you chose. After it finishes, compare the database with that configuration and check that the intended users can use it. This is Oracle Database 19c, one instance, SQL*Plus. The example CDB is APPCDB. The user PDB is APPPDB.

Oracle DBA Lesson 24B — Check a Database After DBCA Creation

Check What it establishes
Database identity You are inspecting the intended CDB
Container states The seed and the application PDB are in the expected modes
Local undo The undo mode matches the design
Component status Required Oracle components are valid in that container
Application connection The service reaches the right PDB, and the user can do the required work

Confirm the session

Use an administrative account that can read these views, connected to the new database. A local connection does not select it for you. Confirm the Oracle home and the instance first.

For the first checks, the current container should be CDB$ROOT.

SHOW CON_NAME

SHOW CON_NAME is a SQL*Plus command, not SQL. If it shows another container, switch back before you read root-level results. Administering PDBs.

Identify the database

SELECT name, cdb, open_mode
FROM v$database;
  • NAME should be the database name, such as APPCDB. That is not the global name with its domain.
  • CDB = YES means this is a multitenant database.
  • OPEN_MODE = READ WRITE means the database is open for read and write. It does not tell you the state of each PDB.

The creation example used the global name appcdb.example.com. APPCDB here is that database name. V$DATABASE.

Check the PDBs

From root:

SELECT name, open_mode, restricted
FROM v$pdbs
ORDER BY con_id;

V$PDBS lists the PDBs. The root is not a row in that list.

PDB$SEED is normally READ ONLY. APPPDB, for an application that reads and changes data, should be READ WRITE. MOUNTED means that PDB is not open yet.

RESTRICTED = YES means only users with RESTRICTED SESSION can connect. For ordinary application access, the PDB should not be restricted. READ WRITE does not mean an application account can log in. V$PDBS.

If the state does not match the plan, find out why. Opening a PDB, and saving that open state across restarts, are separate tasks. This query does neither.

Local undo

Undo is what Oracle uses to roll a transaction back and to build a consistent read. With local undo, each container has its own undo tablespace for each instance where it is open.

Run this in root:

SELECT property_value
FROM database_properties
WHERE property_name = 'LOCAL_UNDO_ENABLED';

TRUE means local undo. Anything else means shared undo. Compare the result with the mode you selected in DBCA. CDB undo mode.

Components

Oracle registers components, including the catalog and the PL/SQL packages, with a version and a status. That registry is not a list of application tables.

In root:

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

Run the same query in APPPDB. The root result does not stand in for the user PDB. An authorized common administrator can switch:

ALTER SESSION SET CONTAINER = APPPDB;
SHOW CON_NAME

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

ALTER SESSION changes the container of this session. It does not open the PDB, and it needs the privilege to switch. Connecting to APPPDB directly is the other option.

Required components should be VALID. Investigate an unexpected INVALID, or a component you selected that is missing. The registry does not require every optional component. CATALOG and CATPROC in the video are a short example, not a required row count. A component version is not the patch level. Record the Release Update separately. DBA_REGISTRY.

Keep the DBCA logs and the alert log. If a check fails, keep the error and the log lines before you repair anything.

Test the application path

A local administrator session skips part of the path an application uses. Connect as the application user, through the service the application uses, from the client that will use it.

In this example the client alias APPPDB_SERVICE reaches the service apppdb.example.com in APPPDB. An alias is the name in the client configuration. A service is what the database offers. Neither has to equal the PDB name.

sqlplus -L app_user@APPPDB_SERVICE

Use that account's authentication. This example does not create the account, the service, or the alias.

After you connect:

SELECT SYS_CONTEXT('USERENV','CON_NAME') AS container_name,
       SYS_CONTEXT('USERENV','SERVICE_NAME') AS service_name,
       SYS_CONTEXT('USERENV','SESSION_USER') AS session_user
FROM dual;

You should see APPPDB, the intended service, and the intended user. Those values describe this session. SYS_CONTEXT.

Then run one required application operation with that user's privileges. Use an object that already exists, and a result you already know. A login does not prove privileges, queries, or transactions.

On a course practice that already has the starter schema, a user with the grant can run:

SELECT COUNT(*) AS department_count
FROM course_owner.departments;

Compare that with the starter data for the practice. A new database does not have this table.

What to keep

Keep the creation settings next to the query results, the container names, the service and user, and the result of the application operation. A failed check stays failed until you fix the cause and run the check again.

These checks cover configuration and access. They do not replace a look at storage, patches, backup setup, or a restore you have actually run. A successful create or login does not mean you can recover the database.

Quiz

1. What does CDB = YES establish?

2. APPPDB is MOUNTED. What does that tell you?

3. APPPDB is READ WRITE with RESTRICTED = YES. What matters for ordinary users?

4. The local-undo property returns TRUE. What does it mean?

5. Required components are VALID in root. Is the APPPDB registry check unnecessary?

6. An application account logs in to the correct PDB. What should follow?

No comments:

Post a Comment

Oracle DBA Lesson 32D — Choosing a Point-in-Time Recovery

Point-in-time recovery deliberately returns the database to an earlier consistent state. Choose the boundary from the incident and the ...