Top 45 Database Administration Interview Questions You Must Prepare 27.Jul.2024

Q1. How Can You Enable A Trace For A Session?

Use the DBMS_SESSION.SET_SQL_TRACE or
Use ALTER SESSION SET SQL_TRACE = TRUE;

 

Q2. Name Three Advisory Statistics You Can Collect?

  • Buffer Cache Advice
  • Segment Level Statistics
  • Timed Statistics

 

Q3. Describe What Redo Logs Are?

Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database.

 

Q4. How Do You Reference A Parameter Indirectly?

To indirectly reference a parameter use the NAME IN, COPY ‘built-ins to indirectly set and reference the parameters value’ Example name_in (’capital parameter my param’), Copy (’XXXX’,’Parameter my_param’)

Q5. Explain What Partitioning Is And What Its Benefit Is?

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

 

Q6. What Is A Snapshot Log?

A snapshot log is a table in the master database that is associated with the master table. ORACLE uses a snapshot log to track the rows that have been updated in the master table. Snapshot logs are used in updating the snapshots based on the master table.

 

Q7. Explain The Difference Between Archivelog Mode And Noarchivelog Mode And The Benefits And Disadvantages To Each?

ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all tractions that have occurred in the database so that you can recover to any point in time. NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to any point in time. NOARCHIVELOG mode does have the advantage of not having to write tractions to an archive log and thus increases the performance of the database slightly.

Q8. Explain The Use Of Table Functions?

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.

 

Q9. What Is A Segment?

A segment is a set of extents allocated for a certain logical structure.

Q10. What Is Statement Auditing?

Statement auditing is the auditing of the powerful system privileges without regard to specifically named objects

Q11. What Does Coalescing A Tablespace Do?

Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents into large single extents.

Q12. What Are The Advantages Of Operating A Database In Archivelog Mode Over Operating It In No Archivelog Mode?

Complete database recovery from disk failure is possible only in ARCHIVELOG mode. Online database backup is possible only in ARCHIVELOG mode.

Q13. What Are The Basic Element Of Base Configuration Of An Oracle Database?

It consists of one or more data files. one or more control files. two or more redo log files. The Database contains multiple users/schemas one or more rollback segments one or more tablespaces Data dictionary tables User objects (table, indexes, views etc.,) The server that access the database consists of SGA (Database buffer, Dictionary Cache Buffers, Redo log buffers, Shared SQL pool) SMON (System MONito) PMON (Process MONitor) LGWR (LoG Write) DBWR (Data Base Write) ARCH (ARCHiver) CKPT (Check Point) RECO Dispatcher User Process with associated PGS

Q14. Explain The Difference Between $oracle_home And $oracle_base.

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

Q15. What Are The Database Administrators Utilities Available?

SQL * DBA – This allows DBA to monitor and control an ORACLE database.
SQL * Loader – It loads data from standard operating system files (Flat files) into ORACLE database tables. Export (EXP) and Import (imp) utilities allow you to move existing data in ORACLE format to and from ORACLE database.

Q16. What Is The Maximum No Of Chars The Parameter Can Store?

The maximum no of chars the parameter can store is only valid for char parameters, which can be up to 64K. No parameters default to 23 Bytes and Date parameter default to 7 Bytes.

Q17. Explain The Use Of Setting Global_names Equal To True.

Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

 

Q18. What Is Database Clusters?

Group of tables physically stored together because they share common columns and are often used together is called Cluster.

 

Q19. What Are The Referential Actions Supported By Foreign Key Integrity Constraint?

UPDATE and DELETE Restrict – A referential integrity rule that disallows the update or deletion of referenced data.
DELETE Cascade – When a referenced row is deleted all associated dependent rows are deleted.

 

Q20. Explain About Horizontal, Vertical Tool Bar Canvas Views?

  • Tool bar canvas views are used to create tool bars for individual windows. 
  • Horizontal tool bars are display at the top of a window, just under its menu bar. 
  • Vertical Tool bars are displayed along the left side of a window

Q21. What Is A Dba?

A DBA is a Database Administrator, and this is the most common job that you find a database specialist doing. There are Development DBAs and Production DBAs.
A Development DBA usually works closely with a team of developers and gets more involved in design decisions, giving advice on performance and writing good SQL.
That can be satisfying at a human level because you are part of a team and you share the satisfaction of the teams accomplishments.
A Production DBA (on the other hand) is responsible for maintaining Databases within an organization, so it is a very difficult and demanding job. He or she, often gets involved when all the design decisions have been made, and has simply to keep things up and running.
Therefore, of course, it is also a rewarding job, both financially and in terms of job satisfaction. But it is a more “lonely” job than being a Development DBA.

