0% found this document useful (0 votes)
25 views116 pages

Oracle 1ZO 082 Practice Tests

Oracle 1ZO 082 Practice Tests

Uploaded by

bymash2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views116 pages

Oracle 1ZO 082 Practice Tests

Oracle 1ZO 082 Practice Tests

Uploaded by

bymash2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 116

Question 1:

You execute this command:

Sufficient storage is available in filesystem /u01. Which two statements are


true about the BIG_TBS tablespace? (Choose two.)

Solution
Overall explanation

Explanation

AUTOEXTEND is possible for any datafile. You cannot add a datafile to


BIGFILE tablespaces.

Bigfile tablespaces are supported only for locally managed tablespaces with
automatic segment space management, with three exceptions: locally
managed undo tablespaces, temporary tablespaces, and the SYSTEM
tablespace.

Read here - About Bigfile Tablespaces

https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/managing-
tablespaces.html#GUID-7E376766-D99D-4274-BF00-8DC1E6FC5063

Domain
Managing Tablespaces and Datafiles
Question 2:
View the Exhibits and examine the structure of the COSTS and PROMOTIONS
tables.

You want to display PROD_IDS whose promotion cost is less than the highest
cost PROD_ID in a promotion time interval.

Examine this SQL statement:

Exhibit 1.

Exhibit 2.
What will be the result?

Solution
Question 3:
Which two statements are true about UNDO and REDO? (Choose two.)
Solution
Overall explanation
Explanation

The generation of UNDO generates REDO – True – On a DML of Update or


Delete, old image of data goes to UNDO and the change vectors for the DML
are written to REDO.

DML modifies Oracle database objects and only generates UNDO – False – it
generates REDO too.

The generation of REDO generates UNDO – False – On a DML of Insert, REDO


is generated but no UNDO is generated because there is no old image of
data to save in UNDO.

DML modifies Oracle database objects and only generates REDO – False – it
generated UNDO too.

DML modifies Oracle database objects and generates UNDO and REDO – True
– In general, DML generates UNDO as well as REDO.

Domain
Managing Tables using DML statements

Question 4:
The ORCL database has RESUMABLE_TIMEOUT = 7200 and
DEFERRED_SEGMENT_CREATION = FALSE

User U1 has a 1 MB quota in tablespace DATA.

U1 executes this command:

SQL> CREATE TABLE t1 AS -

(SELECT object_name, sharing, created

FROM dba_objects);

U1 complains that the command is taking too long to execute.


In the alert log, the database administrator (DBA) finds this:

2017-03-06T12:15:17.183438+05:30

statement in resumable session 'User U1(136), Session 1, Instance 1' was


suspended due to ORA-01536: space quota exceeded for tablespace 'DATA'

Which are three actions any one of which the DBA could take to resume the
session? (Choose three.)
Overall explanation
Explanation

The error in alert log is about the tablespace quota so either space has to be
freed up or quota has to be increased.

RESUMABLE_TIMEOUT enables or disables resumable statements and


specifies resumable timeout at the system level.

Resumable space allocation is only possible when statements are executed


within a session that has resumable mode enabled.

Resumable space allocation is enabled for a session when the ALTER


SESSION ENABLE RESUMABLE statement is executed, and the
RESUMABLE_TIMEOUT initialization parameter is set to a non-zero value for
the session. When the RESUMABLE_TIMEOUT initialization parameter is set at
the system level, it is the default for an ALTER SESSION ENABLE RESUMABLE
statement that does not specify a timeout value. When an ALTER SESSION
ENABLE RESUMABLE statement specifies a timeout value, it overrides the
system default.

Read here - About Enabling and Disabling Resumable Space Allocation

DEFERRED_SEGMENT_CREATION doesn’t play a role here.

DEFERRED_SEGMENT_CREATION specifies the semantics of deferred


segment creation.

If set to true, then segments for tables and their dependent objects (LOBs,
indexes) will not be created until the first row is inserted into the table.

Before creating a set of tables, if it is known that a significant number of


them will not be populated, then consider setting this parameter to true. This
saves disk space and minimizes install time.

Read here - DEFERRED_SEGMENT_CREATION

Domain
Managing Users, Roles and Privileges
Question 5
Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and
SALARY.

Only the EMPLOYEE_ID column is indexed.

Rows exist for employees 100 and 200.

Examine this statement:

Which two statements are true? (Choose two.)


Question 6
In which three situations does a new transaction always start? (Choose
three.)
Domain
Understanding Data Definition Language

Question 7
Which two statements are true about views used for viewing tablespace and
datafile information? (Choose two.)

Overall explanation
Explanation
V$TABLESPACE displays tablespace information from the control file

Read here - V$TABLESPACE

Domain
Managing Tablespaces and Datafiles

Question 8Skip
In one of your databases, the user HR has the password HRMGR.

You want to connect to a database instance whose listener listens on port


1531 by using this statement:

CONNECT HR/HRMGR@orcl -

No name server is used.

Which statement is true about ORCL?


Overall explanation
Explanation

It must be a valid tnsnames.ora entry on client’s machine.

Read here:

Client Connections

Read here - Client Connections

Domain
Configuring Oracle Net Services

Question 9
Examine the description of the PROMOTIONS table:

You want to display the unique promotion costs in each promotion category.

Which two queries can be used? (Choose two.)


Question 10
Which three statements are true about inner and outer joins? (Choose three.)
Overall explanation
Explanation

An inner join (sometimes called a simple join) is a join of two or more tables
that returns only those rows that satisfy the join condition.

