Oracle DBA Interview Questions
Oracle Database Administrators or often called DBAs are an indispensable part of your operations team. They manage the systems that house all your business data, your customers, products, transactions, and all that analytical data on what customers are actually doing.
If you’ve ever been on the hunt, you may wonder, why the shortage of DBAs. To that we’ll answer, have you ever heard of Dustin Moskovitz?
So, you certainly want to entrust that to someone who knows what they’re talking about. Enter the Oracle DBA Interview, a process that some will see as a technical test, while others will see as a fit of personalities, behaviors, and work ethic.
- 15 Questions to Ask in Oracle DBA Interview
- 1. What Is The Difference Between RMAN And A Traditional Hotbackup?
- 2. What Are Bind Variables And Why Are They Important?
- 3. In PL/SQL, What Is Bulk Binding, And When/How Would It Help Performance?
- 4. Why Is SQL*Loader Direct Path So Fast?
- 5. What Are The Tradeoffs Between Many Vs Few Indexes? When Would You Want To Have Many, And When Would It Be Better To Have Fewer?
- 6. What Is The Difference Between RAID 5 And RAID 10? Which Is Better For Oracle?
- 7. When Using Oracle Export/Import What Character Set Concerns Might Come Up? How Do You Handle Them?
- 8. How Do You Use Automatic PGA Memory Management With Oracle 9i And Above?
- 9. Explain Two Easy SQL Optimizations.
- 10. Name Three SQL Operations That Perform A SORT.
- 11. What Is Your Favorite Tool For Day-To-Day Oracle Operations?
- 12. What Is The Difference Between Truncate And Delete? Why Is One Faster? Can We ROLLBACK Both? How Would A Full Table Scan Behave After?
- 13. What Is The Difference Between A Materialized View (Snapshot) Fast Refresh Versus Complete Refresh? When Is One Better, And When The Other?
- 14. What Does The NO LOGGING Option Do? Why Would We Use It? Why Would We Be Careful Of Using It?
- 15. Tell Me About Standby Database? What Are Some Of The Configurations Of It? What Should We Watch Out For?
15 Questions to Ask in Oracle DBA Interview
From the technical side, we thought we’d bring you a quick and dirty checklist of questions. This isn’t an exhaustive list by any means, but is a good place to start and will certainly provide you with a glimpse of their knowledge.
1. What Is The Difference Between RMAN And A Traditional Hotbackup?
RMAN is faster, can do incremental (changes only) backups, and does not place tablespaces into hotbackup mode.
2. What Are Bind Variables And Why Are They Important?
With bind variables in SQL, Oracle can cache related queries a single time in the SQL cache (area). This avoids a hard parse each time, which saves on various locking and latching resources we use to check objects’ existence and so on.
BONUS: For rarely run queries, especially BATCH queries, we explicitly DO NOT want to use bind variables, as they hide information from the Cost Based Optimizer.
BONUS BONUS: For batch queries from 3rd party apps like PeopleSoft, if we can’t remove bind variables, we can use bind variable peeking!
3. In PL/SQL, What Is Bulk Binding, And When/How Would It Help Performance?
Oracle’s SQL and PL/SQL engines are separate parts of the kernel that require context switching, like between Unix processes. This is slow and uses up resources. If we loop on an SQL statement, we are implicitly flipping between these two engines. We can minimize this by loading our data into an array, and using PL/SQL bulk binding operation to do it all in one go!
4. Why Is SQL*Loader Direct Path So Fast?
SQL*Loader with direct path option can load data ABOVE the high-water mark of a table, and DIRECTLY into the datafiles, without going through the SQL engine at all. This avoids all the locking, latching, and so on, and doesn’t impact the db (except possibly the I/O subsystem) at all.
5. What Are The Tradeoffs Between Many Vs Few Indexes? When Would You Want To Have Many, And When Would It Be Better To Have Fewer?
Fewer indexes on a table mean faster inserts/updates. More indexes mean faster, more specific WHERE clauses possibly without index merges.
6. What Is The Difference Between RAID 5 And RAID 10? Which Is Better For Oracle?
RAID 5 is striping with an extra disk for parity. If we lose a disk, we can reconstruct from that parity disk.
RAID 10 is mirroring pairs of disks, and then striping across those sets.
RAID 5 was created when disks were expensive. Its purpose was to provide RAID on the cheap. If a disk fails, the IO subsystem will perform VERY slowly during the rebuild process.
What’s more your liklihood of failure increases dramatically during this period, with all the added weight of the rebuild. Even when it is operating normally RAID 5 is slow for everything but reading. Given that and knowing databases (especially Oracle’s redo logs) continue to experience write activity all the time, we should avoid RAID5 in all but the rare database that is MOSTLY read activity. Don’t put redologs on RAID5.
RAID10 is just all-around goodness. If you lose one disk in a set of 10 for example, you could lose any one of eight other disks and have no troubles. What’s more rebuilding does not impact performance at all since you’re simply making a mirror copy. Lastly RAID10 perform exceedingly well in all types of databases.
7. When Using Oracle Export/Import What Character Set Concerns Might Come Up? How Do You Handle Them?
Be sure to set NLS_LANG for example to “AMERCIAN_AMERICA.WE8ISO8859P1”. If your source database is US7ASCII, beware of 8-bit characters. Also be wary of multi-byte characters sets as those may require extra attention. Also watch export/import for messages about any “character set conversions” which may occur.
8. How Do You Use Automatic PGA Memory Management With Oracle 9i And Above?
Set the WORKAREA_SIZE_POLICY parameter to AUTO and set PGA_AGGREGATE_TARGET
9. Explain Two Easy SQL Optimizations.
- EXISTS can be better than IN under various conditions
- UNION ALL is faster than UNION (not sorting)
10. Name Three SQL Operations That Perform A SORT.
- CREATE INDEX
- GROUP BY
- ORDER BY
- UNINDEXED TABLE JOIN
11. What Is Your Favorite Tool For Day-To-Day Oracle Operations?
Hopefully, we hear some use of the command line as the answer!
12. What Is The Difference Between Truncate And Delete? Why Is One Faster? Can We ROLLBACK Both? How Would A Full Table Scan Behave After?
Truncate is nearly instantaneous, cannot be rolled back, and is fast because Oracle simply resets the HWM. When a full table scan is performed on a table, such as for a sort operation, Oracle reads to the HWM.
So, if you delete every single solitary row in 10 million row table so it is now empty, sorting on that table of 0 rows would still be extremely slow.
13. What Is The Difference Between A Materialized View (Snapshot) Fast Refresh Versus Complete Refresh? When Is One Better, And When The Other?
Fast refresh maintains a change log table, which records change vectors, not unlike how the redo logs work. There is overhead to this, as with a table that has a LOT of indexes on it, and inserts and updates will be slower.
However, if you are performing refreshes often, like every few minutes, you want to do a fast refresh so you don’t have to full-table-scan the source table. Complete refresh is good if you’re going to refresh once a day. Does a full table scan on the source table, and recreats the snapshot/mview.
Also, inserts/updates on the source table are NOT impacted on tables where complete refresh snapshots have been created.
14. What Does The NO LOGGING Option Do? Why Would We Use It? Why Would We Be Careful Of Using It?
It disables the logging of changes to the redologs. It does not disable ALL LOGGING, however, as Oracle continues to use a base of changes, for recovery if you pull the plug on the box, for instance.
However, it will cause problems if you are using standby database. Use it to speed up operations, like an index rebuild, or partition maintenance operations.
15. Tell Me About Standby Database? What Are Some Of The Configurations Of It? What Should We Watch Out For?
Standby databases allow us to create a copy of our production db, for disaster recovery. We merely switch mode on the target db, and bring it up as read/write. Can setup as master->slave or master->master.
The latter allows the former prod db to become the standby, once the failure cause is remedied. Watch out for NO LOGGING!! Be sure we’re in archivelog mode.
All the 15 best questions to ask on an Oracle DBA interview are provided in this article and we hope you have found this guide helpful on learning about them. In you have anything to ask or have any extra question to ask for an Oracle DBA interview, feel free to ask ion our comment section below. Thanks for reading!