Courseiva

Oracle Database 23ai Administrator Professional (OCP, 1Z0-183) (OCP) (OCP) — Questions 226–261

261 questions total · 4 pages · All types, answers revealed

Page 3

Page 4 of 4

226
MCQmedium

When using SQL Tuning Advisor, what is a 'SQL Tuning Set' (STS)?

A.A backup set of the database
B.A list of database users
C.A container for SQL statements and their metadata
D.A set of database indexes
AnswerC

A SQL Tuning Set is a database object holding SQL statements plus their execution context, such as bind values, execution plans and statistics. SQL Tuning Advisor consumes this container to analyse and tune the captured workload.

Why this answer

An STS is a collection of SQL statements with their associated execution context.

227
MCQeasy

You are using RMAN to back up your Oracle 23ai database. You want to ensure that RMAN automatically backs up the control file and server parameter file (SPFILE) whenever a backup is taken. Which RMAN configuration command should you use?

A.CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/backup/snapcf.ctl';
B.CONFIGURE CONTROLFILE AUTOBACKUP ON;
C.BACKUP CURRENT CONTROLFILE;
D.CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup/%F';
AnswerB

This command enables automatic backup of the control file and SPFILE whenever a backup or structural change occurs. It ensures that you have a current control file backup, which is essential for recovery. The backup is stored in the fast recovery area or a configured location. This is the correct setting to meet the requirement.

Why this answer

To automatically back up the control file and SPFILE with every backup, you must enable CONTROLFILE AUTOBACKUP. The other options either specify a format, perform a manual backup, or configure a snapshot control file, none of which provide automatic backup functionality.

Exam trap

The trap here is confusing the format specification for control file autobackup with enabling the feature itself; the format only applies after autobackup is turned on.

228
MCQhard

You are administering a CDB with multiple PDBs. You need to ensure that a specific PDB named FINPDB automatically starts up when the CDB instance is started. Which action should you take?

A.Execute ALTER PLUGGABLE DATABASE FINPDB SAVE STATE;
B.Modify the PDB's initialization parameter file to include a startup command.
C.Create a database trigger that executes ALTER PLUGGABLE DATABASE FINPDB OPEN on startup.
D.Set the PDB's state to OPEN in the CDB's startup triggers.
AnswerA

The SAVE STATE clause records the current open mode of the PDB in the CDB's metadata. When the CDB instance restarts, the PDB will be opened to that saved state automatically. This is the standard and supported method to ensure a PDB starts automatically. It is simple, reliable, and does not require custom scripting.

Why this answer

To make a PDB automatically open on CDB startup, you use ALTER PLUGGABLE DATABASE ... SAVE STATE. This command persists the PDB's open mode in the CDB's metadata.

When the CDB restarts, the PDB is opened to the saved state. Other methods like triggers or parameter files are not standard and can be unreliable.

Exam trap

The trap here is thinking that a trigger or parameter file is needed, when the SAVE STATE clause is the built-in, supported solution.

229
MCQeasy

Which view displays the current settings for the AWR retention period?

A.DBA_SNAPSHOTS
B.V$DATABASE
C.DBA_HIST_WR_CONTROL
D.V$INSTANCE
AnswerC

DBA_HIST_WR_CONTROL stores the active Automatic Workload Repository configuration, exposing columns such as RETENTION and SNAP_INTERVAL. Querying it returns the current retention period directly, satisfying the stem's requirement for present settings rather than historical snapshots or parameter defaults.

Why this answer

DBA_HIST_WR_CONTROL contains the snapshot settings including retention and interval.

230
MCQmedium

You are configuring a PDB. What happens to the PDB if you drop the CDB?

A.PDBs remain as standalone
B.PDBs become unusable orphans
C.All PDBs are dropped
D.PDBs are migrated to another CDB
AnswerC

