Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

You See Multiple Extents In The Temporary Tablespace. Is This A Problem?

Answer»

As LONG as they are all the same SIZE this isn’t a problem. In fact, it can even improve performance SINCE ORACLE won’t have to create a new EXTENT when a user needs one.

As long as they are all the same size this isn’t a problem. In fact, it can even improve performance since Oracle won’t have to create a new extent when a user needs one.

2.

In A System With An Average Of 40 Concurrent Users You Get The Following From A Query On Rollback Extents: rollback Cur Extents r01 11 r02 8 r03 12 r04 9 system 4 you Have Room For Each To Grow By 20 More Extents Each. Is There A Problem? Should You Take Any Action?

Answer»

No there is not a problem. You have 40 EXTENTS showing and an average of 40 concurrent users. SINCE there is plenty of room to grow no ACTION is needed.

No there is not a problem. You have 40 extents showing and an average of 40 concurrent users. Since there is plenty of room to grow no action is needed.

3.

You Look At The Dba_rollback_segs View And See That You Have A Large Number Of Wraps Is This A Problem?

Answer»

A large NUMBER of wraps indicates that your extent size for your rollback segments are probably too SMALL. INCREASE the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to GET the information on transaction size.

A large number of wraps indicates that your extent size for your rollback segments are probably too small. Increase the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to get the information on transaction size.

4.

You Look At The Dba_rollback_segs View And See That There Is A Large Number Of Shrinks And They Are Of Relatively Small Size, Is This A Problem? How Can It Be Fixed If It Is A Problem?

Answer»

A LARGE number of small shrinks INDICATES a need to increase the size of the rollback segment extents. Ideally you should have no shrinks or a small number of large shrinks. To FIX this just increase the size of the extents and ADJUST optimal ACCORDINGLY.

A large number of small shrinks indicates a need to increase the size of the rollback segment extents. Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the size of the extents and adjust optimal accordingly.

5.

If You See The Value For Reloads Is High In The Estate Library Cache Report Is This A Matter For Concern?

Answer»

Yes, you should STRIVE for zero RELOADS if possible. If you see excessive reloads then increase the size of the shared POOL.

Yes, you should strive for zero reloads if possible. If you see excessive reloads then increase the size of the shared pool.

6.

If You See A Pin Hit Ratio Of Less Than 0.8 In The Estate Library Cache Report Is This A Problem? If So, How Do You Fix It?

Answer»

This indicates that the shared pool may be too SMALL. INCREASE the shared pool SIZE.

This indicates that the shared pool may be too small. Increase the shared pool size.

7.

What Can Cause A High Value For Recursive Calls? How Can This Be Fixed?

Answer»

A high value for recursive calls is cause by improper cursor usage, EXCESSIVE dynamic SPACE management actions, and or excessive statement re-parses. You need to determine the cause and correct it By either relinking applications to hold cursors, use proper space management techniques (proper storage and sizing) or ENSURE repeat queries are PLACED in PACKAGES for proper reuse.

A high value for recursive calls is cause by improper cursor usage, excessive dynamic space management actions, and or excessive statement re-parses. You need to determine the cause and correct it By either relinking applications to hold cursors, use proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse.

8.

You See The Following On A Status Report: redo Log Space Requests 23 redo Log Space Wait Time 0 is This Something To Worry About? What If Redo Log Space Wait Time Is High? How Can You Fix This?

Answer»

Since wait TIME is ZERO, no. If wait time was high it might indicate a NEED for more or larger redo LOGS.

Since wait time is zero, no. If wait time was high it might indicate a need for more or larger redo logs.

9.

How Can You Tell If A Tablespace Has Excessive Fragmentation?

Answer»

If a select against the dba_free_space table SHOWS that the COUNT of a tablespaces EXTENTS is greater than the count of its data FILES, then it is FRAGMENTED.

If a select against the dba_free_space table shows that the count of a tablespaces extents is greater than the count of its data files, then it is fragmented.

10.

If A Tablespace Shows Excessive Fragmentation What Are Some Methods To Defragment The Tablespace? (7.1,7.2 And 7.3 Only)

Answer»

In Oracle 7.0 to 7.2 The use of the ‘alter session set events ‘immediate TRACE name coalesce level ts#’;’ command is the easiest way to defragment contiguous free SPACE fragmentation. The ts# PARAMETER corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ‘alter tablespace coalesce;’ is best. If free space isn’t contiguous then export, drop and import of the tablespace contents MAY be the only way to RECLAIM non-contiguous free space.

