Oracle Interview Questions

Oracle Interview Questions Download Oracle Interview Questions PDF

Oracle Interview Questions

As of now a compiled/ parsed block of PL/SQL has a maximum size limitation of 64K and max. code size being 100K. The statement for querying existing procedure or the package size is as follows:

SQL> select * from dba_object_size where name = 'procedure_name'

There are two exception types:

  • User-defined &
  • Pre defined.

No. SQL*Plus doesn’t contain PL/SQL engine, unlike Oracle Forms. Because of which all PL/SQL is sent to the database engine to get executed which increases the efficiency. Each SQL statement is individually sent to the database and not stripped off.

When a triggered is fired due to a stamen in another trigger body then the triggers are termed as cascading triggers. There can be a maximum of 32 cascading triggers.

The constructs for a package, function or a procedure are:

  • Exceptions,
  • Cursors
  • Variables and constants

Clusters reduce the access time for joins and increases it for insert.

Oracle 7.3 has a UTL_FILE package included in it which is used to read/ write files. The directory where you want to write to has to be in the INIT.ORA file. Prior to Oracle 7.3, DBMS_OUTPUT with the SQL*Plus SPOOL command was the only way to write a file.

Oracle is a database server that is used to handle data in a structured manner. It lets its users to retrieve and to store data in a way that multiple users can access similar data at the same time. Oracle achieves this with high efficiency. Many security checks are followed to limit access to authorized users only and to retrieve data in case of accidental data loss.

The various rollback segment states are:

  • Invalid,
  • Needs recovery,
  • Partly available,
  • Offline and
  • Online.

In a table, a check condition of a column can reference another column in the same table thus providing self referential integrity.

Yes, Parameters can be passed to explicit cursors. A cursor parameter could appear wherever a constant appears in a query.

Example:

CURSOR c1 (median IN NUMBER) IS
SELECT job, ename FROM emp WHERE sal > median;

Triggers giving SELECT to the table on which they are written are termed as mutating triggers.

There exist 12 different types of database triggers. They are made up of different combinations of:

  • Statement and row triggers,
  • Before and after triggers,
  • Update, delete and insert triggers.