Q22. What Is Tablespace Quota?

The collective amount of disk space available to the objects in a schema on a particular tablespace.

Q23. Explain The Difference Between A Function, Procedure And Package?

A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application, a function will return a single value. A package on the other hand is a collection of functions and procedures that are grouped together based on their commonality to a business function or application.

 

Q24. What Is The Purpose Of The Product Order Option In The Column Property Sheet?

To specify the order of individual group evaluation in a cross products.

Q25. What Are The System Resources That Can Be Controlled Through Profile?

The number of concurrent sessions the user can establish the CPU processing time available to the user’s session the CPU processing time available to a single call to ORACLE made by a SQL statement the amount of logical I/O available to the user’s session the amount of logical I/O available to a single call to ORACLE made by a SQL statement the allowed amount of idle time for the user’s session the allowed amount of connect time for the user’s session.

 

Q26. Compare And Contrast Truncate And Delete For A Table.

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.

 

Q27. What Is The Difference Between The Sql*loader And Import Utilities?

These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formatted or delimited files.

 

Q28. If Two Groups Are Not Linked In The Data Model Editor, What Is The Hierarchy Between Them?

Two group that is above are the left most rank higher than the group that is to right or below it.

Q29. What Is Default Tablespace?

The Tablespace to contain schema objects created without specifying a tablespace name.

Q30. Explain The Use Of Setting Global_names Equal To True?

Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

Q31. What Is A Database Instance?

A database instance (Server) is a set of memory structure and background processes that access a set of database files. The process can be shared by all users. The memory structure that are used to store most queried data from database. This helps up to improve database performance by decreasing the amount of I/O performed against data file.

Q32. Is It Possible To Insert Comments Into Sql Statements Return In The Data Model Editor?

Yes it is possible to insert comments into sql statements return in the data model editor

Q33. What Is The Difference Between A Temporary Tablespace And A Permanent Tablespace?

A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.

Q34. What Does A Control File Contain?

A Control file records the physical structure of the database. It contains the following information. Database Name Names and locations of a database’s files and redolog files. Time stamp of database creation.

Q35. Explain Materialized Views And How They Are Used?

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.

Q36. Give The Two Types Of Tables Involved In Producing A Star Schema And The Type Of Data They Hold.

Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.

Q37. What Are The Different Levels Of Auditing?

  • Statement Auditing
  • Privilege Auditing 
  •  Object Auditing

Q38. How Can You Enable Automatic Archiving?

Shut the database Backup the database Modify/Include LOG_ARCHIVE_START_TRUE in init.ora file. Start up the database.

Q39. What Is An Index? How It Is Implemented In Oracle Database?

An index is a database structure used by the server to have direct access of a row in a table. An index is automatically created when a unique of primary key constraint clause is specified in create table command (Ver 7.0)

Q40. What Is Distributed Database?

A distributed database is a network of databases managed by multiple database servers that appears to a user as single logical database. The data of all databases in the distributed database can be simultaneously accessed and modified.

Q41. What Is The Use Of Analyze Command?

–To perform one of these function on an index, table, or cluster
– To collect statistics about object used by the optimizer and store them in the data dictionary.
– To delete statistics about the object used by object from the data dictionary.
– To validate the structure of the object.
– To identify migrated and chained rows off the table or cluster.

Q42. What Are The Different Modes Of Mounting A Database With The Parallel Server?

Exclusive Mode If the first instance that mounts a database does so in exclusive mode, only that Instance can mount the database. Parallel Mode If the first instance that mounts a database is started in parallel mode, other instances that are started in parallel mode can also mount the database.

Q43. What Are The Options Available To Refresh Snapshots?

COMPLETE – Tables are completely regenerated using the snapshots query and the master tables every time the snapshot referenced.
FAST – If simple snapshot used then a snapshot log can be used to send the changes to the snapshot tables.
FORCE – Default value. If possible it performs a FAST refresh; Otherwise it will perform a complete refresh.

 

Q44. A Table Is Classified As A Parent Table And You Want To Drop And Re-create It. How Would You Do This Without Affecting The Children Tables?

Disable the foreign key constraint to the parent, drop the table, re-create the table, enable the foreign key constraint.

Q45. What Is The Use Of Image_zoom Built-in?

To manipulate images in image items.