Dropping the CDB removes the root container that every PDB depends on, so all PDBs are dropped along with it. This satisfies the stem's constraint: a PDB cannot exist independently of its CDB, since the CDB supplies the shared instance, data dictionary and system metadata the PDB requires.

Why this answer

All PDBs are automatically removed when the CDB is dropped.

231
MCQmedium

Which command allows you to change the state of a PDB to READ ONLY?

A.OPEN PDB READ ONLY
B.ALTER PDB READ ONLY
C.ALTER PLUGGABLE DATABASE OPEN READ ONLY
D.ALTER DATABASE PDB OPEN READ ONLY
AnswerC

ALTER PLUGGABLE DATABASE OPEN READ ONLY transitions the PDB from MOUNTED to a queryable state while blocking DML, satisfying the READ ONLY requirement. The OPEN clause is mandatory because a PDB must be opened before any read-only access is possible.

Why this answer

ALTER PLUGGABLE DATABASE [PDB_NAME] OPEN READ ONLY is the correct syntax.

232
MCQmedium

You are tuning a complex SQL statement. You want to see the execution plan that the optimizer is currently choosing. Which dynamic performance view is most useful?

A.V$SQL_PLAN
B.V$SESSION
C.V$SQLAREA
D.V$SYSSTAT
AnswerA

V$SQL_PLAN exposes the execution plan rows the optimizer actually chose for a cached SQL statement, keyed by SQL_ID and child number. It satisfies the requirement to see the plan currently in use, unlike EXPLAIN PLAN, which shows a predicted plan.

Why this answer

V$SQL_PLAN shows the execution plan for statements currently in the library cache.

233
MCQmedium

Your organization is migrating a critical 19c database to Oracle Database 23ai. The business requires that the cutover downtime be minimized, ideally under 10 minutes. You have a large database (20 TB) and a high transaction rate. Which migration method should you use to achieve the least downtime?

A.Use Oracle GoldenGate to replicate data to the 23ai database and perform a switchover.
B.Use the plug-in method with AutoUpgrade and a full backup/restore.
C.Use Data Pump full export/import with parallelism.
D.Use transportable tablespaces to move the data files to the 23ai database.
AnswerA

Oracle GoldenGate provides logical replication with minimal downtime. You can set up the target 23ai database, apply initial load, and start change data capture to keep it synchronized while the source remains online. At cutover, you stop application traffic, allow the target to catch up, and switch over. This reduces downtime to minutes, even for large databases with high transaction rates.

Why this answer

Oracle GoldenGate enables logical replication with near-zero downtime by keeping the target synchronized while the source remains online. At cutover, only a brief application pause is needed for the target to catch up and switch over. Data Pump, the plug-in method, and transportable tablespaces all require substantial downtime for a 20 TB database with high transactions, making them unsuitable for the 10-minute goal.

Exam trap

The trap here is assuming that physical migration methods like the plug-in or transportable tablespaces can achieve near-zero downtime, when they actually require significant downtime for large databases.

234
Multi-Selectmedium

Which THREE of the following are components of AI Vector Search in 23ai?

Select 3 answers
A.HNSW indexing
B.Automatic backup
C.Vector distance functions
D.VECTOR data type
E.JSON Schema validation
AnswersA, C, D

HNSW indexing is a genuine AI Vector Search component in 23ai, providing approximate nearest-neighbour vector indexes for fast similarity queries. It is one of the three components the stem asks for, alongside vector data types and vector distance functions.

Why this answer

Option A (HNSW indexing) is correct because Oracle AI Vector Search in 23ai supports Hierarchical Navigable Small World (HNSW) vector indexes, an in-memory graph-based index type used for fast approximate nearest-neighbor similarity searches on vector embeddings. Option C (Vector distance functions) is correct because AI Vector Search provides built-in distance metrics such as COSINE, DOT (inner product), EUCLIDEAN, and EUCLIDEAN_SQUARED, exposed through SQL functions like VECTOR_DISTANCE, which are essential for ranking vectors by similarity. Option D (VECTOR data type) is correct because 23ai introduces the native VECTOR data type, allowing vector embeddings to be stored directly in tables as a first-class column type with a specified number of dimensions and format (e.g., FLOAT32, INT8, BINARY).

