10
1. Which of the following is true A.Lgwr moves data from logbuffer to logfiles B.Lgwr moves data from logfiles to logbuffer C.Dbwr moves data from logbuffer to logfiles D.Lgwr moves data from logbuffer to archivefiles 2. Which of the following is the largest storage unit in oracle A.Block B.extent C.Tablespace D.segment 3. When do we create bitmap indexes A.OLTP B.DSS C.Where clause has functions D.Tables that have only one record 4. Which tool helps you to identify the path used by oracle A.Explain plan B.Tkprof C.DBMS_PROFILER D.Statspack 5. Which of the following mechnism is used for read consistency in oracle A.Archive files B.Redo C.Undo D.Temp 6. Which of the following is not a background process A.Smon B.Pmon C.sqlplus D.Dbwr 7. Which of the following is not part of SGA A.Shared pool B.Largepool C.Database buffer cache D.dispatchers 8. For which two types of constraints will a unique index be automatically created

Oracle Mock Test @ 4

Embed Size (px)

Citation preview

Page 1: Oracle Mock Test @ 4

1. Which of the following is true

A.Lgwr moves data from logbuffer to logfilesB.Lgwr moves data from logfiles to logbufferC.Dbwr moves data from logbuffer to logfilesD.Lgwr moves data from logbuffer to archivefiles

2. Which of the following is the largest storage unit in oracle

A.BlockB.extentC.TablespaceD.segment

3. When do we create bitmap indexes

A.OLTPB.DSSC.Where clause has functionsD.Tables that have only one record

4. Which tool helps you to identify the path used by oracle

A.Explain planB.TkprofC.DBMS_PROFILERD.Statspack

5. Which of the following mechnism is used for read consistency in oracle

A.Archive filesB.RedoC.UndoD.Temp

6. Which of the following is not a background process

A.SmonB.PmonC.sqlplusD.Dbwr

7. Which of the following is not part of SGA

A.Shared poolB.LargepoolC.Database buffer cacheD.dispatchers

8. For which two types of constraints will a unique index be automatically created

A. UniqueB. Primary keyC. Not nullD. Foreign keyE. Check

Page 2: Oracle Mock Test @ 4

9. Which statement types wouldbe used to remove transactions more than one year old from the table x (any table)

A. TCL-Transaction Control StatementB. DCLC. DMLD. DRL

10. Which four statements about oracle constraints true (Choose four)

A. A unique constraint specifies a column or combination of columns whose values must be unique for all rows in a table

B. A check constraint specifies a condition that must be true

C. A NOT NULL constraint ensures that all null values are not allowed in a columnD. A Primary key constraint uniquely identifies each row of a table

E. A unique constraint allows prohibits the input of nulls because nulls do not specify the constraint conditions

F. A primary key constraint allows null values in a column when the column is part of a set of column that uniquely identifies each row

12. A Table emp has following columns eno,ename,salary,deptno you execute the below statement

Create index emp_idx on emp (eno,firstname);

Which statement is true

A. Oracle will create unique indexB. Oracle throw an errorC. Oracle will create primary key indexD. Oracle will create function based index

13. Which statement concerning sql functions is true

A. Character functions can return character or number valuesB. Conversion functions convert a column definition from one date type to another data typeC. Single row functions can only be used in SELECT AND Where clausesD. All data functions return DATE data type values.

14. Which of the following statement is used for creating primary key for a table emp

A. Alter table emp add constraint eno primary key;B. Alter table emp add primary key (eno);C. Alter table emp modify eno primary key

15. Which statement about a sequence is true

Page 3: Oracle Mock Test @ 4

A. Creating a sequence causes sequence numbers are stored in a tableB. One sequence can be used for multiple tables in the same user schemaC. A sequence can only be used to create a primary key valueD. A sequence slows down the performance

16. Which select statement will display the next value parts_id_seq sequence by actually retrieving the value from the sequence

A. Select NEXTVAL (parts_id_seq) from sys.dual;B. Select parts_id_seq.NEXTVAL from parts;C. Select parts_id_seq.NEXTVAL FROM SYS.dual;D. Select parts_id_seq NEXTVAL from inventory;

17. Which tool is used for taking a logical backup

A. EXplain planB. ExportC. DBMS_PROFILERD. Import

18. Which process clears the dead connections

A. DbwrB. LgwrC. cleanD. Pmon

19. Which three functions can be used to manipulate charcter,number, or date column values (Choose three)

A. CONCATB. ROUNDC. TruncD. RpadE. Instrb(Tentative answer)

20. Which of the following process maintains database consistency

A. ConsistentB. MaintainC. DBWRD. CKPT

Page 4: Oracle Mock Test @ 4

Q1. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?(Choose correct one from multiple bellow)

1. DELETE ROW FirstName='Peter' FROM Persons2. DELETE FirstName='Peter' FROM Persons3. DELETE FROM Persons WHERE FirstName = 'Peter'4. None

Q2. OCI stands for

1. Open Call Interface2. Oracle Call Interface3. Oracle Communication Interface4. Oracle Connection Interface

