Oracle Database Interview Questions & Answers Set-9

«« Previous
Next »»

1. What is cross join?
Ans:  Cross join is defined as the Cartesian product of records from the tables present in the join. Cross join will produce result which combines each row from the first table with the each row from the second table.


2. What are temporal data types in Oracle?
Ans: Oracle provides following temporal data types:

  • Date Data Type – Different formats of Dates
  • TimeStamp Data Type – Different formats of Time Stamp
  • Interval Data Type – Interval between dates and time

3. How do we create privileges in Oracle?
Ans: A privilege is nothing but right to execute an SQL query or to access another user object. Privilege can be given as system privilege or user privilege.

[sql]GRANT user1 TO user2 WITH MANAGER OPTION;[/sql]


4. What is VArray?
Ans: VArray is an oracle data type used to have columns containing multivalued attributes and it can hold bounded array of values.


5. How do we get field details of a table?
Ans: Describe <Table_Name> is used to get the field details of a specified table.


6. What is the difference between rename and alias?
Ans: Rename is a permanent name given to a table or a column whereas Alias is a temporary name given to a table or column. Rename is nothing but replacement of name and Alias is an alternate name of the table or column.


7. What is a View?
Ans: View is a logical table which based on one or more tables or views.  The tables upon which the view is based are called Base Tables and it doesn’t contain data.


8. What is a cursor variable?
Ans: A cursor variable is associated with different statements which can hold different values at run time. A cursor variable is a kind of reference type.


9. What are cursor attributes?
Ans: Each cursor in Oracle has set of attributes which enables an application program to test the state of the cursor. The attributes can be used to check whether cursor is opened or closed, found or not found and also find row count.


10. What are SET operators?
Ans: SET operators are used with two or more queries and those operators are Union, Union All, Intersect and Minus.


11. What is a Shared Pool?
Ans: The Shared Pool is a RAM area within the RAM heap that is created at startup time, a component of the System Global Area (the SGA). The shared pool is the most important area of the SGA, except for the data buffer caches. The shared pool is usually the second-largest SGA memory area.


12. What is kept in the Database Buffer Cache?
Ans: The database buffer cache is the portion of the SGA that holds copies of data blocks read from datafiles. All users concurrently connected to the instance share access to the database buffer cache.


13. What is difference between PFile and SPFile?
Ans: DBA's commonly refer to this file as the INIT.ORA file. An SPFILE (Server Parameter File), on the other hand, is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command. This means you no longer need a local copy of the pfile to start the database from a remote machine.


14. What is PGA_AGGREGRATE_TARGET parameter?
Ans: PGA_AGGREGATE_TARGET specifies the target aggregate PGA memory available to all server processes attached to the instance.

Syntax: PGA_AGGREGATE_TARGET = integer [K | M | G]

15. What is Row Migration and Row Chaining?
Ans: In this case, Oracle Database stores the data for the row in a chain of data blocks (one or more) reserved for that segment. Row chaining most often occurs with large rows, such as rows that contain a column of datatype LONG or LONG RAW . Row chaining in these cases is unavoidable.

«« Previous
Next »»