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.

What Is A System Change Number (scn)?

Answer»
  • SCN is a VALUE that is incremented whenever a dirty read occurs.
  • SCN is incremented whenever a deadlock occurs. 
  • SCN is a value that KEEPS TRACK of explicit locks. 
  • SCN is a value that is incremented whenever database CHANGES are MADE.

2.

What Is The Main Purpose Of Checkpoint In Oracle Database? How Do You Automatically Force The Oracle To Perform A Checkpoint?

Answer»

A checkpoint is a database EVENT, which synchronize the database blocks in MEMORY with the datafiles on DISK. It has two main purposes: To establish a data consistency and enable faster database Recovery.

The following are the parameter that will be used by DBA to adjust time or interval of how FREQUENTLY its checkpoint should occur in database.

LOG_CHECKPOINT_TIMEOUT = 3600; # Every one hour 
LOG_CHECKPOINT_INTERVAL = 1000; # number of OS blocks.

A checkpoint is a database event, which synchronize the database blocks in memory with the datafiles on disk. It has two main purposes: To establish a data consistency and enable faster database Recovery.

The following are the parameter that will be used by DBA to adjust time or interval of how frequently its checkpoint should occur in database.

LOG_CHECKPOINT_TIMEOUT = 3600; # Every one hour 
LOG_CHECKPOINT_INTERVAL = 1000; # number of OS blocks.

3.

What Happens When We Fire Sql Statement In Oracle?

Answer»

First it will CHECK the SYNTAX and semantics in library cache, after that it will create EXECUTION PLAN

If already data is in buffer cache it will directly return to the client. 

If not it will fetch the data from datafiles and write to the database buffer cache after that it will send SERVER and finally server send to the client.

First it will check the syntax and semantics in library cache, after that it will create execution plan. 

If already data is in buffer cache it will directly return to the client. 

If not it will fetch the data from datafiles and write to the database buffer cache after that it will send server and finally server send to the client.

4.

What Is The Use Of Large Pool, Which Case You Need To Set The Large Pool?

Answer»

You need to set large pool if you are using: MTS (MULTI thread server) and RMAN Backups. Large pool prevents RMAN MTS from competing with other sub system for the same memory. RMAN uses the large pool for backup restore when you set the DBWR_IO_SLAVES or BACKUP_TAPE_IO_SLAVES parameters to simulate asynchronous I/O. If neither of these parameters is enabled, then Oracle ALLOCATES backup buffers from local PROCESS memory rather than SHARED memory. Then there is no use of large pool.

You need to set large pool if you are using: MTS (Multi thread server) and RMAN Backups. Large pool prevents RMAN MTS from competing with other sub system for the same memory. RMAN uses the large pool for backup restore when you set the DBWR_IO_SLAVES or BACKUP_TAPE_IO_SLAVES parameters to simulate asynchronous I/O. If neither of these parameters is enabled, then Oracle allocates backup buffers from local process memory rather than shared memory. Then there is no use of large pool.

5.

What Does Database Do During The Mounting Process?

Answer»

While MOUNTING the DATABASE oracle reads the DATA from control file which is USED for verifying PHYSICAL database files during sanity check. Background processes are started before mounting the database only.

While mounting the database oracle reads the data from control file which is used for verifying physical database files during sanity check. Background processes are started before mounting the database only.

6.

What Are Log File States?

Answer»

CURRENT state means that redo records are currently being written to that group. It will be until a log switch occurs. At a time there can be only one redo group current.

If a redo group containing redos of a DIRTY buffer that redo group is SAID to be ACTIVE state. As we know log file keep changes made to the data blocks then data blocks are modified in buffer cache (dirty blocks). These dirty blocks must be written to the disk (RAM to permanent media).

And when a redo log group contains no redo records belonging to a dirty buffer it is in an "INACTIVE" state. These inactive redo log can be OVERWRITTEN.

One more state UNUSED initially when you create new redo log group its log file is empty on that time it is unused. Later it can be any of the above mentioned state.

CURRENT state means that redo records are currently being written to that group. It will be until a log switch occurs. At a time there can be only one redo group current.

If a redo group containing redos of a dirty buffer that redo group is said to be ACTIVE state. As we know log file keep changes made to the data blocks then data blocks are modified in buffer cache (dirty blocks). These dirty blocks must be written to the disk (RAM to permanent media).

