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.

Name Two Files Used For Network Connection To A Database.

Answer»

TNSNAMES.ORA and SQLNET.ORA

TNSNAMES.ORA and SQLNET.ORA

2.

How Can You Gather Statistics On A Table?

Answer»

The ANALYZE COMMAND.

The ANALYZE command.

3.

You Have Just Compiled A Pl/sql Package But Got Errors, How Would You View The Errors?

Answer»

SHOW ERRORS

SHOW ERRORS

4.

Explain What Partitioning Is And What Its Benefit Is.

Answer»

Partitioning is a method of TAKING LARGE tables and indexes and SPLITTING them into smaller, more MANAGEABLE pieces.

Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.

5.

How Can You Rebuild An Index?

Answer»

ALTER INDEX <index_name> REBUILD;

ALTER INDEX <index_name> REBUILD;

6.

How Would You Determine Who Has Added A Row To A Table?

Answer»

TURN on FINE GRAIN AUDITING for the table.

Turn on fine grain auditing for the table.

7.

What View Would You Use To Determine Free Space In A Tablespace?

Answer»

DBA_FREE_SPACE

DBA_FREE_SPACE

8.

What View Would You Use To Look At The Size Of A Data File?

Answer»

DBA_DATA_FILES

DBA_DATA_FILES

9.

How Do You Resize A Data File?

Answer»

ALTER DATABASE DATAFILE &LT;datafile_name> RESIZE <new_size>;

ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;

10.

How Do You Add A Data File To A Tablespace?

Answer»

ALTER TABLESPACE &LT;tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>

ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>

11.

When Creating A User, What Permissions Must You Grant To Allow Them To Connect To The Database?

Answer»

GRANT the CONNECT to the USER.

Grant the CONNECT to the user.

12.

Name A Tablespace Automatically Created When You Create A Database?

Answer»

The SYSTEM TABLESPACE.

The SYSTEM tablespace.

13.

Give Two Methods You Could Use To Determine What Ddl Changes Have Been Made.

Answer»

You COULD USE Logminer or STREAMS

You could use Logminer or Streams

14.

How Would You Force A Log Switch?

Answer»

ALTER SYSTEM SWITCH LOGFILE;

ALTER SYSTEM SWITCH LOGFILE;

15.

How Would You Determine What Sessions Are Connected And What Resources They Are Waiting For?

Answer»

USE of V$SESSION and V$SESSION_WAIT

Use of V$SESSION and V$SESSION_WAIT

16.

What Background Process Refreshes Materialized Views?

Answer»

The JOB QUEUE PROCESSES.

The Job Queue Processes.

17.

When A User Process Fails, What Background Process Cleans Up After It?

Answer»

PMON

PMON

18.

Explain Materialized Views And How They Are Used.

Answer»

Materialized views are objects that are reduced SETS of INFORMATION that have been summarized, grouped, or AGGREGATED from BASE tables. They are typically USED in data warehouse or decision support systems.

Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.

19.

Where In The Oracle Directory Tree Structure Are Audit Traces Placed?

Answer»

In UNIX $ORACLE_HOME/rdbms/audit, in WINDOWS the EVENT VIEWER

In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer

20.

Name Three Advisory Statistics You Can Collect.

Answer»

Buffer CACHE ADVICE, Segment Level STATISTICS, & Timed Statistics.

Buffer Cache Advice, Segment Level Statistics, & Timed Statistics.

21.

Explain The Use Of Table Functions.

Answer»

Table functions are DESIGNED to return a set of rows through PL/SQL logic but are INTENDED to be used as a normal table or VIEW in a SQL statement. They are also used to pipeline information in an ETL process.

Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.

22.

How Would You Determine The Time Zone Under Which A Database Was Operating?

Answer»

SELECT DBTIMEZONE from DUAL;

select DBTIMEZONE from dual;

23.

Explain The Difference Between $oracle_home And $oracle_base?

Answer»

ORACLE_BASE is the root DIRECTORY for ORACLE. ORACLE_HOME LOCATED beneath ORACLE_BASE is where the oracle products reside.

ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

24.

Explain An Ora-01555

Answer»

