Here are common Oracle DBA Questions I have encountered:
1. What is the format of an Oracle Release Number?
Example: 10.1.0.3.0
10 - Major database release number
1 - Database maintenance release number
0 - Application server release number
3 - Component specific release number
0 - Platform specific release number
2. What is a mutating table?
A mutating table is a table that is currently being modified by an update, delete, or insert statement. If an application has a row trigger that reads or modifies the mutating table, the common ORA-04091 error is generated.
ORA-04091: "table %s.%s is mutating, trigger/function may not see it"
Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
Action: Rewrite the trigger (or function) so it does not read that table.
3. What is the difference between deadlock and blocking lock?
A deadlock is a condition where two or more users are waiting for data locked by each other.
A blocking lock is held by the blocking session.
4. What are the data structures used for database recovery?
- Redo Logs
- Rollback and Undo Segments
- Control Files
5. When monitoring Oracle databases, what are the common V$ used?
V$PROCESS
V$SESSION
V$SESS_IO
V$SESSION_LONGOPS
V$SESSION_WAIT
V$SYSSTAT
V$RESOURCE_LIMIT
V$SQLAREA
V$LATCH
6. What are some Initialization Parameters that affect performance?
- DB_BLOCK_SIZE: database block size
- DB_CACHE_SIZE: size of the buffer cache in the SGA
- SHARED_POOL_SIZE: size of the shared pool in the SGA
- PROCESSES: maximum number of processes that can be started by that instance
- SESSIONS: set by default from the value of processes
- JAVA_POOL_SIZE: If using Java stored procedures, this parameter should be set depending on the memory requirements for the Java environment
- LOG_ARCHIVE_XXX: Enables redo log archiving.
- ROLLBACK_SEGMENTS: Allocates one or more rollback segments by name to this instance
7. What is the difference between Suspending a database and Quiescing a database?
Starting with 9i, the concepts of Suspending and Quiescing a database were introduced.
Suspending a database : database suspend/resume feature
- ALTER SYSTEM SUSPEND statement suspends a database by halting all input and output (I/O) to datafiles and control files
- ALTER SYSTEM RESUME statement resumes normal database operation
Quiescing a database: By putting a database on quiesced state, only DBA transactions, queries, or PL/SQL statements are allowed
- ALTER SYSTEM QUIESCE statement puts the database into a quiesced state