And when a redo log group contains no redo records belonging to a dirty buffer it is in an "INACTIVE" state. These inactive redo log can be overwritten.

One more state UNUSED initially when you create new redo log group its log file is empty on that time it is unused. Later it can be any of the above mentioned state.

7.

What Are Bind Variables?

Answer»

With bind variable in SQL, ORACLE can cache QUERIES in a single time in the SQL cache area. This avoids a HARD parse each time, which saves on VARIOUS locking and latching resource we use to check OBJECT existence and so on.

With bind variable in SQL, oracle can cache queries in a single time in the SQL cache area. This avoids a hard parse each time, which saves on various locking and latching resource we use to check object existence and so on.

8.

What Is Difference Between Oracle Sid And Oracle Service Name?

Answer»

Oracle SID is the unique NAME that UNIQUELY identifies your instance/database where as the SERVICE name is the TNS ALIAS can be same or different as SID.

Oracle SID is the unique name that uniquely identifies your instance/database where as the service name is the TNS alias can be same or different as SID.

9.

What Is The Difference Between Data Block/extent/segment?

Answer»

A data BLOCK is the SMALLEST unit of logical storage for a database object. As objects grow they take chunks of additional storage that are COMPOSED of contiguous data BLOCKS. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.

A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.

10.

What Is The Difference Between Pga And Uga?

Answer»

When you are running dedicated server then process information STORED INSIDE the process global area (PGA) and when you are using SHARED server then the process information stored inside user global area (UGA).

When you are running dedicated server then process information stored inside the process global area (PGA) and when you are using shared server then the process information stored inside user global area (UGA).

11.

What Is Sga? Define Structure Of Shared Pool Component Of Sga?

Answer»

The SYSTEM global area is a group of shared memory area that is dedicated to oracle instance. All oracle process uses the SGA to hold information. The SGA is used to store incoming data and INTERNAL control information that is needed by the database. 

You can control the SGA memory by SETTING the parameter db_cache_size, shared_pool_size and log_buffer.