Read here - Inner Joins


An outer join extends the result of a simple join. An outer join returns all rows
that satisfy the join condition and also returns some or all of those rows from
one table for which no rows from the other satisfy the join condition.

Read here – Outer Joins

Domain
Displaying Data from Multiple Tables Using Joins

Question 11
Which two statements are true about the results of using the INTERSECT
operator in compound queries? (Choose two.)
Question 12
Which two statements are true about the ORDER BY clause when used with a
SQL statement containing a SET operator such as UNION? (Choose two.)
Question 13Skipped
In one of your databases, you create a user, HR, and then execute this
command:

GRANT CREATE SESSION TO hr WITH ADMIN OPTION;

Which four actions can HR perform? (Choose four.)


Question 14Skipped
Your database instance is started with a PFILE.

Examine these parameters:

You want to increase the size of the buffer cache.

Free memory is available to increase the size of the buffer cache.

You execute the command:

SQL> ALTER SYSTEM SET DB_CACHE_SIZE=1024M;

What is the outcome?

Overall explanation
Explanation
If a server parameter file was used to start up the database, then BOTH is
the default. If a parameter file was used to start up the database, then
MEMORY is the default, as well as the only scope you can specify.

Read here - ALTER SYSTEM

Domain
Managing Tablespaces and Datafiles

Question 15
In the ORCL database, UNDOTBS1 is the active undo tablespace with these
properties:

1. A size of 100 MB

2. AUTOEXTEND is off

3. UNDO_RETENTION is set to 15 minutes

4. It has RETENTION GUARANTEE

UNDOTBS1 fills with uncommitted undo 10 minutes after the database


opens.

What will happen when the next update is attempted by any transaction?
Overall explanation

Explanation

As UNDO is already filled up and AUTOEXTEND is off, the next transaction


will cause error. The parameter UNDO_RETENTION is not playing any role in
this scenario.

Starting with Oracle Database release 19c, version 19.7, for both
AUTOEXTEND undo tablespaces and fixed-size undo tablespaces, the system
retains undo for at least the time specified in this parameter, and
automatically tunes the undo retention period to satisfy the undo
requirements of the queries.
In earlier versions of Oracle Database release 19c, the behavior is different
for the two types of undo tablespaces. For AUTOEXTEND undo tablespaces,
the system retains undo for at least the time specified in this parameter, and
automatically tunes the undo retention period to satisfy the undo
requirements of the queries. For fixed-size undo tablespaces, the system
automatically tunes for the maximum possible undo retention period, based
on undo tablespace size and usage history, and ignores UNDO_RETENTION
unless retention guarantee is enabled for the tablespace

Read here - UNDO_RETENTION

Domain
Managing Undo

Question 16
Which three statements are true about GLOBAL TEMPORARY TABLES?
(Choose three.)
Overall explanation
Explanation

Specify GLOBAL TEMPORARY to create a temporary table, whose definition is


visible to all sessions with appropriate privileges. The data in a temporary
table is visible only to the session that inserts the data into the table.
When you first create a temporary table, its metadata is stored in the data
dictionary, but no space is allocated for table data. Space is allocated for the
table segment at the time of the first DML operation on the table.

Read here - CREATE TABLE

Domain
Using Subqueries to Solve Queries

Question 17
Which three statements are true about the tools used to configure Oracle
Net Services? (Choose three.)
Overall explanation
Explanation

A listener is configured with one or more listening protocol addresses,


information about supported services, and parameters that control its
runtime behavior. The listener configuration is stored in a configuration file
named listener.ora.

Because the configuration parameters have default values, it is possible to


start and use a listener with no configuration. This default listener has a
name of LISTENER, supports no services on startup, and listens on the
following TCP/IP protocol address:

(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))

Read here – Overview of Oracle Net Listener

Oracle Net Services provides user interface tools and command-line utilities
to configure, manage, and monitor the network.

Oracle Net Configuration Assistant is a standalone tool that enables you to


configure listeners and naming methods.

Oracle Enterprise Manager Cloud Control combines configuration


functionality across multiple file systems, along with listener administrative
control to provide an integrated environment for configuring and managing
Oracle Net Services.

Oracle Net Manager provides configuration functionality for an Oracle home


on a local client or server host.

Command-line control utilities to configure, administer, and monitor network


components, including listeners and Oracle Connection Managers.

Read here - About Oracle Net Services

Domain
Configuring Oracle Net Services

Question 18
Examine this description of the TRANSACTIONS table:

Which two SQL statements execute successfully? (Choose two.)


Question 19
Which three are types of segments in an Oracle Database? (Choose three.)
Overall explanation
Explanation

Indexes, Tables and Clusters appear in DBA_SEGMENTS as SEGMENT_TYPE.

Read here - DBA_SEGMENTS

Domain
Managing Sequences, Synonyms, Indexes
Question 20Skipped
Examine this command and some partial output:

Why does the DB01.abc.com service show unknown status?


Question 21
Which two statements are true regarding the UNION and UNION ALL
operators? (Choose two.)
Question 22
Which statement is true about the INTERSECT operator used in compound
queries?
Overall explanation
Explanation

You can combine multiple queries using the set operators UNION, UNION ALL,
INTERSECT, and MINUS. All set operators have equal precedence. If a SQL
statement contains multiple set operators, then Oracle Database evaluates
them from the left to right unless parentheses explicitly specify another
order.

Read here - The UNION [ALL], INTERSECT, MINUS Operators

Domain
Displaying Data from Multiple Tables Using Joins