You GET this error when you get a snapshot too OLD within rollback. It can usually be solved by increasing the undo retention or increasing the SIZE of rollbacks. You should also look at the logic involved in the application GETTING the error MESSAGE.

You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.

25.

How Would You Go About Increasing The Buffer Cache Hit Ratio?

Answer»

Use the BUFFER cache ADVISORY over a given WORKLOAD and then query the v$db_cache_advice table. If a CHANGE was necessary then I would use the alter system set db_cache_size command.

Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. If a change was necessary then I would use the alter system set db_cache_size command.

26.

How Would You Go About Generating An Explain Plan?

Answer»

CREATE a PLAN table with utlxplan.SQL.
Use the EXPLAIN plan SET statement_id = ‘tst1’ into plan_table for a SQL statement
Look at the explain plan with utlxplp.sql or utlxpls.sql

Create a plan table with utlxplan.sql.
Use the explain plan set statement_id = ‘tst1’ into plan_table for a SQL statement
Look at the explain plan with utlxplp.sql or utlxpls.sql

27.

What Column Differentiates The V$ Views To The Gv$ Views And How?

Answer»

The INST_ID column which indicates the instance in a RAC ENVIRONMENT the information CAME from.

The INST_ID column which indicates the instance in a RAC environment the information came from.

28.

Give The Stages Of Instance Startup To A Usable State Where Normal Users May Access It?

Answer»

STARTUP NOMOUNT – Instance startup. Control File is read here.

STARTUP MOUNT – The database is MOUNTED. Datafiles are read for the status and CHECKED with control file.

STARTUP OPEN – The database is OPENED. Normal users can access.

STARTUP NOMOUNT – Instance startup. Control File is read here.

STARTUP MOUNT – The database is mounted. Datafiles are read for the status and checked with control file.

STARTUP OPEN – The database is opened. Normal users can access.

29.

What Command Would You Use To Create A Backup Control File?

Answer»

ALTER DATABASE backup CONTROL FILE to TRACE.

Alter database backup control file to trace.

30.

Give Two Examples Of Referential Integrity Constraints?

Answer»

A PRIMARY KEY and a FOREIGN key.

A primary key and a foreign key.

31.

What Type Of Index Should You Use On A Fact Table?

Answer»

A BITMAP INDEX.

A Bitmap index.

32.

Give The Reasoning Behind Using An Index?

Answer»

FASTER ACCESS to DATA BLOCKS in a table.

Faster access to data blocks in a table.

33.

Compare And Contrast Truncate And Delete For A Table?

Answer»

Both the truncate and DELETE command have the desired outcome of GETTING rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high WATER mark and produces a now rollback. The delete command, on the other HAND, is a DML operation, which will produce a rollback and thus take longer to COMPLETE.

Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.

34.

Where Would You Look For Errors From The Database Engine?

Answer»

In the ALERT LOG.

In the alert log.

35.

Give Two Examples Of How You Might Determine The Structure Of The Table Dept.

Answer»

USE the DESCRIBE COMMAND or use the dbms_metadata.get_ddl PACKAGE.

Use the describe command or use the dbms_metadata.get_ddl package.

36.

Explain The Difference Between A Data Block, An Extent And A 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. Extent may not be continuous.

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. Extent may not be continuous.

37.

How Do You Switch From An Init.ora File To A Spfile?

Answer»

ISSUE the CREATE SPFILE from PFILE COMMAND.

Issue the create spfile from pfile command.

38.

You Have Just Had To Restore From Backup And Do Not Have Any Control Files. How Would You Go About Bringing Up This Database?

Answer»

I WOULD create a TEXT based backup CONTROL FILE, STIPULATING where on disk all the data files where and then issue the recover command with the using backup control file clause.

I would create a text based backup control file, stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.

39.

Explain The Difference Between A Hot Backup And A Cold Backup And The Benefits Associated With Each.

Answer»

A HOT backup is basically taking a backup of the database while it is still up and running and it must be in archive log MODE. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is OCCURRING and you can recover the database to any point in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a SLIGHT performance gain as the database is not cutting archive logs to disk.

A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any point in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk.