Oracle Database Administration & SQL Fundamentals
Comprehensive practice test covering Oracle database architecture, SQL queries, memory management, backup/recovery, and Oracle Forms development.
Questions
Which of the following packages should be used to grant resource groups to users?
- DBMS_REPCAT_AUTH
- DBMS_REPCAT_ADMIN
- DBMS_RESOURCE_MANAGER
- DBMS_RESOURCE_MANAGER_PRIVS
Which of the following actions cause a log switch?
- A transaction completes.
- The instance is started.
- The current online redo log group is filled.
- The ALTER SYSTEM SWITCH LOGFILE command is issued.
An application that uses a database keeps cursors open. What should be confirmed before changing the CURSOR_SPACE_FOR_TIME parameter in the database initialization file to TRUE?
- The TIMED_STATISTICS parameter is set to TRUE.
- The hit percentage in the buffer cache is at least 95%.
- The OPEN_CURSOR parameter is set to at least twice the default value.
- The value in the RELOADS column of V$LIBRARYCACHE is consistently zero or close to zero.
Which of the following memory structures contains the information used by the server process to validate the user privileges?
- Buffer cache
- Library cache
- Data dictionary cache
- Redo log buffer cache
SQL*Plus will finish the statement and execute it when the user types _______.
- a left slash ( ) followed by [Enter]
- a colon ( : ) followed by [Enter]
- a semicolon ( ; ) followed by [Enter]
- a period ( . ) followed by [Enter]
Is global temporary table session specific?
- True
- False
What will happen if the given emp table is queried?
select enpno,DISTINCT ename,Salary from emp;
- EMPNO ,unique value of ENAME and then SALARY are displayed.
- EMPNO ,unique value of the two columns, ENAME and salary are displayed.
- DISTINCT is not a valid keyword in SQL.
- No values will be displayed because the statement will return an error.
A cluster is a schema object that contains data from _____________ , all of which have one or more columns in common.
- one table
- one or more tables
- two or more tables
- atleast two tables
Which of the following components of an instance holds session variables and arrays when you are NOT running in MTS mode?
- SGA
- SQL Area
- Library Cache
- PGA
- 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 of the following execution plans 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
Order entry clerks use the Orders form to enter the shipping date of an order. Once the shipping date has been entered into the database, the clerks are not allowed to modify it. What property can be set in the Property Palette for the Shipping_Date item to ensure that this data entry restriction is enforced?
- Enabled
- Database Item
- Update Allowed
- Update Only If NULL
The STUDENT_GRADES table has the following columns:
STUDENT_ID NUMBER (12)
SEMESTER_END DATE
GPA NUMBER (4, 3)
Which of the following statements finds the highest Grade Point Average (GPA) per semester?
- SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
- SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
- SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;
- SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;
- SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
Which of the following memory areas is used to cache the data dictionary information?
- Database Buffer Cache
- PGA
- Redo Log Buffer
- Shared Pool
Which of the following options is not contained in the Program Global Area (PGA)?
- Sort Area
- System Change Number (SCN)
- Session Information
- Cursor state
Which of the following SQL statements defines a FOREIGN KEY constraint on the DEPT NO column of the EMP table?
- CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
- CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
- CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
- CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
Which of the following statements is true concerning a new user that has only been granted the CREATE SESSION privilege?
- The user can alter their password.
- The user can select from tables they have created.
- The user can create a table.
- The user can grant privileges on objects that they own.
Tom is developing a form for customers to order tickets to events. There is an Event_Date item in the Ticket block of the form, and he wants users to enter dates only for existing events.
He used the LOV wizard to create an LOV based on a record group with the following query:
SELECT event_name, event_date FROM events ORDER BY event_nameOn the Column Properties page of the LOV (as shown in the exhibit), he clicked Look up return item and select the Tickets. Event_Date item from the items list. He runs the form to test it. However, when he invoked the LOV and chose an event, he received the error FRM-40212:
Invalid value for field EVENT_DATE.'
What should he do to correct this problem?- Change the Validate from List property for the Event_Date item to No
- Create another item in the form to which the event name can be returned
- Modify the Record Group Query property for the record group to sort the list by event date
- Modify the Column Mapping property of the LOV so that the Event Date, rather than the Event Name is returned
- Modify the Record Group Query property for the record group so that the event date is the first column selected
A media failure occurred causing NOARCHIVELOG mode database to crash. It was discovered that two of the data files are corrupt. The last whole closed database backup was taken one week ago with a online redo log sequence number of 83. At the time the data files were corrupted, the online redo log sequence number was 85. Although there were few committed transactions after the last backup, as much data as possible has to be recovered. Which of the following recovery processes should be used?
- Shut down the instance, restore all of the Oracle files from the most recent backup, and restart the instance
- Manually restore and recover the two corrupt data files from the most recent backup
- Shut down the instance, restore the two corrupt data files from the most recent backup, and restart the instance
- Shut down the instance, restore all of the Oracle files from the most recent backup, restart the instance, and open the database using the 'ALTER DATABASE OPEN RESETLOGS' statement
The alert log file for a database instance indicated that the checkpoints are frequently failing to complete. Which of the following actions would be a remedy in this situation?
- Increase the number of archiver (ARCn) processes
- Increasing the number of members for all log groups
- Increasing the number of log writer (LGWR) processes
- Increasing the number of database writer (DBWn) processes
What should be done to import data and to avoid migration?
- Use the CASCADE option during import
- Use the COMPRESS option during export
- Use the RECORDLENGTH option during export
- Coalesce free space
In the Human Resources form , the prompt, heights, and widths of the Department Id, Manager Id, and Location Id fields in the Department data block have to be modified. What must be selected prior to invoking the Layout Wizard in Re-Entrant mode to modify these item properties?
- Frame consisting of the Employee_id, Employee_Name ,Employee_Address Items.
- Canvas
- Frame consisting of the DEPARTMENT_ID, MANAGER_ID, and LOCATION_ID items.
- The Departments block. The DEPARTMENT_ID, MANAGER_ID, and LOCATION_ID items
All of the above