Question 23
Which three Oracle database space management features will work with
both Dictionary and Locally managed tablespaces? (Choose three.)
Overall explanation
Explanation

Except Online shrink operations, all other actions have no dependency on


DMT or LMT.

Shrink operations can be performed only on segments in locally managed


tablespaces with automatic segment space management (ASSM). Within an
ASSM tablespace, all segment types are eligible for online segment shrink
except these:

IOT mapping tables

Tables with rowid based materialized views

Tables with function-based indexes

SECUREFILE LOBs
Tables compressed with the following compression methods:

Basic table compression using ROW STORE COMPRESS BASIC

Warehouse compression using COLUMN STORE COMPRESS FOR QUERY

Archive compression using COLUMN STORE COMPRESS FOR ARCHIVE

However, tables compressed with advanced row compression using ROW


STORE COMPRESS ADVANCED are eligible for online segment shrink. See
"Consider Using Table Compression" for information about table compression
methods.

Read here - Shrinking Database Segments Online

Domain
Managing Tablespaces and Datafiles

Question 24
Which two statements are true about the SET VERIFY ON command? (Choose
two.)
Overall explanation
Explanation

The SET VERIFY ON command works in SQL Developer and SQL*Plus. It


displays the vars created by DEFINE command.

SET VER[IFY] {ON | OFF}

Controls whether to list the text of a SQL statement or PL/SQL command


before and after replacing substitution variables with values. ON lists the
text; OFF suppresses the listing.

Read here - SET VER[IFY] {ON | OFF}

Domain
Managing Users, Roles and Privileges
Question 25
Which three statements are true concerning logical and physical database
structures? (Choose three.)

Overall explanation
Explanation

All tablespaces may have one or more data files - False - Bigfile tablespaces
can have only one datafile.
The extents of a segment must always reside in the same datafile - False -
Extents of a segment can span across multiple datafiles for smallfile
tablespaces as such tablespaces can have multiple datafiles.

A smallfile tablespace might be bigger than a bigfile tablespace - True - A


smallfile tablespace can be bigger if segments have grown enough.

A segment can span multiple data files in some tablespaces - True - A


segment can span across multiple datafiles for smallfile tablespaces as such
tablespaces can have multiple datafiles.

A segment's blocks can be of different sizes - False - A segment can be only


of one block size like 8k/16k/32k etc and it depends on the block size of the
tablespace in which the segment has been created.

A segment might have only one extent - True - If segment is very small, it
might have only one extent.

Segments can span multiple tablespaces - False - A segment can span only
one tablespace. For paritioned tables, different partitions can resize in
different tablespaces.

Domain
Managing Tablespaces and Datafiles

Question 26
Which two statements are true about Enterprise Manager Database Express?
(Choose two.)
Question 27Skipped
Evaluate these commands which execute successfully:
Which two statements are true about the ORD_ITEMS table and the ORD_SEQ
sequence? (Choose two.)
Overall explanation
Explanation

If sequence ORD_SEQ is dropped then the default value for column ORD_NO
will be NULL for rows inserted into ORD_ITEMS – False

The data in existing rows will not be impacted.

Any user inserting rows into table ORD_ITEMS must have been granted
access to sequence ORD_SEQ – True

Else, the insert will fail.


Column ORD_NO gets the next number from sequence ORD_SEQ whenever a
row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO –
True

That’s the purpose of the DEFAULT ord_seq.NEXTVAL here.

Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can
cycle 20 times – False

It will recycle after 100000 numbers.

Sequence ORD_SEQ is guaranteed not to generate duplicate numbers – False

After MAXVALUE 100000, it will start giving duplicate values.

Domain
Managing Tables using DML statements

Question 28Skipped
Examine the description of the CUSTOMERS table:

For customers whose income level has a value, you want to display the first
name and due amount as 5% of their credit limit. Customers whose due
amount is null should not be displayed.

Which query should be used?


Question 29
Which two statements are true about date/time functions in a session where
NLS_DATE_FORMAT is set to DD-MON-YYYY HH24:MI:SS? (Choose two.)

Overall explanation
Explanation

CURRENT_.... will return the data according to local session time zone.

Domain
Managing Data in Different Time Zone
Question 30
A database is configured to use automatic undo management with
temporary undo enabled.

An UPDATE is executed on a temporary table.

Where is the UNDO stored?

Overall explanation
Explanation

By default, undo records for temporary tables are stored in the undo
tablespace and are logged in the redo, which is the same way undo is
managed for persistent tables. However, you can use the
TEMP_UNDO_ENABLED initialization parameter to separate undo for
temporary tables from undo for persistent tables. When this parameter is set
to TRUE, the undo for temporary tables is called temporary undo.

Read here - Managing Temporary Undo


Domain
Managing Undo

Question 31
Which two are true about a SQL statement using SET operators such as
UNION? (Choose two.)

Overall explanation
Explanation

The number of columns in all SELECT must be name, column names can be
different.
The data type group should be same.

You can combine multiple queries using the set operators UNION, UNION ALL,
INTERSECT, and MINUS. All set operators have equal precedence. If a SQL
statement contains multiple set operators, then Oracle Database evaluates
them from the left to right unless parentheses explicitly specify another
order.

The corresponding expressions in the select lists of the component queries of


a compound query must match in number and must be in the same data
type group (such as numeric or character).

Read here – The UNION [ALL], INTERSECT, MINUS Operators

Domain
Managing Sequences, Synonyms, Indexes

Question 32
Which two statements are true regarding a SAVEPOINT? (Choose two.)
Overall explanation
Explanation