Option B (Automatic backup) is not a component of AI Vector Search; it is a general database administration feature provided by RMAN and Oracle Cloud infrastructure, unrelated to vector search functionality. Option E (JSON Schema validation) is not part of AI Vector Search either; JSON schema validation relates to Oracle's JSON capabilities (e.g., IS JSON VALIDATE constraints), not to vector indexing, storage, or similarity search.

235
Multi-Selectmedium

Which TWO actions occur during a RMAN 'BACKUP AS COPY' operation?

Select 2 answers
A.Datafiles are compressed into a single backup piece.
B.The output file is an exact image copy of the datafile.
C.The file can be used immediately without RMAN restore.
D.The backup is stored in the RMAN proprietary backup format.
E.The backup is automatically encrypted.
AnswersB, C

BACKUP AS COPY writes a byte-for-byte identical image of each datafile rather than a proprietary backup piece, so the output is usable directly as a datafile. This satisfies the stem's requirement that the output be an exact image copy.

Why this answer

Option B is correct because RMAN 'BACKUP AS COPY' produces an image copy, which is a byte-for-byte duplicate of the datafile, including its block structure and headers, rather than a proprietary backup piece. Option C is correct because an image copy is a usable datafile in its own right; it can be brought online or referenced directly (for example, via SWITCH DATAFILE ... TO COPY) without first performing an RMAN RESTORE, since no conversion from backup format is needed.

Option A is incorrect because compression into a single backup piece describes a backup set, not an image copy, which is a one-to-one file copy. Option D is incorrect because the RMAN proprietary backup format applies to backup sets, whereas an image copy is an exact OS-level copy of the file. Option E is incorrect because encryption is not automatic; it must be explicitly enabled via configuration or the ENCRYPTION clause.

236
MCQhard

To improve performance, you suspect an index is missing. Which advisor should you invoke to get recommendations for new indexes?

A.SQL Tuning Advisor
B.Memory Advisor
C.ADDM
D.SQL Access Advisor
AnswerD

SQL Access Advisor analyses workload from the SQL cache and recommends indexes, materialised views and partitioning for the supplied workload, which directly satisfies the stem's need for new index recommendations. Unlike the SQL Tuning Advisor, which tunes individual statements, it evaluates an entire workload to propose missing indexes.

Why this answer

The SQL Access Advisor provides recommendations on schema design, including indexes and materialized views.

237
MCQmedium

Which user is responsible for the management of the Unified Audit trail?

A.SYSDBA
B.DBA
C.AUDIT_ADMIN
D.SECURITY_ADMIN
AnswerC

AUDIT_ADMIN holds the Oracle Database role that governs the Unified Audit trail, granting privileges to create, alter and drop audit policies, and to query and purge the trail itself. This directly satisfies the stem's requirement for the user accountable for managing that trail.

Why this answer

The AUDIT_ADMIN role is required for managing unified audit policies and data.

238
MCQmedium

You are performing a tablespace recovery. What is the first thing that must happen to the tablespace before recovery can start?

A.The tablespace must be set to read-only.
B.The database must be shut down.
C.The database must be in restricted mode.
D.The tablespace must be taken offline.
AnswerD

Taking the tablespace offline is mandatory before recovery begins, because Oracle cannot restore and recover datafiles while they remain open to users. Offlining the tablespace quiesces I/O against its datafiles, allowing the restore and subsequent media recovery to proceed without corrupting the online database.

Why this answer

The tablespace must be taken offline to perform recovery on its constituent datafiles.

239
MCQhard

When using Wide Tables, what is the impact on performance for queries that select only a small subset of columns?

A.No significant performance degradation
B.Severe performance degradation
C.Requires partitioning
D.Requires a full table scan
AnswerA

