Learning and Preparing to a DBA Interview

“The main idea of this article is to help you to prepare to an Oracle DBA Interview and at the same time help you to learn and understand the most important basic points that a good Oracle DBA need to know. “ 

Advice: Be brief and stick to the topic in your answers. The interviewer will ask if he/she wants more detail.

Here are some possible Oracle DBA Interview Questions: 

Some question about Oracle database: 

  1. What is an Oracle Instance?
  2. What information is stored in Control File?

  3. When you start an Oracle DB which file is accessed first?

  4. What is RDBMS?

Some Questions about Memory: 

  1. What is the Job of SMON, PMON processes?
  2. What is a Checkpoint?
  3. Which Process reads data from Datafiles?
  4. Which Process writes data in Datafiles?
  5. What is a Shared Pool?
  6. What is PGA_AGGREGRATE_TARGET parameter?
  7. Large Pool is used for what?
  8. What is DB Buffer Cache Advisor?
  9. Can you change SHARED_POOL_SIZE online?
  10. When creating a new database, how would you handle the memory allocation?
  11. Name some memory areas Oracle uses,and state their purpose?
  12. What is difference between Multithreaded/Shared Server and Dedicated Server?
  13. How does 32-bit Oracle compare with 64-bit in terms of memory restrictions?
  14. What are the efects of using bind variables?
  15. How would you ensure that a table’s blocks stayed in the SGA?
  16. Why would a DBA pin packages into memory?
  17. Explain what the parameter session_cached_cursors is used for?
  18. What is kept in the Database Buffer Cache?

Questions about Transactions: 

  1. Explain how Oracle achieves read consistency?

  2. Explain an ORA-01555 / Snapshot too old error and how you might prevent them?

  3. What happens when a commit is issued?

Some Backup and Recovery Questions: 

  1. What is written in Redo Log Files?

  2. How many maximum Redo Logfiles one can have in a Database?

  3. Explain the differences between an export, a hot backup and a cold backup and the benefits associated with each?

  4. What is COMPRESS and CONSISTENT setting in EXPORT utility?

  5. What is the difference between Direct Path and Convention Path loading?

  6. What files are required to be included in a complete hot/online backup?

  7. Explain the differences between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages of each?

  8. Can you take partial backups if the Database is running in NOARCHIVELOG mode?

  9. Can you take Online Backups if the the database is running in NOARCHIVELOG mode?

  10. How do you bring the database in ARCHIVELOG mode from NOARCHIVELOG mode?

  11. You cannot shutdown the database for even some minutes, then in which mode you should run the database?

  12. How can you backup a control file?

  13. What are redo logs? Explain their importance?

  14. What happens duiring a instance recover?

  15. Explain what effect “NOLOGGING” commands have on the database? How would this affect standby databases and point in time recovery?

  16. A large amount of data has been deleted by a user of an application. The data can’t be re-entered via the application because it’s not all available. What options would you investigate them?

  17. A datafile has been deleted while the database was open and being used. What would you do?

  18. Scenario: An RMAN backup is multiplexing all of the datafiles to one tape drive. (Filesperset>1 channels >1). What are the implications? How would you improve the situation?

  19. Can you import objects from Oracle ver. 7.3 to 9i?

  20. Scenario: A busy database only has a full backup to tape each day using RMAN. 250 GB of archivelogs are generated per day. What are the implications? How would you improve the situation?

  21. Where should you place Archive logfiles, in the same disk where DB is or another disk?

  22. Can you take online backup of a Control file if yes, how?

  23. What is a Logical Backup?

  24. Should you take the backup of Logfiles if the database is running in ARCHIVELOG mode?

  25. Why do you take tablespaces in Backup mode?

  26. What is the advantage of RMAN utility?

  27. How RMAN improves backup time?

  28. Can you take Offline backups using RMAN?

  29. How do you see information about backups in RMAN?

  30. What is a Recovery Catalog?

  31. Should you place Recovery Catalog in the Same DB?

  32. Can you use RMAN without Recovery catalog?

  33. Can you take Image Backups using RMAN?

  34. Can you use Backupsets created by RMAN with any other utility?

  35. Where RMAN keeps information of backups if you are using RMAN without Catalog?

  36. You have taken a manual backup of a datafile using o/s. How RMAN will know about it?

  37. You want to retain only last 3 backups of datafiles. How do you go for it in RMAN?

  38. Which is more efficient Incremental Backups using RMAN or Incremental Export?

  39. Can you start and shutdown DB using RMAN?

  40. How do you recover from the loss of datafile if the DB is running in NOARCHIVELOG mode?

  41. You loss one datafile and it does not contain important objects. The important objects are there in other datafiles which are intact. How do you proceed in this situation?

  42. You lost some datafiles and you don’t have any full backup and the database was running in NOARCHIVELOG mode. What you can do now?

  43. How do you recover from the loss of datafile if the DB is running in ARCHIVELOG mode?

  44. You loss one datafile and DB is running in ARCHIVELOG mode. You have full database backup of 1 week old and partial backup of this datafile which is just 1 day old. From which backup should you restore this file?

  45. You loss controlfile how do you recover from this?

  46. The current logfile gets damaged. What you can do now?

  47. What is a Complete Recovery?

  48. What is Cancel Based, Time based and Change Based Recovery?

  49. Some user has accidentally dropped one table and you realize this after two days. Can you recover this table if the DB is running in ARCHIVELOG mode?

  50. Do you have to restore Datafiles manually from backups if you are doing recovery using RMAN?

  51. A database is running in ARCHIVELOG mode since last one month. A datafile is added to the database last week. Many objects are created in this datafile. After one week this datafile gets damaged before you can take any backup. Now can you recover this datafile when you don’t have any backups?

  52. How do you recover from the loss of a controlfile if you have backup of controlfile?

  53. Only some blocks are damaged in a datafile. Can you just recover these blocks if you are using RMAN?

  54. Some datafiles were there on a secondary disk and that disk has become damaged and it will take some days to get a new disk. How will you recover from this situation?

  55. Have you faced any emergency situation? Tell us how you resolved it?

  56. At one time you lost parameter file accidentally and you don’t have any backup. How you will recreate a new parameter file with the parameters set to previous values.