SAVEPOINT can work only across soft DMLs like DELETE/UPDATE/INSERT etc,
not across hard DMLs like TRUNCATE or DDLs like CREATE INDEX etc.

Domain
Managing Tables using DML statements

Question 33
Which three statements are true about the DESCRIBE command? (Choose
three.)
Overall explanation
Explanation

DESCRIBE command doesn’t display primary key constraints, only NOT NULL
constraints.

It can be run from any tool which is able to run SQL in command prompt
mode.

Domain

Using Subqueries to Solve Queries

Question 34
Which three statements about dropping and unused columns in an Oracle
database are true? (Choose three.)

Overall explanation
Explanation

A primary key column referenced by another column as a foreign key can be


dropped if using the CASCADE option. – True. You can achieve this by
running a command like ALTER TABLE <table> DROP COLUMN <column>
CASCADE CONSTRAINTS;

Partition key columns cannot be dropped. – True. You will get error - ORA-
12984: cannot drop partitioning column

A column that is set to UNUSED still counts towards the limit of 1000
columns per table – True. Adding more columns will give this error until you
really drop the unused columns - ORA-01792: Maximum Number Of Columns
In A Table Or View Is 1000

Domain
Restricting and Sorting Data

Question 35
Examine this command:

Which two statements are true? (Choose two.)


Overall explanation
Explanation

Due to REUSE clause, the file will be renamed in same place.

When you run the ALTER DATABASE MOVE DATAFILE statement and a file
with the same name exists in the destination location, you can specify the
REUSE option to overwrite the existing file. When REUSE is not specified, and
a file with the same name exists in the destination location, the existing file
is not overwritten, and the statement returns an error.

Read here - Renaming and Relocating Online Data Files

Domain
Managing Tablespaces and Datafiles
Question 36Skipped
The SCOTT/TIGER user exists in two databases, BOSTON_DB and DALLAS_DB,
in two different locations.

Each database has a tnsnames.ora file defining DALLAS_DB as a service


name.

Examine this command:

CREATE DATABASE LINK dblink1 CONNECT TO scott IDENTIFIED BY tiger


USING 'dallas_db';

How do you execute the command so that only SCOTT in BOSTON_DB can
access the SCOTT schema in DALLAS_DB?

Overall explanation
Explanation
You connect the required schema in source database and create the
database link pointing to the remote database.

Read here - CREATE DATABASE LINK

Domain
Moving Data

Question 37
You need to calculate the number of days from 1 January 2019 until today.

Dates are stored in the default format of DD-MON-RR.

Which two queries give the required output? (Choose two


Question 38
Which three instance situations are possible with the Oracle Database server
without multi-tenant? (Choose three.)
Overall explanation
Explanation

One instance can mount none or maximum one database.

Domain
Managing Tables using DML statements
Overall explanation
Explanation

Process Monitor Process (PMON)

The process monitor (PMON) detects the termination of other background


processes. If a server or dispatcher process terminates abnormally, then the
PMON group is responsible for performing process recovery. Process
termination can have multiple causes, including operating system kill
commands or ALTER SYSTEM KILL SESSION statements.

Read here - Process Monitor Process (PMON)

Domain
Retrieving Data using the SQL SELECT Statement
Question 40Skipped
Which three statements are true about single-row functions? (Choose three.)

Overall explanation
Explanation

Single-row functions like DECODE, ROUND etc can be used in SELECT as well
as WHERE clauses of a SQL.

The argument can be a column, variable, literal or expression.

Example:

select DECODE(COALESCE(NVL(ROUND(TRUNC(5)),4),3),2)1) from dual;


Many functions accept more than one argument like DECODE.

For a table, these functions can return as many results as the number of
rows in the table like ROUND(<column>) or just one results like SUM or
anything else too like SUM combined with GROUP BY.

Domain
Retrieving Data using the SQL SELECT Statement

Question 41
Which two statements are true about the rules of precedence for operators?
(Choose two.)
Overall explanation
Explanation

Read here - Operator Precedence

Domain
Managing Users, Roles and Privileges

Question 42Skipped
Which three statements are true about a self join? (Choose three.)
Overall explanation
Explanation

A self join SQL can be written in ANSI standard where 'JOIN' and 'ON'
keywords are used or in Oracle standard where 'WHERE' clause is used.

ANSI SQL format:

select e.*

from emp e
join dept d

on e.deptno = d.deptno

Oracle SQL format:

select e.*

from emp e, dept d

where e.deptno = d.deptno

A self join SQL can be equijoin, inner join or outer join.

Domain
Displaying Data from Multiple Tables Using Joins

Question 43Skipped
Which two statements are true about the DUAL table? (Choose two.)
Overall explanation
Explanation

DUAL is a table automatically created by Oracle Database along with the


data dictionary. DUAL is in the schema of the user SYS but is accessible by
the name DUAL to all users. It has one column, DUMMY, defined to be
VARCHAR2(1), and contains one row with a value X.

Read here – Selecting from the DUAL Table

Domain
Managing Storage
Question 44Skipped
Examine the description of the CUSTOMERS table:

You want to display details of all customers who reside in cities starting with
the letter D followed by at least two characters.

Which query can be used?


Question 45Skipped
Examine the description of the EMPLOYEES table:
Which query is valid?

Question 46Skipped
In the spfile of a single instance database, LOCAL_LISTENER is set to
LISTENER_1.

The TNSNAMES.ORA file in $ORACLE_HOME/network/admin in the database


home contains:
Which statement is true?

