Sean Hull wrote a few interview questions for Database Journal dealing mostly with Oracle:
- Why is a UNION ALL faster than a UNION?
- What are some advantages to using Oracle’s CREATE DATABASE statement to create a new database manually?
- What are three rules of thumb to create good passwords? How would a DBA enforce those rules in Oracle? What business challenges might you encounter?
- Describe the Oracle Wait Interface, how it works, and what it provides. What are some limitations? What do the db_file_sequential_read and db_file_scattered_read events indicate?
- How do you return the top-N results of a query in Oracle? Why doesn’t the obvious method work?
- Can Oracle’s Data Guard be used on Standard Edition, and if so how? How can you test that the standby database is in sync?
- What is a database link? What is the difference between a public and a private database link? What is a fixed user database link?
The database interview answers are all listed on Database Journal Web site.
4 Comments on DBA Interview Questions and Answers
- Why is a UNION ALL faster than a UNION?
UNION ALL faster than a UNION because for union operation server needs to remove the duplicate values but for union all its not. Thats why the UNOIN ALL is fater than UNION Operation. It is recommended that if you know that the union set operation never returns duplicate values than you must use UNION ALL instead of UNION.
How do you return the top-N results of a query in Oracle?
SELECT TOP N * FROM TABLE
OR
SELECT TOP N% * FROM TABLE
Q Database link.
It is a schema object in one database enables you to access objects on another database.Other database can be any one not necessary that it should be oracle.
when you create public using PUBLIC, it is available to all users if you do not use public it will become private.
How do you return the top-N results of a query in Oracle?
SELECT *
FROM (SELECT *
FROM table_name
ORDER BY column_name DESC)
WHERE rownum <= N