Wide tables store columns in a columnar, compressed format, so queries projecting a small subset read only the relevant column groups rather than full rows. This satisfies the stem by avoiding significant performance degradation, since irrelevant columns are never decompressed or scanned.

Why this answer

Wide Tables in 23ai are optimized to handle many columns without significant performance degradation compared to vertical splitting.

240
MCQhard

The Automatic SQL Plan Management (ASPM) feature is enabled. A new execution plan is identified for a high-load query that performs better during testing. How does the database verify this plan before evolving the baseline?

A.It flags the plan for manual DBA approval via the DBMS_SPM package.
B.It automatically promotes the plan based on the optimizer cost estimation.
C.It executes the SQL statement using the new plan and compares its performance metrics against the current baseline.
D.It relies on the Advisor to run a full analysis of the explain plan tree.
AnswerC

ASPM validates a candidate plan by executing the SQL statement with the new plan and comparing its performance metrics against the existing baseline. Only if the measured performance improves does the database accept and evolve the baseline, ensuring the change is verified rather than assumed.

Why this answer

The database performs a verification task where it executes the new plan and compares it against the baseline performance to decide if it should be accepted.

241
MCQeasy

Which of the following is true regarding Vector embeddings in 23ai?

A.They are stored as metadata
B.They are stored as arrays of floats
C.They are stored as images
D.They are stored as text
AnswerB

Vector embeddings in 23ai are stored using the VECTOR data type, which holds them as arrays of floating-point numbers. This native binary format supports efficient similarity searches using functions such as VECTOR_DISTANCE rather than text or character storage.

Why this answer

Vectors are typically generated by AI models and stored as arrays of floats.

242
Multi-Selectmedium

Which TWO methods can be used to tune SQL statements?

Select 2 answers
A.Increasing the number of backups
B.Dropping the database
C.Manual addition of optimizer hints
D.Changing user roles
E.SQL Tuning Advisor
AnswersC, E

Optimizer hints embedded in the SQL text directly override the optimizer's cost-based decisions, forcing a specific join method, index or access path. This manual method gives the DBA explicit control when statistics or transformations produce a poor plan.

Why this answer

Option C (Manual addition of optimizer hints) is correct because optimizer hints are directives embedded in SQL statements (e.g., /*+ INDEX(...) */ or /*+ FULL(...) */) that influence the query optimizer's execution plan, directly tuning statement performance. Option E (SQL Tuning Advisor) is correct because it is an Oracle tool that analyzes a SQL statement, its execution plan, and statistics, then produces tuning recommendations such as SQL profiles, indexes, or restructured SQL. The other options do not tune SQL statements: increasing backups (A) is a backup/recovery activity, dropping the database (B) is a destructive DDL operation, and changing user roles (D) is a security/privilege change, none of which affect query execution plans or SQL performance.

243
MCQhard

You need to perform a Rolling Upgrade using Data Guard. What is the minimum required configuration?

A.Physical Standby Database
B.Active Data Guard
C.Oracle GoldenGate
D.Snapshot Standby
AnswerA

A physical standby applies redo directly, so during a rolling upgrade the primary runs the new Oracle version while the standby stays on the old one, then roles swap. Logical standby or snapshot standby cannot sustain this cross-version redo apply, making physical standby the minimum configuration.

Why this answer

A physical standby database is required to perform a rolling upgrade using transient logical standby or switchover methods.

244
MCQhard

You are tuning a query that is performing poorly due to high 'buffer busy waits'. What is the likely cause?

A.PGA memory exhausted
B.Library cache contention
C.Excessive disk I/O
D.Multiple sessions accessing the same blocks
AnswerD

Buffer busy waits arise when sessions contend for the same data blocks concurrently in the buffer cache. Multiple sessions accessing identical blocks serialise on buffer pins and latches, so the wait event points directly to block-level contention rather than I/O latency or parsing overhead.

Why this answer