In Oracle 7.0 to 7.2 The use of the ‘alter session set events ‘immediate trace name coalesce level ts#’;’ command is the easiest way to defragment contiguous free space fragmentation. The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ‘alter tablespace coalesce;’ is best. If free space isn’t contiguous then export, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space.

11.

If A Tablespace Has A Default Pct Increase Of Zero What Will This Cause (in Relationship To The Smon Process)?

Answer»

The SMON PROCESS won’t AUTOMATICALLY COALESCE its FREE space fragments.

The SMON process won’t automatically coalesce its free space fragments.

12.

If You See Statistics That Deal With “undo” What Are They Really Talking About?

Answer»

ROLLBACK SEGMENTS and ASSOCIATED STRUCTURES.

Rollback segments and associated structures.

13.

If You See Contention For Library Caches How Can You Fix It?

Answer»

INCREASE the SIZE of the SHARED POOL.

Increase the size of the shared pool.

14.

When Looking At The Estate Events Report You See That You Are Getting Busy Buffer Waits. Is This Bad? How Can You Find What Is Causing It?

Answer»

BUFFER busy waits may indicate CONTENTION in redo, rollback or data blocks. You need to check the v$waitstat view to see what AREAS are causing the problem. The value of the “COUNT” column TELLS where the problem is, the “class” column tells you with what. UNDO is rollback segments, DATA is data base buffers.

Buffer busy waits may indicate contention in redo, rollback or data blocks. You need to check the v$waitstat view to see what areas are causing the problem. The value of the “count” column tells where the problem is, the “class” column tells you with what. UNDO is rollback segments, DATA is data base buffers.

15.

Discuss Row Chaining, How Does It Happen? How Can You Reduce It? How Do You Correct It?

Answer»

Row CHAINING occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won’t FIT in the remaining BLOCK space. This results in the row chaining to another block. It can be reduced by setting the storage PARAMETERS on the table to appropriate values. It can be corrected by export and import of the EFFECTED table.

Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won’t fit in the remaining block space. This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by export and import of the effected table.

16.

Describe Hit Ratio As It Pertains To The Database Buffers. What Is The Difference Between Instantaneous And Cumulative Hit Ratio; Which Should Be Used For Tuning?

Answer»

Hit ratio is a measure of how many TIMES the database was able to read a value from the buffers VERSES how many times it had to re-read a data value from the disks. A value greater than 80-90% is good, less could indicate problems. If you take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the INSTANTANEOUS ratio for that time span. GENERALLY speaking an instantaneous READING gives more valuable data since it will tell you what your instance is doing for the time it was generated over.

Hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks. A value greater than 80-90% is good, less could indicate problems. If you take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over.

17.

Where Can You Get A List Of All Initialization Parameters For Your Instance? How About An Indication If They Are Default Settings Or Have Been Changed?

Answer»

You can look in the init.ora file for an indication of MANUALLY set parameters. For all parameters, their value and whether or not the CURRENT value is the DEFAULT value, look in the v$parameter VIEW.

You can look in the init.ora file for an indication of manually set parameters. For all parameters, their value and whether or not the current value is the default value, look in the v$parameter view.

18.

When Should You Increase Copy Latches? What Parameters Control Copy Latches?

Answer»

When you get excessive CONTENTION for the copy latches as shown by the “redo copy” latch hit RATIO. You can INCREASE copy latches via the INITIALIZATION parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your SYSTEM.

When you get excessive contention for the copy latches as shown by the “redo copy” latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system.

19.

When Looking At V$sysstat You See That Sorts (disk) Is High. Is This Bad Or Good? If Bad, How Do You Correct It?

Answer»

If you GET excessive DISK sorts this is BAD. This indicates you need to tune the sort area PARAMETERS in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter.

If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter.

20.

Explain The Use Of Tkprof? What Initialization Parameter Should Be Turned On To Get Full Tkprof Output?

Answer»

The tkprof tool is a tuning tool used to DETERMINE cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for EITHER the entire database via the sql_trace parameter or for the SESSION using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate EXPLAIN plan output.

The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output.

21.

What Is The Fastest Query Method For A Table?

Answer»

FETCH by ROWID.

Fetch by rowid.

22.

What Is The General Guideline For Sizing Db_block_size And Db_multi_block_read For An Application That Does Many Full Table Scans?

Answer»

Oracle almost ALWAYS READS in 64k CHUNKS. The two should have a product equal to 64 or a multiple of 64.

Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a multiple of 64.