Shared pool portion contain three major area: Library cache (parse SQL statement, CURSOR information and execution plan), data dictionary cache (contain cache, user account information, privilege user information, segments and extent information, data buffer cache for parallel execution message and control structure.

The system global area is a group of shared memory area that is dedicated to oracle instance. All oracle process uses the SGA to hold information. The SGA is used to store incoming data and internal control information that is needed by the database. 

You can control the SGA memory by setting the parameter db_cache_size, shared_pool_size and log_buffer.

Shared pool portion contain three major area: Library cache (parse SQL statement, cursor information and execution plan), data dictionary cache (contain cache, user account information, privilege user information, segments and extent information, data buffer cache for parallel execution message and control structure.

12.

I Connected To Database As Sysdba, But Its Not Allowing Me To Shutdown The Database, What May Be The Reason?

Answer»

The CONNECTION WOULD have been shared server connection in which CASE ORACLE will not allow to shutdown/startup the database.

The connection would have been shared server connection in which case oracle will not allow to shutdown/startup the database.

13.

How Many Slave Process We Can Have For Dbwr And Smon?

Answer»

DBWR20, SMON16 .

DBWR – 20, SMON – 16 .

14.

What Are The Parameters You Use To Configure Shared Server Architecture?

Answer»
  • DISPATCHERS
  • MAX_DISPATCHERS
  • SHARED_SERVER_PROCESSES
  • MAX_SHARED_SERVER_PROCESSES.

15.

You Configured All The Parameters To Enable Shared Server Architecture, But Still Users Facing Memory Allocation Issues. What You Would Do?

Answer»

We NEED to CHECK if SERVER=SHARED is MENTIONED in client TNS entry or not.

We need to check if SERVER=SHARED is mentioned in client TNS entry or not.

16.

As A Dba, When You Will Take Decision To Enable Shared Server Architecture?

Answer»

When we observed ORA-04030 or ORA-04031 ERRORS very FREQUENTLY in ALERT log file.

When we observed ORA-04030 or ORA-04031 errors very frequently in alert log file.

17.

What Is Dispatcher In Shared Server Architecture?

Answer»

It is a SERVICE which SERVER MULTIPLE USER REQUESTS.

It is a service which server multiple user requests.

18.

Why Oracle Recommends Ofa? How It Is Related To Os?

Answer»

As one DISK will have only one I/O header, it will be BURDEN to the database if we PLACE all the FILES in single hard disk. So oracle recommends OFA.

As one disk will have only one I/O header, it will be burden to the database if we place all the files in single hard disk. So oracle recommends OFA.

19.

What Is Ofa? Do You Recommend To Implement It?

Answer»

It is a RULE which says DATABASE related files should split ACROSS multiple disks and YES i will recommend to IMPLEMENT it.

It is a rule which says database related files should split across multiple disks and yes i will recommend to implement it.

20.

Which Background Process Clears Sessions And Releases Locks When System Fails?

Answer»

SMON (here SYSTEM MEANS DATABASE).

SMON (here system means database).

21.

Where All The Trace Files Located In 11g?

Answer»

It is in a SINGLE LOCATION DEFINED by DIAG_DEST PARAMETER.

It is in a single location defined by DIAG_DEST parameter.

22.

How To Increase The Size Of Server Result Cache?

Answer»

By INCREASING the SIZE SPECIFIED by SERVER_RESULT_CACHE or by increasing MEMORY_TARGET parameter if AMM is used.

By increasing the size specified by SERVER_RESULT_CACHE or by increasing MEMORY_TARGET parameter if AMM is used.

23.

What Parameters To Be Used To Make 11g Database Use Server Result Cache?

Answer»

SERVER_RESULT_CACHE.

SERVER_RESULT_CACHE.

24.

What Is Server Result Cache? What Benefit We Get Out Of It?

Answer»

It is a NEW COMPONENT introduced in 11g. It will store the rows of a QUERY DIRECTLY this avoids the need of EXECUTING a statement.

It is a new component introduced in 11g. It will store the rows of a query directly this avoids the need of executing a statement.

25.

What Could Be Reason For Shutdown Immediate Command Hanging For Long Time?

Answer»

MIGHT be there is a TRANSACTION which is LARGE and ROLLBACK is HAPPENING for the same.

Might be there is a transaction which is large and rollback is happening for the same.

26.

What You Will Do When Shutdown Immediate Command Hanging For Last 30 Min?

Answer»

We can open ANOTHER terminal and issue shut ABORT. Then once again startup and do shut IMMEDIATE.

We can open another terminal and issue shut abort. Then once again startup and do shut immediate.

27.

What Files Are Needed To Open The Database And How Oracle Knows The Locations Of Them?

Answer»

Datafiles and redolog FILES are required to open the database and ORACLE will get that INFORMATION from controlffiles.

Datafiles and redolog files are required to open the database and oracle will get that information from controlffiles.

28.

Which File Is Required To Bring Into Mount Phase And What Is The Use Of This Phase?

Answer»

Control FILE is REQUIRED and it is for maintenance of some DATABASE ACTIONS.

Control file is required and it is for maintenance of some database actions.

29.

Which File Is Required To Place Database In Nomount State And What Happens In That Phase?

Answer»

PFILE or SPFILE is required to bring database to NOMOUNT state and instance will be STARTED (backgroung PROCESSES will be started and memory will be allocated to SGA from RAM) in this phase.

Pfile or spfile is required to bring database to NOMOUNT state and instance will be started (backgroung processes will be started and memory will be allocated to SGA from RAM) in this phase.

30.

Which Process Will Start First When Instance Is Started?

Answer»

PSP0, PROCESS spawner. This background process will START other PROCESSES like PMON, SMON ETC. But in alert log first it will show PMON.

PSP0, process spawner. This background process will start other processes like PMON, SMON etc. But in alert log first it will show PMON.

31.

Which Background Process Is Responsible For Writing Into Alert Log File?

Answer»

All the BACKGROUND PROCESSES are RESPONSIBLE.

All the background processes are responsible.

32.

If We Have Alert Log File To Diagnose The Problem, Why We Need Trace Files? What Are They?

Answer»

Alert LOG itself cannot provide complete information about the error, in which CASE it will GENERATE trace file. Depends on the error, it will generate BACKGROUND, CORE or user trace files.

Alert log itself cannot provide complete information about the error, in which case it will generate trace file. Depends on the error, it will generate background, core or user trace files.

33.

What Happens If We Remove Alert Log File When Database Is In Use?

Answer»

No EFFECT on the database functionality. ORACLE will create a NEW ALERT log FILE.

No effect on the database functionality. Oracle will create a new alert log file.

34.

What Are The Contents Of Alert Log File?

Answer»

Database STARTUP and shutdown times, non-default parameters, any logical or physical structural changes and alloracle ERRORS etc.

Database startup and shutdown times, non-default parameters, any logical or physical structural changes and alloracle errors etc.

35.

What Is Alert Log? How It Is Helpful For Dba?

Answer»

It is FILE which HELPS in diagnosing all the errors OCCURRED in the DATABASE.

It is file which helps in diagnosing all the errors occurred in the database.

36.

My Database Size Is 1 Tb, How Much Sga Will You Configure?

Answer»

SGA size is not DEPENDANT on database size, it depends on how many transactions HAPPENING in the database.

SGA size is not dependant on database size, it depends on how many transactions happening in the database.

37.

What Is Amm In 11g?

Answer»

Managing both SGA and PGA AUTOMATICALLY by oracle is called Automatic Memory MANAGEMENT (AMM).

Managing both SGA and PGA automatically by oracle is called Automatic Memory Management (AMM).

38.

Which Parameter Helps Asmm To Be Affective? What Is The Value It Should Be Set To?

Answer»

SGA_TARGET and VALUE is DEPENDENT on no of TRANSACTIONS in the DATABASE.

SGA_TARGET and value is dependent on no of transactions in the database.

39.

You Increase The Sga_max_size Parameter To A Higher Value. But When Trying To Increase Sga_target, Its Throwing Error That “it Cannot Increase”. What Might Be The Reason?

Answer»

Kernel PARAMETER SHMMAX MAY be reached. We should increase that FIRST.

Kernel parameter SHMMAX may be reached. We should increase that first.

40.

How Database Will Behave When You Have Both Asmm And Individual Parameters Are Configured?

Answer»

Values of INDIVIDUAL PARAMETERS will ACT as minimum and ASMM as MAXIMUM.

Values of individual parameters will act as minimum and ASMM as maximum.

41.

What Is Asmm? Which Background Process Helps In That?

Answer»

Setting SGA_TARGET parameter is called ASMM. This HELPS in managing all SGA components AUTOMATICALLY and MMAN is the BACKGROUND process helps in that.

Setting SGA_TARGET parameter is called ASMM. This helps in managing all SGA components automatically and MMAN is the background process helps in that.

42.

While Creating Password File, What Is The Use Of Entries?

Answer»

To SPECIFY how many users with sysdba role can connect to the DATABASE REMOTELY.

To specify how many users with sysdba role can connect to the database remotely.

43.

Even Though There Is A Password File, Still I Observed That Any User Is Being Able To Connect As Sysdba From Remote Machine Without A Password. What Went Wrong?

Answer»

REMOTE_LOGIN_PASSWORD is not SET to EXCLUSIVE.

REMOTE_LOGIN_PASSWORD is not set to exclusive.

44.

What Is The Purpose Of Password File?

Answer»

It is used to AUTHENTICATE any USER is CONNECTING as SYSDBA from a REMOTE machine.

It is used to authenticate any user is connecting as SYSDBA from a remote machine.

45.

What Are Hidden Parameters And Their Use?

Answer»

Hidden parameters are to be used only on recommendation of oracle support and SOMETIMES they help us in providing WORK around to any SERIOUS problem in the database.

Hidden parameters are to be used only on recommendation of oracle support and sometimes they help us in providing work around to any serious problem in the database.

46.

If We Have Both Pfile And Spfile In Place, Which File Oracle Will Use During Startup?

Answer»

Spfile.

Spfile.

47.

How To Recover If I Lost Parameter Pfile Or Spfile?

Answer»

We can RECOVER from ALERT LOG file which contains non-default PARAMETERS.

We can recover from alert log file which contains non-default parameters.

48.

What Is Ifile And When It Is Used?

Answer»

Ifile is a index FILE which can HELP database when pfile or SPFILE are not in DEFAULT location.

Ifile is a index file which can help database when pfile or spfile are not in default location.

49.

What Is Server Parameter File And How It Is Different From Parameter File?

Answer»

Spfile is a BINARY file and it helps in changing PARAMETERS efficiently than a PFILE.

Spfile is a binary file and it helps in changing parameters efficiently than a pfile.

50.

What Information Control File Contains?

Answer»

It contains LATEST SCN, all LOCATIONS and sizes of datafiles and redolog files, database creation date and timestamp and CONTROLFILE PARAMETERS.

It contains latest SCN, all locations and sizes of datafiles and redolog files, database creation date and timestamp and controlfile parameters.