Buffer busy waits occur when multiple sessions try to modify the same block at the same time.

245
MCQhard

You are applying an Oracle Release Update (RU) in a Data Guard environment. Following the 'Rolling Upgrade' methodology, which instance should be patched first to ensure continuous availability?

A.The Standby database instance
B.The observer node only
C.The Primary database instance
D.Both instances simultaneously
AnswerA

Patching the standby first lets it apply the RU while the primary keeps serving users; a switchover then promotes the patched standby, and the old primary is patched afterwards. This sequence satisfies the rolling upgrade constraint of continuous availability, since no single instance is offline during the whole operation.

Why this answer

In an Oracle Data Guard rolling upgrade, the standby database is patched first because it can be upgraded while the primary continues serving production traffic. After the standby is patched and restarted, a switchover is performed so the patched standby becomes the new primary, and then the old primary (now standby) is patched. This sequence maintains continuous availability because at least one database instance is always online and serving requests.

Exam trap

The trap is confusing the observer node with a database instance, or assuming the primary must be patched first — candidates who don't understand the switchover sequence often pick the primary, which would cause downtime.

How to eliminate wrong answers

Option B is wrong because the observer node is only used in Fast-Start Failover configurations to monitor the broker and initiate failover; it is not a database instance and cannot be patched as part of the database rolling upgrade. Option C is wrong because patching the primary first would require taking the production database down, defeating the purpose of a rolling upgrade and causing downtime. Option D is wrong because patching both instances simultaneously eliminates any available database, causing a full outage and violating the continuous availability requirement.

246
MCQmedium

What is the primary benefit of using a SQL Profile?

A.They improve the accuracy of the optimizer
B.They fix the execution plan forever
C.They speed up physical I/O
D.They automatically gather new statistics
AnswerA

A SQL Profile supplies auxiliary statistics and corrections to the optimizer for a specific statement, letting it derive a better plan without changing the SQL text. That improved cardinality and cost estimation is what raises optimizer accuracy.

Why this answer

SQL Profiles improve the optimizer's choices by providing better selectivity and cardinality estimates.

247
Multi-Selecthard

Which THREE types of information are captured in an AWR snapshot?

Select 3 answers
A.Tablespace creation scripts
B.Library cache statistics
C.Database user passwords
D.System-wide wait events
E.SQL execution statistics
AnswersB, D, E

Important for parsing/memory health.

Why this answer

AWR captures workload, system statistics, and session activity.

248
MCQmedium

What is the primary benefit of using a 'Proxy PDB'?

A.Speeding up local backups
B.Bypassing security
C.Accessing remote PDB data
D.Increasing local storage
AnswerC

A Proxy PDB presents a remote PDB through a local database link, so applications connect locally while the actual data resides elsewhere. This satisfies the requirement of accessing remote PDB data without duplicating it, since queries are forwarded to the source PDB.

Why this answer

A Proxy PDB allows access to a PDB in a remote CDB.

249
Multi-Selectmedium

Which TWO of the following are benefits of using an RMAN recovery catalog?

Select 2 answers
A.Stores backup metadata for multiple databases.
B.Automatically encrypts all backups.
C.Eliminates the need for archivelogs.
D.Provides faster database performance.
E.Allows keeping backup history longer than the control file.
AnswersA, E

A recovery catalog is a separate schema holding RMAN metadata for many databases, so a single catalogue server can register and manage backups across the whole estate. This satisfies the benefit of centralised metadata, unlike the control file, which is tied to one database.

Why this answer

Option A is correct because an RMAN recovery catalog is a separate schema (typically in an Oracle database) that can store backup metadata for multiple target databases, unlike the control file which is per-database. Option E is correct because the recovery catalog retains RMAN metadata indefinitely, allowing backup history to be preserved far longer than the control file's limited retention (governed by CONTROL_FILE_RECORD_KEEP_TIME), which is essential for long-term restore and reporting needs. Options B, C, and D are incorrect: the catalog does not perform encryption (that is done via RMAN encryption settings or wallet), does not remove the need for archived redo logs (required for consistent backups and point-in-time recovery), and does not improve database performance since it is only a metadata repository.

