Oracle Practice Test - 5
Oracle Database practice test covering SQL, PL/SQL, database administration, RMAN, memory architecture, and Oracle Forms.
Questions
Which system privilege must the RMAN user have to be able to connect and execute RMAN commands on a target database?
- SYSDBA
- SYSOPER
- No system privileges are required for the RMAN user.
- Only SYS user can connect and execute RMAN commands on a target database.
Which physical file contains the name and location of datafiles?
- Redo log file
- Paramerter File
- Password File
- Control File
Sequence values cannot be cached.
- True
- False
In creating a procedure, you may get a message if you have compile errors. Which of the following is true?
- The line numbers reported match the line numbers you see in your text editor.
- SQL*Plus will automatically show the errors to you.
- To see the errors, enter SHOW ERRORS in SQL*Plus.
- If there are no syntax errors, you will receive the message NO ERRORS.
An export that backs up tables that have changed since the last cumulative or complete export is known as _____.
- an incremental export
- a cumulative export
- a complete export
- a full export
Which character is used to continue a statement in SQL*Plus?
- *
- /
- -
- @
- =
The titles of all the books that meet the following criteria has to be displayed:
- Purchased before Feb 21, 2002
- Price is less than $500 or greater than $900
The result has to be sorted by the date of purchase, starting with the most recently bought book.
Which of the following statements should be used?
- SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '21-FEB-2002' ORDER BY purchase_date
- SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date< '21-FEB-2002' ORDER BY purchase date ASC
- SELECT book_title FROM books WHERE price < 500 OR>900 AND purchase_date DESC
- SELECT Book_title FROM books WHERE (price < 500 OR Price>900)AND purchase_date<'21-FEB-2002' ORDER BY purchase date DESC
Consider the following scenario: In a multiform application, the user started in FormA.
From FormA, the user invoked FormB using CALL_FORM.
From FormB, the user invoked FormC using OPEN_FORM.
From FormC, the user invoked FormD using OPEN_FORM.
From FormB, the user invoked FormE using CALL_FORM.
There is an additional form in the application, called FormF. Which of the following statements is true?- FormF can be invoked from FormC using CALL_FORM.
- FormF can be invoked from FormA using OPEN_FORM.
- FormF can be invoked from FormD using CALL_FORM.
- FormF can be invoked from FormE using CALL_FORM.
- FormF can be invoked from FormB using OPEN_FORM.
A user issued a connection request which was picked up by the listener on an Oracle Shared Server. The listener provided the user process with the address of an existing dispatcher process. What is the next step in this process?
- The user process is handed off to a dedicated server process.
- The user process connects directly to the dispatcher.
- The dispatcher process places the user request in a response queue.
- The user process connects directly to the Oracle Shared Server process.
All of the following can only be used with numeric data types except _____.
- AVG
- COUNT
- SUM
- STDDEV
What is the output of the given query?
SELECT ROWNUM,ENAME,SAL FROM EMP WHERE ROWNUM<=2
- It shows only the second record.
- It shows only the record 1 and 2.
- It shows no row rows selected.
- None of these
Which of the following actions is required to prevent row migration on a table?
- Decrease PCTUSED
- Increase PCTUSED
- Decrease PCTFREE
- Increase PCTFREE
- Increase database block size
If you want to change a replicated table's structure, how will you proceed?
- Open Oracle Enterprise manager and change the table's structure.
- Make the change by calling DBMS_REPCAT.ALTER_MASTER_REPOBJECT().
- Get any popular third party GUI tool to make the change.
- Open SQL*Plus and make the change at each of the replicated sites.
A latch is defined as ____.
- a mechanism used by the Oracle optimizer to run user queries in parallel
- a mechanism to prevent data files that make up the database from auto-extending
- a mechanism used by the background process PMON for cleaning up the caches and freeing up resources the user processes were using
- a low-level serialization mechanism to protect shared data structures in the system global area
Examine the structure of the given STUDENTS table.
STUDENT_ID NUMBER NOT NULL, Primary Key
STUDENT_NAME VARCHAR2 (30)
COURSE_ID VARCHAR2 (10) NOT NULL
MARKS NUMBER
START_DATE DATE
FINISH_DATE DATE
A report is to be created of ten students who achieved the highest ranking in the course INT_SQL and completed the course in the year 1999.
Which SQL statements accomplishes this task?
- SELECT student_id, marks, ROWNUM “Rank” FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL'ORDER BY marks DESC;
- SELECT student_id, marks, ROWID “Rank” FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99'AND course_id = 'INT_SQL'ORDER BY marks;
- SELECT student_id, marks, ROWNUM “Rank” FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);
- SELECT student_id, marks, ROWNUM “Rank” FROM (SELECT student_id, marks FROM students WHERE finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC)WHERE ROWNUM <= 10 ;
Which memory area is used to cache the data dictionary information?
- Database Buffer Cache
- PGA
- Redo Log Buffer
- Shared Pool
The cost-based optimizer can choose between a nested loops join and a sort merge join operation. All tables are analyzed and the OPTIMIZER_MODE is set to FIRST_ROWS. Which execution plan will be the result?
- The sort-merge join
- The nested loops join
- This depends on some sort parameter values.
- This depends on the number of rows in each table.
Examine the following statement:
ALTER DATABASE BACKUP CONTROL FILE TO 'control01.bkp';
What does the statement generate?
- A file containing a SQL statement which will re-create the database
- A text copy to the control file
- A binary copy of the control file
- A file containing a SQL statement which will re-create the control file
What type of view is implemented as a subquery embedded in the FROM clause of a SELECT statement and is identified by an alias?
- Simple
- Inline
- Complex
- Nested
The files that are created when an oracle background process encounters an exception are _______.
- redo files
- exec files
- control files
- trace files
Three possible credit ratings are assigned to customers: Poor, Good, and Excellent (represented numerically by 1, 2, and 3). A RATING column was added to the CUSTOMERS table and the DBA has to add an item to his form so that credit ratings can be recorded.
To restrict data entry clerks to one of these three values, he decided to create a radio group for the Rating item. With the item node of the Customers block selected in the Object Navigator, he clicked Create. He then opened the Property Palette for the new item and set properties as follows:
Name: RATING
Item Type: Radio Group
Data Type: Number
Column Name: Rating
Canvas: CUSTOMER_CV
He opened the CUSTOMER_CV canvas in the Layout Editor, but the Rating item does not appear. How can he get the Rating item to appear on the canvas?
- Create a Radio Button for the radio group.
- Set the Visible property of the Rating item to Yes.
- Delete the radio group and create it in the Layout Editor because a radio group that is created in the Object Navigator will not appear on a canvas.
- Change the width of the Rating item because the default width of a radio group is 0, so it does not appear on the canvas.