1z0-082: Oracle Database Administration I Topic 2
Question #: 41
Topic #: 1
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?
A. SELECT emp_id, ADD_MONTHS(hire_date, 6), NEXT_DAY(‘MONDAY’) FROM employees;
B. SELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), ‘MONDAY’) FROM employees;
C. SELECT emp_id, NEXT_DAY(MONTHS_BETWEEN(hire_date, SYSDATE), 6) FROM employees;
D. SELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1) FROM employees;
Selected Answer: B
Question #: 42
Topic #: 1
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.)
A. Add a data file to DATA
B. Drop other U1 objects in DATA
C. Increase U1’s quota sufficiently in DATA
D. Set DEFERRED_SEGMENT_CREATION to TRUE
E. Grant UNLIMITED TABLESPACE to U1
F. Set AUTOEXTEND ON for data files in DATA
Selected Answer: BCE
Question #: 43
Topic #: 1
Which three statements are true about the Oracle Data Dictionary? (Choose three.)
A. Data dictionary views are created by joins of dictionary base tables and DBA-defined tables
B. The data dictionary is created and maintained by the database administrator
C. Views with the same name but different prefixes, such as CDB, DBA, ALL and USER, reference the same base tables from the data dictionary
D. Base tables can be queried directly
E. It is owned by the SYSTEM user
F. Usernames of all users including database administrators are stored in the data dictionary
Selected Answer: CDF
Question #: 44
Topic #: 1
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?
A. It must be the value of the SERVICE_NAMES parameter on the client side
B. It must resolve to a valid connect descriptor in the server’s tnsnames.ora file
C. It must resolve to a valid connect descriptor in the client’s tnsnames.ora file
D. It must be the name of the database to whose instance HR wishes to connect
E. It must be the name of the server running the database to whose instance HR wishes to connect
Selected Answer: C
Question #: 45
Topic #: 1
Which two statements are true about views used for viewing tablespace and datafile information? (Choose two.)
A. Tablespace free space can be viewed in V$TABLESPACE
B. V$TABLESPACE displays information that is contained in the controlfile about tablespaces
C. V$TABLESPACE displays information about tablespaces contained in the data dictionary
D. Tablespace free space can be viewed in DBA_TABLESPACES
E. A datafile can be renamed when the database is in MOUNT state and the new file name is displayed when querying DBA_DATA_FILES after the database is opened
Selected Answer: BE
Question #: 46
Topic #: 1
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.)
A. SELECT promo_cost, promo_category FROM promotions ORDER BY by 1;
B. SELECT DISTINCT promo_cost || ‘ in ‘ || DISTINCT promo_category FROM promotions ORDER BY 1;
C. SELECT DISTINCT promo_category || ‘ has ‘ || promo_cost AS COSTS FROM promotions ORDER BY 1;
D. SELECT promo_category, DISTINCT promo_cost FROM promotions ORDER BY 2;
E. SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;
Selected Answer: CE
Question #: 47
Topic #: 1
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?
A. It succeeds and the generated undo is stored in SYSTEM.
B. It fails and returns the error message ג€ORA-30036: unable to extend segment by 8 in undo tablespace ‘UNDOTBS1’ג€.
C. It succeeds and the least recently written undo block of UNDOTBS1 is overwritten by the generated undo.
D. It succeeds and the generated undo is stored in SYSAUX.
E. It succeeds and the least recently read undo block of UNDOTBS1 is overwritten by the generated undo.
Selected Answer: B
Question #: 48
Topic #: 1
Which two statements are true about the rules of precedence for operators? (Choose two.)
A. The concatenation operator | | is always evaluated before addition and subtraction in an expression
B. NULLS influence the precedence of operators in an expression
C. The + binary operator has the highest precedence in an expression in a SQL statement
D. Arithmetic operators with equal precedence are evaluated from left to right within an expression
E. Multiple parentheses can be used to override the default precedence of operators in an expression
Selected Answer: DE
Question #: 49
Topic #: 1
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?
A. Set OS_AUTHENT_PREFIX to OPS$
B. Have the OS administrator add KING to the OSDBA group
C. Grant DBA to KING
D. Unset REMOTE_LOGIN_PASSWORDFILE
E. Alter user KING to be IDENTIFIED EXTERNALLY
Selected Answer: E
Question #: 50
Topic #: 1
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?
A. It gives an error because the ALL keyword is not valid
B. It gives an error because the GROUP BY clause is not valid
C. It executes successfully but does not give the required result
D. It executes successfully and gives the required result
Selected Answer: D
Question #: 51
Topic #: 1
Which three statements are true about GLOBAL TEMPORARY TABLES? (Choose three.)
A. A TRUNCATE command issued in a session causes all rows in a GLOBAL TEMPORARY TABLE for the issuing session to be deleted.
B. GLOBAL TEMPORARY TABLE rows inserted by a session are available to any other session whose user has been granted select on the table.
C. GLOBAL TEMPORARY TABLE space allocation occurs at session start.
D. Any GLOBAL TEMPORARY TABLE rows existing at session termination will be deleted.
E. A GLOBAL TEMPORARY TABLE’S definition is available to multiple sessions.
F. A DELETE command on a GLOBAL TEMPORARY TABLE cannot be rolled back.
Selected Answer: ADE
Question #: 52
Topic #: 1
Which two statements are true about trace files produced by the Oracle Database server? (Choose two.)
A. They can be written by server processes
B. Trace files are written to the Fast Recovery Area (FRA)
C. They can be written by background processes
D. All trace files contain error information that require contacting Oracle Support
E. Trace file names are based on the database name concatenated with a sequential number
Selected Answer: AC
Question #: 53
Topic #: 1
st
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.)
A. SELECT TO_CHAR(SYSDATE, ‘DD-MON-YYYY’) ג€” ’01-JAN-2019′ FROM DUAL;
B. SELECT ROUND(SYSDATE ג€” ’01-JAN-2019′) FROM DUAL;
C. SELECT ROUND(SYSDATE ג€” TO_DATE(’01/JANUARY/2019′)) FROM DUAL;
D. SELECT TO_DATE(SYSDATE, ‘DD/MONTH/YYYY’) ג€” ’01/JANUARY/2019′ FROM DUAL;
E. SELECT SYSDATE ג€” TO_DATE(’01-JANUARY-2019′) FROM DUAL;
Selected Answer: CE
Question #: 54
Topic #: 1
Which two statements are true about the DUAL table? (Choose two.)
A. It can be accessed only by the SYS user
B. It consists of a single row and single column of VARCHAR2 data type
C. It can display multiple rows but only a single column
D. It can be used to display only constants or pseudo columns
E. It can be accessed by any user who has the SELECT privilege in any schema
F. It can display multiple rows and columns
Selected Answer: BF
Question #: 55
Topic #: 1
Which four statements are true regarding primary and foreign key constraints and the effect they can have on table data? (Choose four.)
A. A table can have only one primary key but multiple foreign keys
B. A table can have only one primary key and one foreign key
C. The foreign key columns and parent table primary key columns must have the same names
D. It is possible for child rows that have a foreign key to remain in the child table at the time the parent row is deleted
E. It is possible for child rows that have a foreign key to be deleted automatically from the child table at the time the parent row is deleted
F. Only the primary key can be defined at the column and table level
G. Primary key and foreign key constraints can be defined at both the column and table level
Selected Answer: ADEG
Question #: 56
Topic #: 1
Examine the description of the EMPLOYEES table:
Which query is valid?
A. SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id;
B. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id;
C. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id, join_date;
D. SELECT dept_id, MAX(AVG(salary)) FROM employees GROUP BY dept_id;
Selected Answer: C
Question #: 57
Topic #: 1
What is true about non-equijoin statement performance? (Choose two.)
A. Table aliases can improve performance
B. The BETWEEN condition always performs better than using the >= and <= conditions
C. The join syntax used makes no difference to performance
D. The BETWEEN condition always performs less well than using the >= and <= conditions
E. The Oracle join syntax performs better than the SQL:1999 compliant ANSI join syntax
Selected Answer: AC
Question #: 58
Topic #: 1
In your data center, Oracle Managed Files (OMF) is used for all databases.
All tablespaces are smallfile 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 in to the SALES database:
ALTER TABLESPACE sales_q1 ADD DATAFILE;
Which are two actions, either one of which you could take to ensure that the command executes successfully? (Choose two.)
A. Ensure that DB_RECOVERY_FILE_DEST and DB_CREATE_FILE_DEST each specify with at least 50 Mb of available space.
B. Specify a path in the DATAFILE clause of the command specifying a location with at least 100M of available space.
C. Ensure that DB_CREATE_FILE_DEST specifies a location with at least 100 Mb of available space.
D. Add the AUTOEXTEND ON clause with NEXT set to 100M.
E. Ensure that DB_RECOVERY_FILE_DEST and DB_CREATE_FILE_DEST each specify locations with at least 50 Mb of available space.
Selected Answer: BC
Question #: 59
Topic #: 1
Examine this command and some partial output:
Why does the DB01.abc.com service show unknown status?
A. The service DB01.abc.com is dynamically registered
B. The LOCAL_LISTENER database parameter is not set to a service name that refers to LISTENER_1
C. The service DB01.abc.com is statically registered
D. The listener is not listening on the default port 1521
E. The SID_LIST_LISTENER section is not contained in the LISTENER.ORA file
Selected Answer: C
Question #: 60
Topic #: 1
Which three statements are true about the tools used to configure Oracle Net Services? (Choose three.)
A. The Oracle Net Configuration Assistant is only used when running the Oracle installer
B. Oracle Net Manager can be used to centrally configure listeners on any database server target
C. The lsnrctl utility requires a listener.ora file to exist before it is started
D. Oracle Net Manager can be used to locally configure naming methods on a database server
E. Enterprise Manager Cloud Control can be used to centrally configure listeners on any managed database server
F. Enterprise Manager Cloud Control can be used to centrally configure net service names for any database server target
Selected Answer: DEF
Question #: 61
Topic #: 1
Which two statements are true regarding the UNION and UNION ALL operators? (Choose two.)
A. Duplicates are eliminated automatically by the UNION ALL operator
B. The number of columns selected in each SELECT statement must be identical
C. The names of columns selected in each SELECT statement must be identical
D. The output is sorted by the UNION ALL operator
E. NULLS are not ignored during duplicate checking
Selected Answer: BE
Question #: 62
Topic #: 1
Which two statements are true about the Automatic Diagnostic Repository (ADR)? (Choose two.)
A. The ADR base defaults to $ORACLE_HOME/rdbms/admin if neither DIAGNOSTIC_DEST nor ORACLE_BASE is set
B. The ADR base defaults to $ORACLE_HOME/dbs if the DIAGNOSTIC_DEST parameter and the ORACLE_BASE environment variable are not set
C. It supports diagnostics for Automatic Storage Management (ASM)
D. It supports diagnostics for Oracle Clusterware
E. It is held inside an Oracle database schema
Selected Answer: CD
Question #: 63
Topic #: 1
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.)
A. analysis of all privileges used by all users including administrative users in the database
B. analysis of all privileges used by all users but excluding administrative users in the database
C. analysis of privileges that a user has on their own schema objects that they did not use
D. analysis of privileges that a user has on their own schema objects that they did use
E. analysis of privileges granted directly to a role that are then used by a user who has been granted that role
F. analysis of privileges granted indirectly to a role that are then used by a user who has been granted that role
Selected Answer: BEF
Question #: 64
Topic #: 1
Which three statements are true about undo segments and the use of undo by transactions in an Oracle database instance? (Choose three.)
A. An undo segment may be used by multiple transactions simultaneously
B. Undo segments can wrap around to the first extent when a transaction fills the last extend of the undo segment
C. Undo segments have a minimum of three extents
D. Undo segments can extend when a transaction fills the last extent of the undo segment
E. A single transaction may use multiple undo segments simultaneously
F. Undo segments must be stored in a BIGFILE tablespace
G. Undo segments must be stored in a SMALLFILE tablespace
Selected Answer: ABD
Question #: 65
Topic #: 1
Which two statements are true about Enterprise Manager Database Express? (Choose two.)
A. It is available only when the database is open
B. It can be used to perform database recovery
C. The same port number can be used for Database Express configurations for databases on different hosts
D. It can be used to switch a database into ARCHIVELOGMODE
E. The same port number can be used for multiple Database Express configurations for multiple databases on the same host
Selected Answer: AC
Question #: 66
Topic #: 1
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.)
A. Employee 100 will have SALARY set to the same value as the SALARY of employee 200
B. Employee 200 will have JOB_ID set to the same value as the JOB_ID of employee 100
C. Employee 200 will have SALARY set to the same value as the SALARY of employee 100
D. Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200
E. Employees 100 and 200 will have the same JOB_ID as before the update command
F. Employees 100 and 200 will have the same SALARY as before the update command
Selected Answer: AD
Question #: 67
Topic #: 1
Which two are true about a SQL statement using SET operators such as UNION? (Choose two.)
A. The data type group of each column returned by the second query must match the data type of the corresponding column returned by the first query.
B. The number, but not names, of columns must be identical for all SELECT statements in the query.
C. The data type of each column returned by the second query must exactly match the data type of the corresponding column returned by the first query.
D. The names and number of columns must be identical for all SELECT statements in the query.
E. The data type of each column returned by the second query must be implicitly convertible to the data type of the corresponding column returned by the first query.
Selected Answer: AB
Question #: 68
Topic #: 1
Which three statements are true about time zones, date data types, and timestamp data types in an Oracle database? (Choose three.)
A. The CURRENT_TIMESTAMP function returns data without time zone information
B. A TIMESTAMP WITH LOCAL TIMEZONE data type column is stored in the database using the time zone of the session that inserted the row
C. A TIMESTAMP data type column contains information about year, month, and day
D. The DBTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
E. The SESSIONTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
Selected Answer: BDE
Question #: 69
Topic #: 1
Which three statements are true about inner and outer joins? (Choose three.)
A. A full outer join returns matched and unmatched rows
B. An inner join returns matched rows
C. Outer joins can only be used between two tables per query
D. A full outer join must use Oracle syntax
E. Outer joins can be used when there are multiple join conditions on two tables
F. A left or right outer join returns only unmatched rows
Selected Answer: ABE
Question #: 70
Topic #: 1
Examine this description of the TRANSACTIONS table:
Which two SQL statements execute successfully? (Choose two.)
A. SELECT customer_id AS ג€CUSTOMER-IDג€, transaction_date AS DATE, amount + 100 ג€DUESג€ FROM transactions;
B. SELECT customer_id AS ג€CUSTOMER-IDג€, transaction_date AS ג€DATEג€, amount + 100 DUES FROM transactions;
C. SELECT customer_id AS CUSTOMER-ID, transaction_date AS TRANS_DATE, amount + 100 ג€DUES AMOUNTג€ FROM transactions;
D. SELECT customer_id CUSTID, transaction_date TRANS_DATE, amount + 100 DUES FROM transactions;
E. SELECT customer_id AS 'CUSTOMER-ID', transaction_date AS DATE, amount + 100 'DUES AMOUNT' FROM transactions;
Selected Answer: BD
Question #: 71
Topic #: 1
The CUSTOMERS table has a CUST_CREDIT_LIMIT column of data type NUMBER.
Which two queries execute successfully? (Choose two.)
A. SELECT NVL(cust_credit_limit * .15, 'Not Available') FROM customers;
B. SELECT NVL2(cust_credit_limit * .15, 'Not Available') FROM customers;
C. SELECT NVL(TO_CHAR(cust_credit_limit * .15), 'Not Available') FROM customers;
D. SELECT TO_CHAR(NVL(cust_credit_limit * .15, 'Not Available')) FROM customers;
E. SELECT NVL2(cust_credit_limit, TO_CHAR(cust_credit_limit * .15), 'Not Available') FROM customers;
Selected Answer: CE
Question #: 72
Topic #: 1
Which statement is true about aggregate functions?
A. Aggregate functions can be nested to any number of levels
B. The AVG function implicitly converts NULLS to zero
C. Aggregate functions can be used in any clause of a SELECT statement
D. The MAX and MIN functions can be used on columns with character data types
Selected Answer: D
Question #: 73
Topic #: 1
Your database instance was shut down normally and then started in NOMOUNT state. You then execute this command:
ALTER DATABASE MOUNT;
Which two actions are performed? (Choose two.)
A. The online redo logs are opened
B. The online data files are opened
C. The alert log records the execution details
D. The Oracle background processes are started
E. The initialization parameter file is read
F. The control file is read
Selected Answer: CF
Question #: 74
Topic #: 1
Which two are true about shrinking a segment online? (Choose two.)
A. It is not possible to shrink either indexes or Index Organized Tables (IOTs)
B. It always eliminates all migrated rows if any exist in the table
C. To shrink a table it must have a PRIMARY KEY constraint
D. To shrink a table it must have a UNIQUE KEY constraint
E. To shrink a table it must have row movement enabled
F. It must be in a tablespace that uses Automatic Segment Space Management (ASSM)
Selected Answer: EF
Question #: 75
Topic #: 1
Examine these commands:
Which two statements are true about the sqlldr execution? (Choose two.)
A. It overwrites data in EMP with data in EMP.DAT
B. It uses the database buffer cache to load data
C. It generates a log that contains control file entries, which can be used with normal SQL*Loader operations
D. It generates a sql script that it uses to load data from EMP.DAT to EMP
E. It appends data from EMP.DAT to EMP
Selected Answer: CE
Question #: 76
Topic #: 1
A script abc.sql must be executed to perform a job.
A database user HR, who is defined in this database, executes this command:
$ sqlplus hr/hr@orcl @abc.sql
What will happen upon execution?
A. The command succeeds and HR will be connected to the orcl and abc.sql databases
B. The command succeeds and HR will be connected to the orcl database instance, and the abc.sql script will be executed
C. The command fails because the script must refer to the full path name
D. The command fails and reports an error because @ is used twice
Selected Answer: B
Question #: 77
Topic #: 1
Which three statements are true regarding indexes? (Choose three.)
A. A UNIQUE index can be altered to be non-unique
B. A SELECT statement can access one or more indices without accessing any tables
C. A table belonging to one user can have an index that belongs to a different user
D. An update to a table can result in updates to any or all of the table's indexes
E. When a table is dropped and is moved to the RECYCLE BIN, all indexes built on that table are permanently dropped
F. An update to a table can result in no updates to any of the table's indexes
Selected Answer: BDF
Question #: 78
Topic #: 1
Which three statements are true about Oracle synonyms? (Choose three.)
A. A synonym cannot be created for a PL/SQL package
B. A synonym can be available to all users
C. A SEQUENCE can have a synonym
D. A synonym created by one user can refer to an object belonging to another user
E. Any user can drop a PUBLIC synonym
Selected Answer: BCD
Question #: 79
Topic #: 1
View the Exhibit and examine the structure of the PRODUCTS table.
Which two tasks require subqueries? (Choose two.)
A. Display the number of products whose PROD_LIST_PRICE is more than the average PROD_LIST_PRICE
B. Display suppliers whose PROD_LIST_PRICE is less than 1000
C. Display products whose PROD_MIN_PRICE is more than the average PROD_LIST_PRICE of all products, and whose status is orderable
D. Display the total number of products supplied by supplier 102 which have a product status of obsolete
E. Display the minimum PROD_LIST_PRICE for each product status
Selected Answer: AC
Question #: 80
Topic #: 1
The SALES_Q1 and USERS tablespaces exist in one of your databases and TEMP is a temporary tablespace.
Segment creation is not deferred.
You execute this command:
Which three statements must be true so that the SALES user can create tables in SALES_Q1? (Choose three.)
A. The sales user must have a quota on the TEMP tablespace
B. The sales user must have a quota on the SALES_Q1 tablespace to hold the initial extends of all tables they plan to create in their schema
C. The sales user must have been granted the CREATE SESSION privilege
D. The sales user must have their quota on the users tablespace removed
E. The sales user must have a quota on the SALES_Q1 tablespace to hold all the rows to be inserted into any table in their schema
F. The sales user must have been granted the CREATE TABLE privilege
Selected Answer: BCF