Some Lock and Latches Questions: 

  1. What are latches used for?

  2. What happens when a session has to wait for a latch?

  3. Explain what deadlocks are and how to avoid them?

  4. When do indexes help to reduce lock contention?

Some Storage Questions: 

  1. What is Automatic Management of Segment Space setting?

  2. How do you control number of Datafiles one can have in an Oracle database?

  3. How many Maximum Datafiles can there be in an Oracle Database?

  4. Can you make a Datafile auto extendible? If yes, how?

  5. What is a Locally Managed Tablespace?

  6. Can you redefine a table Online?

  7. Explain the relationship between a data block, an extent and a segment?

  8. .What is the difference between Range Partitioning and Hash Partitioning?

  9. What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

  10. How do you move tables from one tablespace to another tablespace?

  11. How do you add a datafile to a tablespace?

  12. How do you resize a datafile?

  13. What view would you use to look at the size of a datafile?

  14. What view would you use to determine free space in a (non-tempfile) tablespace?

  15. What is PCT Increase setting?

  16. Describe what the PCT_FREE setting does.

  17. What are chained rows and migrated rows? What could you do to limit their effect on performance?

Some Performance Questions: 

  1. When should you rebuild indexes?

  2. Can you built indexes online?

  3. Can you see Execution Plan of a statement?

  4. How would you determine what session’s arer connected and what resources they are waiting for?

  5. How can you gather statistics on a table?

  6. How often you should collect statistics for a table?

  7. How do you collect statistics for a table, schema and Database?

  8. Can you make collection of Statistics for tables automatic?

  9. How can you enable a trace for a session?

  10. How would you go about generating an EXPLAIN plan?

  11. How would you go about increasing the buffer cache hit ratio?

  12. Name some Oracle performance tools or sources of statistics?

  13. How would you begin investigating a performance problem, beginning from a user’s complaint?

  14. What is Cost Based Optimization?

  15. What is STATSPACK tool?

  16. Can you assign Priority to users?