Exam trap

The trap is confusing the recovery catalog with backup encryption or performance tuning; candidates may pick options that sound like general RMAN benefits rather than metadata management benefits specific to the catalog.

250
MCQeasy

What allows Memoptimized Write to perform so quickly?

A.Skipping index updates
B.Using NVMe storage
C.Disabling constraints
D.Avoiding synchronous redo writing
AnswerD

This reduces IO latency.

Why this answer

It avoids writing to the redo log synchronously.

251
MCQeasy

How do you check the status of all current RMAN backup jobs?

A.SHOW ALL
B.LIST JOB SUMMARY
C.SELECT * FROM V$RMAN_STATUS
D.REPORT SCHEMA
AnswerC

V$RMAN_STATUS is the dynamic performance view that records every RMAN job and its state, so querying it lists all current and completed backup operations with their status, satisfying the requirement to check all RMAN backup jobs.

Why this answer

V$RMAN_STATUS provides the most comprehensive view of backup job history and status.

252
Multi-Selectmedium

Which THREE operations are permitted on Blockchain tables?

Select 3 answers
A.VERIFY
B.DELETE
C.INSERT
D.UPDATE
E.SELECT
AnswersA, C, E

VERIFY is permitted on Blockchain tables, returning a cryptographic proof that rows remain untampered since insertion. It satisfies the stem's requirement by confirming ledger integrity without altering data, unlike DML operations that Blockchain tables restrict. Oracle implements this through hash-chain validation across the table's historical row versions.

Why this answer

Blockchain tables in Oracle Database are append-only, tamper-evident tables, so the permitted operations are INSERT (C), SELECT (E), and VERIFY (A). INSERT (C) is allowed because new rows can only be added to the end of the chain, which is how the table grows while preserving its hash-linked row history. SELECT (E) is allowed because reading and querying rows is unrestricted and does not alter the chain.

VERIFY (A) is allowed because it is the special operation that checks the table's hashes and signatures to confirm no rows have been tampered with. DELETE (B) and UPDATE (D) are not permitted, since blockchain tables are append-only and rows cannot be modified or removed after insertion.

Exam trap

OCP often tests the assumption that Blockchain tables behave like regular tables with extra security — candidates must remember that UPDATE and DELETE are categorically forbidden, and only INSERT, SELECT, and VERIFY are allowed.

253
MCQhard

In 23ai, if you want to audit 'CREATE TABLE' statements, which policy type should you use?

A.Unified Audit Policy
B.Fine-Grained Auditing (FGA)
C.Logon Trigger
D.Traditional Audit
AnswerA

Unified auditing captures CREATE TABLE as an auditable system action through a unified audit policy, which defines privileges, actions and objects in one policy applied database-wide. Traditional audit options and fine-grained auditing do not cover this statement type in 23ai.

Why this answer

Unified Audit Policies are the modern auditing framework introduced in 12c and fully integrated in 23ai, allowing you to audit specific actions like CREATE TABLE by specifying the privilege or action in a CREATE AUDIT POLICY statement. They replace the legacy traditional audit and provide a single, consistent mechanism for capturing both standard and fine-grained audit events. Because CREATE TABLE is a standard SQL statement, a unified policy with the CREATE TABLE action (or CREATE ANY TABLE privilege) is the correct and simplest way to audit it.

Exam trap

OCP often tests the distinction between Unified Audit Policies and Fine-Grained Auditing, tricking candidates into choosing FGA for DDL auditing when FGA is only for DML on specific columns/rows.

How to eliminate wrong answers

