Oracle Memory Management Interview Questions & Answers

  1. Question 1. What Is The Significance Of Having Storage Clause?

    Answer :

    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 updations etc.

  2. Question 2. What Is The Functionality Of System Table Space?

    Answer :

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

  3. Oracle 9i Interview Questions

  4. Question 3. How Does Space Allocation Table Place Within A Block?

    Answer :

    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 updation in future).
  5. Question 4. What Is The Role Of Pctfree Parameter Is Storage Clause?

    Answer :

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

  6. Oracle 9i Tutorial

  7. Question 5. What Is The Optimal Parameter?

    Answer :

    To avoid the space wastage we use OPTIMAL parameter.

  8. Oracle DBA Interview Questions

  9. Question 6. What Is A Shared Pool?

    Answer :

    • The Shared Pool environment contains both fixed and variable structures.
    • The Fixed structures remain relatively the same size, whereas the variable structures grow and shrink based on user and program requirements.
      • Used To Store
      • Most Recently Executed SQL Statements
      • Most Recently used Data definitions
      • It Consists of two Key performance – related memory structures
      • Library Cache & Data Dictionary Cache
    • Shared Pool is sized by SHARED_POOL_SIZE
  10. Question 7. What Is Mean By Program Global Area (pga)?

    Answer :

    It is area in memory that is used by a Single Oracle User Process.

  11. Oracle DBA Tutorial
    Oracle 11g Interview Questions

  12. Question 8. What Is A Data Segment?

    Answer :

    Data segment are the physical areas within a database block in which the data associated with tables and clusters are stored.

  13. Question 9. What Are The Factors Causing The Re Parsing Of Sql Statements In Sga?

    Answer :

    • Due to insufficient Shared SQL pool size.
    • Monitor the ratio of the reloads takes place while executing SQL statements. If the ratio is greater than 1 then increase the SHARED_POOL_SIZE.
  14. Oracle Data Integrator (ODI) Interview Questions

  15. Question 10. What Is Database Buffers?

    Answer :

    Database buffers are cache in the SGA used to hold the data blocks that are read from the data segments in the database such as tables, indexes and clusters DB_BLOCK_BUFFERS parameter in INIT.ORA decides the size.

  16. Oracle 11g Tutorial

  17. Question 11. What Is Dictionary Cache?

    Answer :

    Dictionary cache is information about the database objects stored in a data dictionary table.

  18. Oracle MySQL 5.6 Database Administrator Interview Questions

  19. Question 12. Which Parameter In Storage Clause Will Reduce Number Of Rows Per Block?

    Answer :

    • PCTFREE parameter,
    • Row size also reduces no of rows per block.
  20. Oracle 9i Interview Questions

  21. Question 13. What Is Meant By Free Extent?

    Answer :

    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.

  22. Question 14. How Will You Force Database To Use Particular Rollback Segment?

    Answer :

    For particular transaction Alter system set rollback segment ‘name’;

    For database, we can set in pfile. Rollback_segment=’name’ .

  23. Question 15. How Can We Organize The Tablespaces In Oracle Database To Have Maximum Performance?

    Answer :

    Store data in tablespaces to avoid disk contension.system tablespace-recursive callsuserdata-users objectsindex tablespace-for indexesrollback segmnets-undo tablespace or manual rollback segmentsplace application specific data in respective tablespaces.Place all these tablespaces in saperate disks.Try to implement raid-0 (striping) for better performance.

  24. Oracle Exadata Database Interview Questions

  25. Question 16. How Will You Swap Objects Into A Different Table Space For An Existing Database?

    Answer :

    • Export the user
    • Perform import using the command imp system/manager file=export.dmp indexfile=newrite.sql. This will create all definitions into newfile.sql.
    • Drop necessary objects.
    • Run the script newfile.sql after altering the tablespaces.
    • Import from the backup for the necessary objects.
  26. Question 17. What Is Redo Log Buffer?

    Answer :

    Changes made to entries are written to the on-line redo log files. So that they can be used in roll forward operations during database recoveries. Before writing them into the redo log files, they will first brought to redo log buffers in SGA and LGWR will write into files frequently.

    LOG_BUFFER parameter will decide the size.

  27. Oracle DBA Troubleshooting Interview Questions

  28. Question 18. What Is Meant By Recursive Hints?

    Answer :

    Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to the data dictionary cache is too small. By increasing the SHARED_POOL_SIZE parameter we can optimize the size of Data Dictionary Cache.

  29. Oracle DBA Interview Questions

  30. Question 19. How Can We Plan Storage For Very Large Tables?

    Answer :

    • Limit the number of extents in the table
    • Separate Table from its indexes.
    • Allocate Sufficient temporary storage.
  31. Question 20. How Will You Estimate The Space Required By A Non-clustered Tables?

    Answer :

    • Calculate the total header size
    • Calculate the available dataspace per data block
    • Calculate the combined column lengths of the average row
    • Calculate the total average row size.
    • Calculate the average number rows that can fit in a block
    • Calculate the number of blocks and bytes required for the table.

    After arriving the calculation, add 10 % additional space to calculate the initial extent size for a working table.

  32. Oracle Demantra Interview Questions

  33. Question 21. It Is Possible To Use Raw Devices As Data Files And What Are The Advantages Over File System Files?

    Answer :

    Yes. It is possible to use raw devices as data files.

    The advantages over file system files:

    • I/O will be improved because Oracle is bye-passing the kernnel which writing into disk.
    • Disk Corruption will be very less.
  34. Question 22. What Is A Control File?

    Answer :

    The Control File is a small binary file necessary for the database to start and operate successfully. Each Control file is associated with only one Oracle database. Before a database is opened, the control file is read to determine if the database is in a valid state to USE.

    The Control file is not accessible, the database does not function properly.

  35. Question 23. How Will You Monitor Rollback Segment Status?

    Answer :

    By using dictionary views called v$rollstat,dba_rollback_segs.

  36. Oracle Access Manager Interview Questions

  37. Question 24. How Will You Monitor The Space Allocation?

    Answer :

    This can be monitored in DB_data_files.

  38. Oracle 11g Interview Questions

  39. Question 25. Why Query Fails Sometimes?

    Answer :

    Due to syntax errors.

  40. Question 26. How The Space Utilization Takes Place Within Rollback Segments?

    Answer :

    By correctly fitting optimal size.

  41. Oracle Data Guard Interview Questions

  42. Question 27. How Will You Create Multiple Rollback Segments In A Database?

    Answer :

    create rollback segment roll1tablespace roll1.

  43. Oracle Data Integrator (ODI) Interview Questions

  44. Question 28. What Is A Rollback Segment Entry?

    Answer :

    When ever changes happened to the database previous change will be there in the rollback segment.

  45. Question 29. What Is Hit Ratio?

    Answer :

    Hit Ratio is the ratio of shared SQL and PL/SQL items found in the Library Cache versus physical storage.It can also be defined in a mathematical expression as 1 – ((physical reads) / (db block gets + consistent reads)).

  46. Oracle Core Dba Interview Questions

  47. Question 30. What Are Disadvantages Of Having Raw Devices?

    Answer :

    We should depend on export/import utility for backup/recovery (fully reliable) The tar command cannot be used for physical file backup, instead we can use dd command which is less flexible and has limited recoveries.

  48. Question 31. What Is Use Of Rollback Segments In Oracle Database?

    Answer :

    When a user updated a particular table (for example 100 rows) the old value will be retained in the roll back segments(Oracle 8) and now it is Undo segment (oracle 9i). If the user issue a rollback command the old value will be taken from the rollback segment(that too if undo_retention parameter set properly in the parameter file).

  49. Question 32. What Is Advantage Of Having Disk Shadowing / Mirroring?

    Answer :

    Shadow set of disks save as a backup in the event of disk failure. In most Operating System if any disk failure occurs it automatically switchover to place of failed disk.

    Improved performance because most OS support volume shadowing can direct file I/O request to use the shadow set of files instead of the main set of files. This reduces I/O load on the main set of disks.

  50. Oracle D2K Interview Questions

  51. Question 33. How Redo Logs Can Be Achieved?

    Answer :

    LGWR process writes all change vectors from the redo log buffer to online redo log file sequentially.

  52. Oracle MySQL 5.6 Database Administrator Interview Questions

  53. Question 34. What Is Redo Log File Mirroring?

    Answer :

    Multiplexing Redo log file called Mirroring. ( Keeping multiple copies in different disks)

  54. Question 35. How To Implement The Multiple Control Files For An Existing Database?

    Answer :

    1. Edit init.ora file set control_files parameter with multiple location
    2. shutdown immediate
    3. copy control file to multiple locations & confirm from init.ora contol_files parameter
    4. start the database.
    5. run this query for changes confirmation – select name from v$controlfile;
  55. Question 36. What Is Sga? How It Is Different From Ver 6.0 And Ver 7.0?

    Answer :

    The System Global Area in a Oracle database is the area in memory to facilitates the transfer of information between users. It holds the most recently requested structural information between users. It holds the most recently requested structural information about the database. The structure is Database buffers, Dictionary cache, Redo Log Buffer and Shared SQL pool (ver 7.0 only) area.

  56. Oracle Exadata Database Interview Questions

  57. Question 37. What Is A Shared Sql Pool?

    Answer :

    The data dictionary cache is stored in an area in SGA called the Shared SQL Pool. This will allow sharing of parsed SQL statements among concurrent users.

  58. Question 38. List The Factors That Can Affect The Accuracy Of The Estimations?

    Answer :

    The space used transaction entries and a deleted record does not become free immediately after completion due to delayed cleanout.

    Trailing nulls and length bytes are not stored. Inserts of, updates to and deletes of rows as well as columns larger than a single datablock, can cause fragmentation and chained row pieces.

  59. Question 39. What Are The Different Kind Of Export Backups?

    Answer :

    • Full back – Complete database
    • Incremental – Only affected tables from last incremental date/full backup date.
    • Cumulative backup – Only affected table from the last cumulative date/full backup date.
  60. Question 40. What Is Cold Backup? What Are The Elements Of It?

    Answer :

    Cold backup is taking backup of all physical files after normal shutdown of database. We need to take.

    • All Data files.
    • All Control files.
    • All on-line redo log files.
    • The init.ora file (Optional)
  61. Oracle DBA Troubleshooting Interview Questions

  62. Question 41. What Is A Logical Backup?

    Answer :

    Logical backup involves reading a set of database records and writing them into a file. Export utility is used for taking backup and Import utility is used to recover from backup.

  63. Question 42. What Is Hot Backup And How It Can Be Taken?

    Answer :

    Taking backup of archive log files when database is open. For this the ARCHIVELOG mode should be enabled. The following files need to be backed up. All data files. All Archive log, redo log files. All control files.

  64. Oracle Demantra Interview Questions

  65. Question 43. What Is The Use Of File Option In Exp Command?

    Answer :

    To give the export file name.

  66. Question 44. What Is The Use Of Grant Option In Exp Command?

    Answer :

    A flag to indicate whether grants on databse objects will be exported or not. Value is ‘Y’ or ‘N’.

  67. Question 45. What Is The Use Of Indexes Option In Exp Command?

    Answer :

    A flag to indicate whether indexes on tables will be exported.

  68. Question 46. What Is The Use Of Rows Option In Exp Command?

    Answer :

    Flag to indicate whether table rows should be exported. If ‘N’ only DDL statements for the database objects will be created.

  69. Question 47. What Is The Use Of Parfile Option In Exp Command?

    Answer :

    Name of the parameter file to be passed for export.

  70. Question 48. What Is The Use Of Analyse ( Ver 7) Option In Exp Command?

    Answer :

    A flag to indicate whether statistical information about the exported objects should be written to export dump file.

  71. Question 49. What Is The Use Of Full Option In Exp Command?

    Answer :

    A flag to indicate whether full databse export should be performed.

  72. Question 50. What Is The Use Of Owner Option In Exp Command?

    Answer :

    List of table accounts should be exported.

  73. Question 51. What Is The Use Of Tables Option In Exp Command?

    Answer :

    List of tables should be exported.

  74. Question 52. What Is The Use Of Record Length Option In Exp Command?

    Answer :

    Record length in bytes.

  75. Question 53. What Is The Use Of Inctype Option In Exp Command?

    Answer :

    Type export should be performed COMPLETE,CUMULATIVE,INCREMENTAL

  76. Question 54. What Is The Use Of Record Option In Exp Command?

    Answer :

    For Incremental exports, the flag indirects whether a record will be stores data dictionary tables recording the export.

  77. Question 55. What Is The Use Of Rows Option In Imp Command?

    Answer :

    A flag to indicate whether rows should be imported. If this is set to ‘N’ then only DDL for database objects will be executed.

  78. Question 56. What Is The Use Of Indexes Option In Imp Command?

    Answer :

    A flag to indicate whether import should import index on tables or not.

  79. Question 57. What Is The Use Of Grant Option In Imp Command?

    Answer :

    A flag to indicate whether grants on database objects will be imported.

  80. Question 58. What Is The Use Of Show Option In Imp Command?

    Answer :

    A flag to indicate whether file content should be displayed or not.

  81. Question 59. What Is The Use Of File Option In Imp Command?

    Answer :

    The name of the file from which import should be performed.

  82. Question 60. What Is Use Of Log (ver 7) Option In Exp Command?

    Answer :

    The name of the file which log of the export will be written.