23.

What Are Some Indications That You Need To Increase The Shared_pool_size Parameter?

Answer»

POOR data dictionary or library cache hit ratios, GETTING error ORA-04031. Another indication is STEADILY decreasing PERFORMANCE with all other tuning parameters the same.

Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same.

24.

You See Multiple Fragments In The System Tablespace, What Should You Check First?

Answer»

ENSURE that USERS don’t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS VIEW.

Ensure that users don’t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.

25.

How Do You Set Up Tablespaces During An Oracle Installation?

Answer»

You should always ATTEMPT to use the Oracle Flexible ARCHITECTURE standard or another partitioning scheme to ensure PROPER separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.

You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.

26.

A Table Space Has A Table With 30 Extents In It. Is This Bad? Why Or Why Not?

Answer»

Multiple EXTENTS in and of themselves aren’t bad. However if you also have CHAINED ROWS this can HURT performance.

Multiple extents in and of themselves aren’t bad. However if you also have chained rows this can hurt performance.

27.

What Are The Types Of Wait Events?

Answer»

28.

How Many Types Of Hits Are There And What Are They?

Answer»

There are two TYPES of HITS, they are

  1. BUFFER HIT
  2. library hit

There are two types of hits, they are

29.

How Do You See The Trace Files?

Answer»

USING TKPROF USAGE: tkprof allllle.trc llkld.txt

using tkprof usage: tkprof allllle.trc llkld.txt

30.

How Do You Get The Information Of Specific Session?

Answer»

V$mystat

v$mystat

31.

Where Do You Get The Info Of Library Cache?

Answer»

V$librarycache

v$librarycache

32.

How Do You Increase The Db Cache?

Answer»

ALTER table EMP CACHE

alter table emp cache

33.

How Do You Get The Info About Fts?

Answer»

USING V$sysstat

using v$sysstat

34.

How Do You Flush The Shared Pool?

Answer»

ALTER SYSTEM FLUSH shared_pool

alter system flush shared_pool

35.

How Do You Know Which Session Is Running Long Jobs?

Answer»

by GOING V$session_longops

by going v$session_longops

36.

Which Init Parameter You Have To Set To Bypass Parsing?

Answer»

cursor_sharing=force

cursor_sharing=force

37.

How Do You Get The Index Of A Table And On Which Column The Index Is?

Answer»

dba_indexes and dba_ind_columns

dba_indexes and dba_ind_columns

38.

What Is A Execution Plan?

Answer»

Its a road map how sql is being EXECUTED by ORACLE DB..

Its a road map how sql is being executed by oracle db..

39.

How Do You Know What Sql Is Currently Being Used By The Session?

Answer»

By GOIND V$SQL and v$sql_area.

By goind v$sql and v$sql_area.

40.

How Do You Collect Statistics Of A User In Oracle Apps?

Answer»

fnd_stats PACKAGE.

fnd_stats package.

41.

What Are Chained Rows?

Answer»

These are ROWS, it SPANS in MULTIPLE BLOCKS.

These are rows, it spans in multiple blocks.

42.

How Do You See The Statistics Of A Table?

Answer»

SELECT num_rows,BLOCKS,empty_blocks from dba_tables where tab_name=’EMP

select num_rows,blocks,empty_blocks from dba_tables where tab_name=’emp’

43.

How Do You Collect Statistics Of A User/schema?

Answer»

EXEC dbms_stats.gather_schema_stats(SCOTT)

exec dbms_stats.gather_schema_stats(scott)

44.

How Do You Delete Statistics Of An Object?

Answer»

ANALYZE table EMP DELETE STATISTICS.

Analyze table emp delete statistics.

45.

Data Dictionary Follows Which Optimizer Mode?

Answer»

RBO.

RBO.

46.

What Is The Diff Between Compute And Estimate?

Answer»

If you use COMPUTE, The FTS will HAPPEN, if you use estimate just 10% of the table will be READ

If you use compute, The FTS will happen, if you use estimate just 10% of the table will be read

47.

How Do You Collect Statistics Of A Table?

Answer»

ANALYZE table EMP COMPUTE STATISTICS or analyze table emp ESTIMATE statistics.

Analyze table emp compute statistics or analyze table emp estimate statistics.

48.

What Are The Pre Requsited To Make Use Of Optimizer?

Answer»

49.

Which Optimizer Is The Best One?

Answer»

CBO

CBO

50.

What Are The Types Of Optimizers?

Answer»