Option B is wrong because Fine-Grained Auditing (FGA) is designed to audit access to specific columns or rows based on a condition (e.g., SELECT on a sensitive column), not to audit DDL statements like CREATE TABLE. Option C is wrong because a Logon Trigger fires only at session logon and is used for session-level actions such as setting module names or blocking access, not for auditing DDL. Option D is wrong because Traditional Audit (AUDIT statement) is deprecated in favor of Unified Audit and does not provide the centralized, policy-based approach required in 23ai.

254
MCQeasy

What is the primary function of ADDM in Oracle Database 23ai?

A.To capture SQL execution plans
B.To migrate data between instances
C.To identify performance bottlenecks and provide recommendations
D.To automatically tune individual SQL statements
AnswerC

ADDM (Automatic Database Diagnostic Monitor) analyses Automatic Workload Repository data to detect performance bottlenecks and generate actionable recommendations. This directly satisfies the stem's requirement, distinguishing it from AWR, which merely collects statistics, and SQL Tuning Advisor, which targets individual statements.

Why this answer

ADDM analyzes AWR snapshots to identify performance bottlenecks and provide recommendations.

255
MCQeasy

Which of these is a benefit of using JSON Duality Views?

A.Mandatory schema changes
B.Improved backup speeds
C.Increased storage size
D.Unified JSON and relational access
AnswerD

JSON Duality Views expose the same underlying relational tables simultaneously as relational rows and as JSON documents, so applications can query either model without duplicating or transforming data. This gives unified JSON and relational access over one schema.

Why this answer

It allows developers to work with JSON while maintaining relational data integrity.

256
MCQeasy

What is the result of setting STATISTICS_LEVEL to 'BASIC'?

A.It increases CPU overhead
B.It enables SQL Tuning Advisor
C.It disables AWR and ADDM
D.It enables all features
AnswerC

Setting STATISTICS_LEVEL to BASIC disables Automatic Workload Repository snapshots and Automatic Database Diagnostic Monitor analysis, since both depend on TYPICAL-level statistics collection. This satisfies the scenario's requirement to stop AWR and ADDM entirely, unlike TYPICAL or ALL, which retain them.

Why this answer

Setting it to BASIC disables many diagnostic features, including AWR and ADDM.

257
Multi-Selecteasy

Which TWO are common audit types in Oracle?

Select 2 answers
A.Tablespace Auditing
B.Instance Auditing
C.Unified Auditing
D.Standard Auditing
E.Flashback Auditing
AnswersC, D

Unified Auditing consolidates all audit records into the AUDSYS schema and is enabled by relinking the Oracle binary, replacing the older split audit trails. It satisfies the stem as a genuine, currently supported Oracle audit type.

Why this answer

Unified Auditing (C) is correct because it is Oracle's modern audit framework, introduced in Oracle 12c, that consolidates all audit records into a single unified audit trail stored in the AUDSYS schema and managed via CREATE AUDIT POLICY and AUDIT statements. Standard Auditing (D) is correct because it is the traditional Oracle auditing mechanism (also called traditional auditing), configured with parameters such as AUDIT_TRAIL and the AUDIT statement, and it remains a recognized audit type alongside Unified Auditing. Tablespace Auditing (A) is not a valid Oracle audit type; tablespaces are storage structures, not an auditing category.

Instance Auditing (B) is not a standard Oracle audit type; auditing is configured at the database level, not as a separate 'instance' audit mode. Flashback Auditing (E) does not exist in Oracle; Flashback refers to technologies such as Flashback Query, Flashback Drop, and Flashback Database, which are unrelated to auditing.

Exam trap

OCP often tests audit framework names, and candidates pick plausible-sounding but non-existent types like 'Instance Auditing' or 'Tablespace Auditing' instead of the real Standard and Unified Auditing.

258
MCQmedium

You are managing an Oracle Database 23ai instance where a specific SQL statement is consuming excessive CPU. You want to identify the top SQL statements by CPU usage in real time. Which dynamic performance view should you query?

A.V$SQLSTATS
B.V$SQLAREA
C.V$SYSSTAT
D.V$SESSION
AnswerA