Q3. Which SQL statement is used to insert new data in a database?

1. INSERT NEW2. ADD RECORD3. ADD NEW4. INSERT INTO

Q4. What was a problem with navigational data access languages?

1. The user had to have knowledge of the table and index structures.2. Navigational data access was far slower than declarative access.3. Navigational access languages required the coder to embed their queries inside a procedural language shell.4. Navigational languages were far slower then SQL

Q5. What best describes the relationship between indexes and SQL performance?

1. Indexes are only used in special cases2. Indexes are used to make table storage more efficient3. Indexes rarely make a difference in SQL performance4. Indexes exist solely to improve query speed.

Q6. Which SQL statement is used to return only different values?

Page 5: Oracle Mock Test @ 4

1. SELECT UNIQUE2. SELECT DIFFERENT3. SELECT DISTINCT4. None of the above

Q7. The CASE expression uses a selector which is:

1. The WHEN clause.2. An expression whose value is used to select one of several alternatives.3. SQL SELECT statement used in an IF statement.4. The WHERE clause.

Q8. The Utl_Smtp package provides:

1. Primitives to send email.2. Used for collection statistics.3. For networking in Oracle 9i.4. 1 and 2

Q9. Which is a major problem with SQL?

1. SQL cannot support object-orientation2. The same query can be written in many ways, each with vastly different execution plans.3. SQL syntax is too difficult for non-computer professionals to use4. SQL creates excessive locks within the Oracle database

Q10. The name of the only column in the DUAL table is

1. X2. C3. DUMMY4. None

Q11. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

1. SELECT * FROM Persons WHERE FirstName<>'Peter'2. SELECT [all] FROM Persons WHERE FirstName='Peter'3. SELECT * FROM Persons WHERE FirstName='Peter'4. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

Page 6: Oracle Mock Test @ 4

Q12. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

1. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'2. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'3. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'4. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

Q13. In a query with a GROUP BY clause, the columns in the SELECT clause

1. must be aggregate functions only2. must also appear in the GROUP BY clause3. must also appear in the GROUP BY and HAVING clauses4. Can be selected

Q 14.

Q15.

Q16. The spnc_makefile.mk make file is used to:

1. To invoke a procedure.2. Organize objects in the database.3. Speed up PL/SQL procedures.4. A, B and C.

Q16.

Q18. Bulk binds improve performance by:

1. Improving the optimizer.2. Resetting the statistics in the catalog.3. Minimizing the number of context switches between the PL/SQL and SQL engines.4. Performing a Forward Prefetch.

Q19. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true

1. False2. True3. None4. Both

Page 7: Oracle Mock Test @ 4

Q20. Which SQL keyword is used to sort the result-set?

1. SORT2. ORDER3. SORT BY4. ORDER BY

Q21. Examine the data in the EMPLOYEES and DEPARTMENTS tables. EMPLOYEES LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 King 20 2200 Davis 30 5000 Kochhar 5000 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Sales 20 Marketing 30 Accounts 40 Administration You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?

1. SELECT last_name, department_name FROM employees , departments(+);2. SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id =

d.department_id);3. SELECT last_name, department_name FROM employees(+) e JOIN departments d ON (e.department_id =

d.department_id);4. SELECT last_name, department_name FROM employees(+) , departments ON (e.department_id =

d.department_id);

Q22. What is a TRUNCATE statement in Oracle?

1. A DDL command and can be rolled back2. A DML command and cannot be rolled back3. A DDL command and cannot be rolled back.4. A TCL command and can be rolled back

Q23. The BULK COLLECT clause:

1. Can only be used in server-side programs.2. Can only be used in client-side programs.3. Can be used in client and server-side programs.

Page 8: Oracle Mock Test @ 4

4. Requires the PL/SQL be wrapped.

Q24. Comments in a PL/SQL code are inserted using

1. ?2. /* */3. Both (1) and (2)4. #

Q25. What are the difference between %ROWTYPE and %TYPE in PL/SQL?

1. %ROWTYPE is used to associate a variable with an entire table row whereas %TYPE is used to associate a variable with a single column type.

2. %ROWTYPE can be used in a cursor array processing whereas %TYPE cann't be.3. %TYPE can be used in a cursor array processing whereas ROWTYPE cann't be.4. %ROWTYPE can be used in a SQL also whereas %TYPE cann't be in SQL.

Q26. Which clause should you use to exclude GROUP results ?

1. WHERE2. RESTRICT3. HAVING4. GROUP BY

Q27. Consider a table TAB with a single row NAME CHARRIS Then, the query SELECT SUBSTR(Name,-3) FROM TAB gives

1. RIS2. CHA3. ARRIS4. ARR

Q28. Which SQL statement is used to extract data from a database?

1. OPEN2. SELECT3. GET4. EXTRACT

Page 9: Oracle Mock Test @ 4

Q29. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

1. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'2. SELECT FirstName='Peter', LastName='Jackson' FROM Persons3. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'4. None

Q30. A ref is a:

1. Method of passing the values of parameters.2. Pointer to an object.3. Method of compiling the PL/SQL.4. A wrapper for encrypting the source.