DATABASE & SQL/PLSQL

Oacle interview Questions And Answer
Previous Home Next
What is meant by free extent?

A free extent is a collection of continuous free blocks in tablespace. When a segment is dropped its extents are reallocated and are marked as free.

Which parameter in Storage clause will reduce number of rows per block?

PCTFREE parameter Row size also reduces no of rows per block.

. What is the significance of having storage clause?

We can plan the storage for a table as how much initial extents are required, how much can be extended next, how much % should leave free for managing row updating, etc.,

How does Space allocation table place within a block?

Each block contains entries as follows Fixed block header Variable block header Row Header, row date (multiple rows may exists) PCTEREE (% of free space for row updating in future)

What is the role of PCTFREE parameter is storage clause?

This is used to reserve certain amount of space in a block for expansion of rows.

What is the OPTIMAL parameter?

It is used to set the optimal length of a rollback segment.

What is the functionality of SYSTEM table space?

To manage the database level transactions such as modifications of the data dictionary table that record information about the free space usage.

How will you create multiple rollback segments in a database?

  • Create a database, which implicitly creates a SYSTEM rollback segment in a SYSTEM tablespace.
  • Create a second rollback segment name R0 in the SYSTEM tablespace.
  • Make new rollback segment available (after shutdown, modify init.ora file and start database)
  • Create other tablespaces (RBS) for rollback segments.
  • Deactivate rollback segment R0 and activate the newly created rollback segments.

How the space utilization takes place within rollback segments?

It will try to fit the transaction in a cyclic fashion to all existing extents. Once it found an extent is in use then it forced to acquire a new extent (number of extents is based on the optimal size)

Why query fails sometimes?

Rollback segment dynamically extent to handle larger transactions entry loads. A single transaction may wipeout all available free space in the rollback segment tablespace. This prevents other user using rollback segments.

How will you monitor the space allocation?

By querying DBA_SEGMENT table/view

How will you monitor rollback segment status?

Querying the DBA_ROLLBACK_SEGS view

  • IN USE: Rollback Segment is on-line.
  • AVAILABLE: Rollback Segment available but not on-line.
  • OFF-LINE: Rollback Segment off-line
  • INVALID: Rollback Segment Dropped.
  • NEEDS RECOVERY: Contains data but need recovery or corrupted.
  • PARTLY AVAILABLE: Contains data from an unresolved transaction involving a distributed database.
Previous Home Next