V$SQLSTATS provides statistics on SQL statements currently in the shared pool, aggregated by SQL_ID and plan hash value. It includes CPU_TIME, which is the cumulative CPU time consumed by the statement. This view is designed for efficient access to SQL statistics and is ideal for identifying high-CPU SQL in real time. It is updated frequently and is less resource-intensive than querying V$SQL directly for aggregation.

Why this answer

To identify top SQL statements by CPU usage in real time, you should query a view that aggregates CPU time per SQL statement and is optimized for quick access. V$SQLSTATS is designed for this purpose, providing cumulative CPU_TIME and other statistics for SQL statements in the shared pool. It is more efficient than V$SQLAREA and more granular than V$SYSSTAT.

V$SESSION does not aggregate CPU per SQL. Therefore, V$SQLSTATS is the correct choice.

Exam trap

The trap here is choosing V$SQLAREA because it is familiar, but V$SQLSTATS is the modern, more efficient view for real-time SQL statistics.

259
MCQmedium

You are analyzing a query with the SQL Tuning Advisor. The advisor recommends an 'SQL Profile'. What does the profile actually do?

A.It updates the table statistics
B.It creates a new index
C.It adds optimizer hints and cardinality adjustments
D.It rewrites the SQL query
AnswerC

An SQL Profile stores auxiliary information, including optimizer hints and adjusted cardinality estimates, that the optimiser applies when parsing the statement, steering it toward the advisor's recommended plan without editing the SQL text or changing statistics.

Why this answer

A SQL Profile provides additional optimizer hints and statistics corrections.

260
MCQhard

A DBA is troubleshooting a performance issue in Oracle Database 23ai. A query that previously used an index full scan now performs a full table scan. The DBA suspects that the optimizer's statistics are stale. Which action should the DBA take to confirm this suspicion?

A.Query DBA_TAB_STATISTICS and DBA_IND_STATISTICS to compare LAST_ANALYZED dates with the table modification timestamps.
B.Use DBMS_STATS.GATHER_TABLE_STATS with the default parameters and see if the plan changes.
C.Examine the execution plan and compare the estimated cardinality with the actual rows processed using DBMS_XPLAN.DISPLAY_CURSOR with the ALLSTATS LAST option.
D.Check the OPTIMIZER_MODE parameter to ensure it is set to ALL_ROWS.
AnswerC

By comparing estimated cardinality (from the optimizer) with actual rows (from runtime statistics) using DBMS_XPLAN.DISPLAY_CURSOR with ALLSTATS LAST, you can see if the optimizer's estimates are significantly off. If the estimates are inaccurate, it suggests stale or missing statistics. This directly confirms whether statistics are the cause of the suboptimal plan.

Why this answer

To confirm that stale statistics caused the optimizer to choose a full table scan, the DBA should compare the optimizer's estimated cardinality with the actual rows processed. If the estimates are far off, it indicates that the statistics do not reflect the current data. DBMS_XPLAN.DISPLAY_CURSOR with ALLSTATS LAST provides this comparison.

Merely checking LAST_ANALYZED dates or gathering statistics does not confirm the cause.

Exam trap

The trap here is assuming that gathering statistics or checking LAST_ANALYZED dates directly confirms stale statistics as the cause, when the definitive method is comparing estimated versus actual cardinality.

261
MCQmedium

You are investigating high CPU utilization in the database. Which view provides the top SQL statements currently in memory based on CPU usage?

A.V$SQLAREA
B.V$SESSION
C.V$SYSSTAT
D.V$LIBRARYCACHE
AnswerA

V$SQLAREA aggregates statistics per SQL statement across all cursors sharing the same text, including CPU usage, so it ranks the top statements resident in memory by CPU consumption. That matches the requirement to identify the highest-CPU SQL currently in memory.

Why this answer

V$SQLAREA contains aggregated statistics for SQL statements in the library cache, including CPU_TIME.

Page 3

Page 4 of 4

All pages