Overall explanation
Explanation
The listener forwards client requests to supported services. These services
are dynamically registered with the listener. This dynamic registration
feature is called service registration. The registration is performed by the
Listener Registration (LREG) process. Dynamic service registration does not
require any manual configuration in the listener.ora file.

Read here - Overview of Oracle Net Listener

Domain
Configuring Oracle Net Services

Question 47Skipped
Which three statements are true about undo segments and the use of undo
by transactions in an Oracle database instance? (Choose three.)
Question 48Skipped
Which two statements are true about single row functions? (Choose two.)

Overall explanation
Explanation

MOD returns the remainder of a division operation, not quotient.

FLOOR returns the largest integer equal to or less than a given number.

CONCAT can take any number of arguments in Oracle 21c but in Oracle 19c,
it takes only 2 arguments.

Read here -
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/
CONCAT.html#GUID-D8723EA5-C93A-45C3-83FB-1F3D2A4CEAF2
TRUNC works are NUMBER and DATE values.

CEIL can be used for positive and negative numbers.

Domain
Using Single-Row Functions to Customize Output

Question 49Skipped
You want to apply the principle of Least Privilege in all your live databases.

One of your requirements is to revoke unnecessary privileges from all users


who have them using Privilege Analysis.

Which three types of analyses can be done using the


DBMS_PRIVILEGE_CAPTURE package? (Choose three.)
Overall explanation
Explanation

Privilege Analysis excludes the SYS user. It is evident by this.

CREATE_CAPTURE Procedure Parameters


type G_DATABASE: Captures all privilege use in the database, except
privileges used by the SYS user.

Privilege Analysis covers both, direct and indirect.

When using role-based analysis for the CREATE_CAPTURE procedure,


privilege use is analyzed even if the privilege is indirectly granted to the
specified role.

Read here – DBMS_PRIVILEGE_CAPTURE

Domain
Managing Users, Roles and Privilege

Question 50Skipped
You want to use table compression suitable for OLTP that will:

1. Compress rows for all DML statements on that table

2. Minimize the overheads associated with compression

Which compression option is best suited for this?


Overall explanation
Explanation

Advanced row compression caused minimum CPU Overload and is good for
OLTP/DSS.
Read here - About Table Compression

Domain
Managing Storage

Question 51Skipped
The EMPLOYEES table contains columns EMP_ID of data type NUMBER and
HIRE_DATE of data type DATE.

You want to display the date of the first Monday after the completion of six
months since hiring.

The NLS_TERRITORY parameter is set to AMERICA in the session and,


therefore, Sunday is the first day on the week.

Which query can be used?


Overall explanation
Explanation

NEXT_DAY returns the date of the first weekday named by char that is later
than the date date. The return type is always DATE, regardless of the data
type of date.

Read here - NEXT_DAY

Domain
Retrieving Data using the SQL SELECT Statement

Question 52Skipped
Which three statements are true about the Oracle Data Dictionary? (Choose
three.)
Overall explanation
Explanation

Data Dictionary views are created by joins of dictionary base tables, not
DBA-defined tables.

These are owned by SYS, not SYSTEM users.

Contents of the Data Dictionary


The data dictionary consists of base tables and views.

These objects are defined as follows:

Base tables

These store information about the database. Only Oracle Database should
write to and read these tables. Users rarely access the base tables directly
because they are normalized and most data is stored in a cryptic format.

Views

These decode the base table data into useful information, such as user or
table names, using joins and WHERE clauses to simplify the information. The
views contain the names and descriptions of all objects in the data
dictionary. Some views are accessible to all database users, whereas others
are intended for administrators only.

Read here - Contents of the Data Dictionary

How Oracle Database Uses the Data Dictionary

The Oracle Database user account SYS owns all base tables and user-
accessible views of the data dictionary.

Read here - Storage of the Data Dictionary

Domain
Managing Schema Objects

Question 53Skipped
You execute this command:

During the export operation, you detach from the job by using CTRL+C and
then execute this command:
Export> STOP_JOB=immediate -

Are you sure you wish to stop the job ([yes]/no): yes

Which two statements are true about the job? (Choose two.)

Overall explanation
Explanation

You can reattach to it and monitor it – True

It is paused and can be resumed - True

The Oracle Data Pump Export interactive command mode STOP_JOB


parameter stops the current job. It stops the job either immediately, or after
an orderly shutdown, and exits Export.

Purpose
Stops the current job, either immediately, or after an orderly shutdown, and
exits Export.

If the Data Pump control job table and dump file set are not disturbed when
or after the STOP_JOB command is issued, then the job can be attached to
and restarted at a later time with the START_JOB command.

To perform an orderly shutdown, use STOP_JOB (without any associated


value). A warning requiring confirmation will be issued. An orderly shutdown
stops the job after worker processes have finished their current tasks.

Read here - STOP_JOB

Question 54Skipped
Which three statements are true about time zones, date data types, and
timestamp data types in an Oracle database? (Choose three.)
Overall explanation
Explanation

The CURRENT_TIMESTAMP function returns data without time zone


information – False

CURRENT_TIMESTAMP returns the current date and time in the session time
zone, in a value of data type TIMESTAMP WITH TIME ZONE. The time zone
offset reflects the current local time of the SQL session. If you omit precision,
then the default is 6. The difference between this function and
LOCALTIMESTAMP is that CURRENT_TIMESTAMP returns a TIMESTAMP WITH
TIME ZONE value while LOCALTIMESTAMP returns a TIMESTAMP value.

Read here - CURRENT_TIMESTAMP