Some Data Warehouse Questions: 

  1. What characterises a data warehouse as opposed to an OLTP database?

  2. Which Oracle features are commonly useful to data warehouse databases?

  3. Briefly describe how each of the features from the previous question work?

  4. What tools might be used for ETL?

 Some Development Support Questions: 

  1. List and describe typical environments used in the development life of an application? (Eg. Production, development, QA,etc)

  2. How would you manage the promotion of changes through the environments to ensure success when released into production?

  3. How can a DBA help developers to design an application?

  4. Explain the differences between a FUNCTION, PROCEDURE, PACKAGES and anonymous PL/SQL blocks?

  5. After an import of a schema has finished, what should you check before notifying the users that the database can be used?

  6. Give two types of referential integrity constraints?

  7. How would you create a copy of a database with new name on a different server?

  8. You have just compiled a PL/SQL package but got some errors. How would you view the errors?

  9. On which columns you should create Indexes?

  10. What types of Indexes are available in Oracle?

  11. What is B-Tree Index?

  12. A table is having few rows, should you create indexes on this table?

  13. A Column is having many repeated values which type of index you should create on this column, if you have to?

  14. What is an Index Organized Table?

  15. What is a Global Index and Local Index?

Some Questions about RAC: 

  1. Briefly describe what RAC is, and what the intended benefits are?

  2. What are two essential RAC hardware components?

  3. What are two methods of RAC load balancing?

  4. What does cache fusion mean?

  5. What is the voting disk for?

  6. What is the hangcheck timer for in Linux?

  7. What performance issues should be considered when migrating an application to RAC?

Some Replication Questions: 

  1. Describe some types of Oracle Replication?

  2. What is the difference between a complete refresh and a fast refresh?

Some Unix/Linux Questions: 

  1. How do you see how many instances are running?

  2. How do you automate starting and shutting down of databases in UNIX?

  3. How do you list the files in an Unix directory while also showing hidden files?

  4. You have written a script to take backups. How do you make it run automatically every week?

  5. How do you execute a UNIX command in the background?

  6. What is OERR utility?

  7. How do you see Virtual Memory Statistics in Linux?

  8. How do you see how much hard disk space is free in Linux?

  9. What is SAR?

  10. What is SHMMAX?

  11. Swap partition must be how much the size of RAM?

  12. What is DISM in Solaris?

  13. How do you see how many memory segments are acquired by Oracle Instances?

  14. How do you see which segment belongs to which database instances?

  15. What is VMSTAT, IOSTAT and NETSTAT?

  16. How would you change all ocurrences of a value using VI?

  17. How do you set Kernel Parameters in Red Hat Linux, AIX and Solaris?

  18. Give two kernel parameters that affect an Oracle install?

  19. How do you remove Memory segments?

  20. What is the difference between Soft Link and Hard Link?

  21. What is stored in oratab file?

  22. What unix command will control the default file permissions when files are created?

  23. Give the command to display space usage on the UNIX file system?

  24. Explain the read, write, and execute permissions on an UNIX directory?

  25. How do you see how many processes are running in UNIX?

  26. How do you kill a process in UNIX?

  27. Can you change priority of a Process in UNIX?

  28. Briefly, how do you install Oracle software on UNIX?

Miscellaneous Questions: 

  1. How do you delete duplicate rows in a table?

  2. Which default Database roles are created when you create a Database?

  3. Name three files that can be used to configure SQL*Net for server and client?

  4. What problems are associated with the use of generic user ids?

  5. Where would you look for errors from the database engine?

  6. An application is generating an ORA-00600 error in the database. What would you do about it?

  7. Give two examples of how you might determine the structure of the table “DEPT”?

  8. What is the difference between an pfile and spfile?

  9. Compare TRUNCATE and DELETE for a table?

  10. Give the stages of instance startup to a usable state where normal users may access it?

  11. When creating a user, what are the minimun permissions that must be granted to allow them to connect to the database?

  12. How would you find out what a particular pfile does?

  13. What methods can you use to compact an index?

  14. A table has been identified as needing reorganization. How would you plan for it? How would you implement it?

  15. A user can’t loggin to a remote Oracle database via an application using SQL*Net from their PC. What would you do to determine the cause?

  16. A database is not shutting down 15 minutes after the shutdown immediate command was issued. What would you do?

  17. An error appears about a table that can’t extend due to insufficient space in the tablespace. What would you do?

  18. You have been asked to write the requeriments for an automatic “health check” system for a database. What things would you include?

  19. You have been presented with a UNIX database server, and have been logged in as the root user. How would you find the databases and obtain access to them?

  20. Can you audit SELECT statements?

  21. What does DBMS_FGA package do?

  22. You want users to change their passwords every 2 months. How do you enforce this?

  23. Can you disable and enable Primary key? 


Francisco Munoz Alvarez

One thought on “Learning and Preparing to a DBA Interview

Leave a Reply