A TIMESTAMP WITH LOCAL TIMEZONE data type column is stored in the
database using the time zone of the session that inserted the row – False

TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP. It


differs from TIMESTAMP WITH TIME ZONE as follows: data stored in the
database is normalized to the database time zone, and the time zone offset
is not stored as part of the column data.

Read here – TIMESTAMP WITH LOCAL TIME ZONE Data Type

A TIMESTAMP data type column contains information about year, month, and
day – True

Year, month, and day values of date, as well as hour, minute, and second
values of time, where fractional_seconds_precision is the number of digits in
the fractional part of the SECOND datetime field.

Read here – Oracle Built-in Data Types

The DBTIMEZONE function can return an offset from Universal Coordinated


Time (UTC) – True

DBTIMEZONE returns the value of the database time zone. The return type is
a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time
zone region name, depending on how the user specified the database time
zone value in the most recent CREATE DATABASE or ALTER DATABASE
statement.

Read here – DBTIMEZONE

The SESSIONTIMEZONE function can return an offset from Universal


Coordinated Time (UTC) – True

SESSIONTIMEZONE returns the time zone of the current session. The return
type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a
time zone region name, depending on how the user specified the session
time zone value in the most recent ALTER SESSION statement.
Read here - SESSIONTIMEZONE

Domain
Managing Data in Different Time Zone
Question 55Skipped
You have been tasked to create a table for a banking application.

One of the columns must meet three requirements:

1. Be stored in a format supporting date arithmetic without using conversion


functions

2. Store a loan period of up to 10 years

3. Be used for calculating interest for the number of days the loan remains
unpaid

Which data type should you use?


Question 56Skipped
Which two statements are true about space-saving features in an Oracle
Database? (Choose two.)
Overall explanation
Explanation

The database does not create an index segment when creating an unusable
index.

Read here
- https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/
managing-indexes.html#GUID-FA0C46EC-DA22-4484-AF52-58BC0CBEEC81

When you make an existing index unusable, its index segment is dropped.

Read here - Understand When to Use Unusable or Invisible Indexes

Overview of Temporary Tables


Creating Private Temporary Tables

Private temporary tables are temporary database objects that are dropped at
the end of a transaction or session. Private temporary tables are stored in
memory and each one is visible only to the session that created it.

Read here - Creating Private Temporary Tables

Question 57Skipped
Which three statements are true about advanced connection options
supported by Oracle Net for connection to Oracle Database instances?
(Choose three.)
Overall explanation
Explanation

First, we need to understand the basics here.

Connect Time Failover and Transparent Application Failover (TAF) are 2


different features.
Connect-Time Failover:

It requires 2 or more listener addresses in the TNS string.

It enables a new connection to an alternate listener address during the


connection attempt if the first listener address in the TNS string is not
available to connect to. If you already are connected to a database, then it
plays no role. Also, as it is a connect-time feature, it has nothing to do with a
specific driver.

It is achieved by adding FAILOVER=ON at the top of the TNS string.

Transparent Application Failover (TAF):

It requires 1 or more listener addresses in the TNS string.

It enables the automatic re-connection of an already connected session to an


alternate database/service in the TNS string if the currently connected
database/service become unavailable.

TAF involves manual configuration of a network service name that includes


the FAILOVER_MODE parameter (TYPE, METHOD, RETRIES, DELAY) included
in the CONNECT_DATA section of the connect descriptor.

With FAILOVER_TYPE=SELECT, if there is an ongoing SELECT, then SELECT


will restart with the new connection in a transparent manner to the end user.
If there is ongoing DML, then the active transactions will roll back.

With FAILOVER_TYPE=SESSION, only connection is established again and


nothing else is done.

With FAILOVER_TYPE=NONE, nothing is done.

Read here - What Transparent Application Failover Restores

- What Transparent Application Failover Restores

- Implementing Transparent Application Failover

-
Transparent Application Failover (TAF) is a feature of the Java Database
Connectivity (JDBC) Oracle Call Interface (OCI) driver.

Read here - Enabling Advanced Features of Oracle Net Services

Load Balancing can balance the number of connections to dispatchers when


using a Shared Server configuration. That's true.

Read here - Shared Server Configuration for an Oracle RAC Database

SOURCE_ROUTE - When set to on, this parameter instructs Oracle Net to use
each address in the order presented until the destination is reached.

Read here - About the Address List Parameters

Question 58Skipped
Which three functions are performed by dispatchers in a shared server
configuration? (Choose three.)
Overall explanation
Explanation

Shared Server - When the first request is received from a client, the
Dispatcher process places this request on a common queue. The request is
picked up by an available shared server process. The Dispatcher process
then manages the communication between the client and the shared server
process.
Read here - Comparing DRCP to Dedicated Server and Shared Server

Question 59
What is true about non-equijoin statement performance? (Choose two.)

Overall explanation
Explanation

SQLs having alias take less time to parse.

Read here - Alias length impact on performance

Question 60Skipped
Which two statements are true about the Automatic Diagnostic Repository
(ADR)? (Choose two.)
Overall explanation
Explanation

Oracle Clusterware ADR data is written under a root directory known as the
ADR base, not inside an Oracle Database schema.

The database, Oracle Automatic Storage Management (Oracle ASM), the


listener, Oracle Clusterware, and other Oracle products or components store
all diagnostic data in the ADR.

Question 61Skipped
Which two statements are true regarding Oracle database space
management within blocks managed by Automatic Segment Space
Management (ASSM)?

(Choose two.)
Overall explanation
Explanation

PCTFREE defaults to 10% for all blocks in all segments for all compression
methods – False

This statement is mostly true but not fully. This statememt is false because
tables with COMPRESS or COMPRESS BASIC use a PCTFREE value of 0 to
maximize compression as per Oracle Support Doc ID 1223705.1.

Primary Note for OLTP Compression (Doc ID 1223705.1)

Note: Tables with COMPRESS or COMPRESS BASIC use a PCTFREE value of 0


to maximize compression, unless you explicitly set a value for PCTFREE in
the physical_attributes_clause. Tables with COMPRESS FOR OLTP or
NOCOMPRESS use the PCTFREE default value of 10, to maximize compress
while still allowing for some future DML changes to the data, unless you
override this default explicitly.

More details about PCTFREE

Specify a whole number representing the percentage of space in each data


block of the database object reserved for future updates to rows of the
object. The value of PCTFREE must be a value from 0 to 99. A value of 0
means that the entire block can be filled by inserts of new rows. The default
value is 10. This value reserves 10% of each block for updates to existing
rows and allows inserts of new rows to fill a maximum of 90% of each block.

PCTFREE has the same function in the statements that create and alter
tables, partitions, clusters, indexes, materialized views, materialized view
logs, and zone maps.

Read here - physical_attributes_clause

ASSM assigns blocks to one of four fullness categories based on what


percentage of the block is allocated for rows – True

SPACE_USAGE Procedures

Returns information about free blocks in an auto segment space managed


segment

SPACE_USAGE Procedure Parameters

fs1_blocks Number of blocks having at least 0 to 25% free space

fs1_bytes Number of bytes having at least 0 to 25% free space

fs2_blocks Number of blocks having at least 25 to 50% free space

fs2_bytes Number of bytes having at least 25 to 50% free space

fs3_blocks Number of blocks having at least 50 to 75% free space

fs3_bytes Number of bytes having at least 50 to 75% free space

fs4_blocks Number of blocks having at least 75 to 100% free space


fs4_bytes Number of bytes having at least 75 to 100% free space

Read here - DBMS_SPACE ASA_RECOMMENDATIONS Function

Insert operations always attempt to find blocks with free space appropriate
to the length of the row being inserted - True

Update operations always attempt to find blocks with free space appropriate
to the length of the row being updated – False

How PCTFREE and PCTUSED Work Together

In a newly allocated data block, the space available for inserts is the block
size minus the sum of the block overhead and free space (PCTFREE).
Updates to existing data can use any available space in the block. Therefore,
updates can reduce the available space of a block to less than PCTFREE.

After a data block is filled to the limit determined by PCTFREE, Oracle


Database considers the block unavailable for the insertion of new rows until
the percentage of that block falls beneath the parameter PCTUSED. Until this
value is achieved, Oracle Database uses the free space of the data block
only for updates to rows already contained in the data block. A block
becomes a candidate for row insertion when its used space falls below
PCTUSED.

Read here - physical_attributes_clause

A block will always be eligible for inserts if the row is short enough to fit into
the block – False

A block becomes a candidate for row insertion when its used space falls
below PCTUSED.

Question 62Skipped
The INVOICE table has a QTY_SOLD column of data type NUMBER and an
INVOICE_DATE column of data type DATE.

NLS_DATE_FORMAT is set to DD-MON-RR.


Which three are true about data type conversions involving these columns in
query expressions? (Choose three.)

Overall explanation
Explanation

Oracle does VARCHAR to NUMBER and VARCHAR to DATE implicit conversion.

Question 63Skipped
Examine the description of the SALES1 table:
SALES2 is a table with the same description as SALES1.

Some sales data is duplicated in both tables.

You want to display the rows from the SALES1 table which are not present in
the SALES2 table.

Which set operator generates the required output?


Overall explanation
Explanation

The operator MINUS is used to subtract the result set of one query from
another’s.

Question 64Skipped
In your data center, Oracle Managed Files (OMF) is used for all databases.

All tablespaces are small file tablespaces.

SALES_Q1 is a permanent user-defined tablespace in the SALES database.

Examine this command which is about to be issued by a DBA logged into the
SALES database:

ALTER TABLESPACE sales_q1 ADD DATAFILE;

Which are two actions, either of which you could take to ensure that the
command executes successfully? (Choose two.)
Overall explanation
Explanation

Specify ADD to add to the tablespace a data file or temp file specified by
file_specification.

If you omit file_specification, then Oracle Database creates an Oracle


Managed File of 100M with AUTOEXTEND enabled.

Read here – ALTER TABLESPACE

Question 65Skipped
In one of your databases, user KING is:

1. Not a DBA user


2. An operating system (OS) user

Examine this command and its output:

What must you do so that KING is authenticated by the OS when connecting


to the database instance?

Overall explanation
Explanation
Externally authenticated users are authenticated by the operating system or
network service.

You can create users who are authenticated externally. Oracle Database
then relies on this external login authentication when it provides that specific
operating system user with access to the database resources of a specific
user.

Use the IDENTIFIED EXTERNALLY clause of the CREATE USER statement to


create users who are authenticated externally.

The following example creates a user who is identified by Oracle Database


and authenticated by the operating system or a network service. This
example assumes that the OS_AUTHENT_PREFIX parameter has been set to a
blank space (" ").

CREATE USER psmith IDENTIFIED EXTERNALLY;

Read here – Creating a User Who Is Authenticated Externally

Question 66Skipped
You want to write a query that prompts for two column names and the
WHERE condition each time it is executed in a session but only prompts for
the table name the first time it is executed.

The variables used in your query are never undefined in your session.

Which query can be used?


Question 67Skipped
Which four statements are true regarding primary and foreign key
constraints and the effect they can have on table data? (Choose four.)
Overall explanation
Explanation

CONSTRAINT clause

A CONSTRAINT clause is an optional part of a CREATE TABLE statement or


ALTER TABLE statement. A constraint is a rule to which data must conform.
Constraint names are optional.

A CONSTRAINT can be one of the following:


a column-level constraint

Column-level constraints refer to a single column in the table and do not


specify a column name (except check constraints). They refer to the column
that they follow.

a table-level constraint

Table-level constraints refer to one or more columns in the table. Table-level


constraints specify the names of the columns to which they apply. Table-
level CHECK constraints can refer to 0 or more columns in the table.

Column constraints include:

NOT NULL

Specifies that this column cannot hold NULL values (constraints of this type
are not nameable).

PRIMARY KEY

Specifies the column that uniquely identifies a row in the table. The identified
columns must be defined as NOT NULL.

Note: If you attempt to add a primary key using ALTER TABLE and any of the
columns included in the primary key contain null values, an error will be
generated and the primary key will not be added. See ALTER TABLE
statement for more information.

UNIQUE

Specifies that values in the column must be unique.

FOREIGN KEY

Specifies that the values in the column must correspond to values in a


referenced primary key or unique key column or that they are NULL.

CHECK

Specifies rules for values in the column.

Table constraints include:

PRIMARY KEY
Specifies the column or columns that uniquely identify a row in the table.
NULL values are not allowed.

UNIQUE

Specifies that values in the columns must be unique.

FOREIGN KEY

Specifies that the values in the columns must correspond to values in


referenced primary key or unique columns or that they are NULL.

Note: If the foreign key consists of multiple columns, and any column is
NULL, the whole key is considered NULL. The insert is permitted no matter
what is on the non-null columns.

CHECK

Specifies a wide range of rules for values in the table.

Column constraints and table constraints have the same function; the
difference is in where you specify them. Table constraints allow you to
specify more than one column in a PRIMARY KEY, UNIQUE, CHECK, or
FOREIGN KEY constraint definition. Column-level constraints (except for
check constraints) refer to only one column.

Read here – Types of Integrity Constraints

When a parent key is modified, referential integrity constraints can specify


the following actions to be performed on dependent rows in a child table:

No action on deletion or update

Cascading deletions (DELETE CASCADE)

Deletions that set null (DELETE SET NULL)

Read here – Parent Key Modifications and Foreign Keys

Parent Key Modifications and Foreign Keys


Question 68Skipped
Which two statements are true about the WHERE and HAVING clauses in a
SELECT statement? (Choose two.)

Overall explanation
Explanation

Aggregating functions and columns used in HAVING clauses must be


specified in the SELECT list of a query – False

SELECT list doesn’t need to have all function/columns specified in HAVING


clauses.
WHERE and HAVING clauses can be used in the same statement only if
applied to different table columns – False – Even a statement applied on a
single table can have WHERE and HAVING, both the clauses.

The HAVING clause can be used with aggregating functions in subqueries –


True – Example HAVING COUNT(1) > 2

The WHERE clause can be used to exclude rows before dividing them into
groups – True – WHERE clause is run before dividing the output in groups.

The WHERE clause can be used to exclude rows after dividing them into
groups – False – WHERE clause is run before dividing the output in groups.

Overall explanation
Explanation

The trace file and alert log contain information about errors.
Each server and background process can write to an associated trace file.
When an internal error is detected by a process, it dumps information about
the error to its trace file. Some of the information written to a trace file is
intended for the database administrator, and other information is for Oracle
Support Services. Trace file information is also used to tune applications and
instances.

Read here – About Monitoring Errors with Trace Files and the Alert Log

Question 70Skipped
Which four account management capabilities can be configured using Oracle
profiles? (Choose four.)
Overall explanation
Explanation

the number of hours for which an account is locked after the configured
number of login attempts has been reached - True

the number of days for which an account is locked after the configured
number of login attempts has been reached – True

You can use fractions of days for all parameters that limit time, with days as
units. For example, 1 hour is 1/24 and 1 minute is 1/1440.

PASSWORD_LOCK_TIME

Specify the number of days an account will be locked after the specified
number of consecutive failed login attempts. If you omit this clause, then the
default is 1 day.

the ability to prevent a password from ever being reused - True

PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX

These two parameters must be set in conjunction with each other.


PASSWORD_REUSE_TIME specifies the number of days before which a
password cannot be reused. PASSWORD_REUSE_MAX specifies the number of
password changes required before the current password can be reused. For
these parameter to have any effect, you must specify a value for both of
them.

If you specify a value for either of these parameters and specify UNLIMITED
for the other, then the user can never reuse a password.

the number of days for which an account may be inactive before it is locked -
True

INACTIVE_ACCOUNT_TIME

Specify the permitted number of consecutive days of no logins to the user


account, after which the account will be locked. The minimum value is 15
days. The maximum value is 24855. If you omit this clause, then the default
is UNLIMITED.

the maximum amount of CPU time allowed for a user's sessions before their
account is locked – False – Account will not get locked because CPU over
usage.

the ability to prevent a password from ever being reused – False – Not
possible to do this. Password can be reused after certain number of days as
set in the profile.

the maximum number of sessions permitted for a user before the account is
locked – False – Account will not get locked because of excessive number of
sessions.

Read here - CREATE PROFILE

You might also like