Top most important Oracle DBA interview questions and answers by Experts:
Here is a list of Top most important Oracle DBA interview questions and answers by Experts.If you want to download Oracle DBA interview questions pdf free ,you can register with RVH techguru. Our experts prepared these Oracle DBA interview questions to accommodate freshers level to most experienced level technical interviews.
If you want to become an expert in Oracle DBA ,Register for Oracle DBA online training here.
1) How would you determine the time zone under which a database was operating?
select DBTIMEZONE from dual;
2) 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.
3) What command would you use to encrypt a PL/SQL application?
4) 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.
5) 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.
6) Name three advisory statistics you can collect.
Buffer Cache Advice, Segment Level Statistics, & Timed Statistics
7) Where in the Oracle directory tree structure are audit traces placed?
In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer
8) 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.
9)When a user process fails, what background process cleans up after it?
10) What background process refreshes materialized views?
The Job Queue Processes.
11) How would you determine what sessions are connected and what resources they are waiting for?
Use of V$SESSION and V$SESSION_WAIT
12) 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.
13) How would you force a log switch?
ALTER SYSTEM SWITCH LOGFILE;
14) Give two methods you could use to determine what DDL changes have been made.
You could use Logminer or Streams
15) 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.
16) 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.
17) Name a tablespace automatically created when you create a database.
The SYSTEM tablespace.
18) When creating a user, what permissions must you grant to allow them to connect to the database?
Grant the CONNECT to the user.
19) How do you add a data file to a tablespace?
ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>
20) How do you resize a data file?
ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;
21) What view would you use to look at the size of a data file?
22) What view would you use to determine free space in a tablespace?
23) How would you determine who has added a row to a table?
Turn on fine grain auditing for the table.
24) How can you rebuild an index?
ALTER INDEX <index_name> REBUILD;
25) 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.
26) You have just compiled a PL/SQL package but got errors, how would you view the errors?
27) How can you gather statistics on a table?
The ANALYZE command.
28) How can you enable a trace for a session?
Use the DBMS_SESSION.SET_SQL_TRACE or
Use ALTER SESSION SET SQL_TRACE = TRUE;
29) 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.
30) Name two files used for network connection to a database.
TNSNAMES.ORA and SQLNET.ORA
Technical – UNIX
Every DBA should know something about the operating system that the database will be running on. The questions here are related to UNIX but you should equally be able to answer questions related to common Windows environments.
31) How do you list the files in an UNIX directory while also showing hidden files?
32) How do you execute a UNIX command in the background?
Use the “&”
33) What UNIX command will control the default file permissions when files are created?
34) Explain the read, write, and execute permissions on a UNIX directory.
Read allows you to see and list the directory contents.
Write allows you to create, edit and delete files and subdirectories in the directory.
Execute gives you the previous read/write permissions plus allows you to change into the directory and execute programs or shells from the directory.
35) The difference between a soft link and a hard link?
A symbolic (soft) linked file and the targeted file can be located on the same or different file system while for a hard link they must be located on the same file system.
36) Give the command to display space usage on the UNIX file system.
37) Explain iostat, vmstat and netstat.
Iostat reports on terminal, disk and tape I/O activity.
Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity.
Netstat reports on the contents of network data structures.
38) How would you change all occurrences of a value using VI?
39) Give two UNIX kernel parameters that effect an Oracle install
SHMMAX & SHMMNI
40) Briefly, how do you install Oracle software on UNIX.
Basically, set up disks, kernel parameters, and run orainst.
41) What is Secure External password Store (SEPS)?
Through the use of SEPS you can store password credentials for connecting to database by using a client side oracle wallet, this wallet stores signing credentials. This feature introduced since oracle 10g. Thus the application code, scheduled job, scripts no longer needed embedded username and passwords. This reduces risk because the passwords are no longer exposed and password management policies are more easily enforced without changing application code whenever username and password change.
42) Differentiate DB file sequential read wait/DB File Scattered Read?
Sequential read associated with index read where as scattered read has to do with full table scan. The sequential read, reads block into contiguous memory and DB scattered read gets from multiple block and scattered them into buffer cache.
43) I install oracle 10g on windows 7 successfully. I found every thing working fine except the toad is giving “cannot load oci.dll” error. Is this compatibility issue?
Read the toad user guide. You will get important information related to compatibility issue. In fact toad works with both 32 bit and 64 bit oracle server where as toad only work with 32 bit client. If you need 64 bit client for other applications, you can install both 32 bit and 64 bit client on a single machine and just tell the toad to use the 32 bit client.
44) How to re-organize schema?
We can use dbms_redefinition package for online re-organization of schema objects. Otherwise using import/export and data pump utility you can recreate or re-organize your schema
45) How can you control number of datafiles in oracle database?
The db_files parameter is a “soft limit ” parameter that controls the maximum number of physical OS files that can map to an Oracle instance. The maxdatafiles parameter is a different – “hard limit” parameter. When issuing a “create database” command, the value specified for maxdatafiles is stored in Oracle control files and default value is 32. The maximum number of database files can be set with the init parameter db_files.
Regardless of the setting of this parameter, maximum per database: 65533 (May be less on some operating systems), Maximum number of datafiles per tablespace: OS dependent = usually 1022
You can also by Limited size of database blocks and by the DB_FILES initialization parameter for a particular instance. Bigfile tablespaces can contain only one file, but that file can have up to 4G blocks.
46) What is Latches and why they are used in oracle?
A latch is a serialization mechanism. It is used to gain access to shared data structure in order to latches the structure that will prevent others from modifying it while you are modifying it.
47) Why it is not necessary to take UNDO backup?
In fact it is not necessary to take UNDO tablespace backup either with COLD or HOT backup scripts but many of DBA include UNDO tablespace in their backup script.
You know when you do some transactions; redo entries will be generated and accepted! Just like that other tablespace whenever any change happens to UNDO tablespace or UNDO segments oracle will generate redo entries. So even you not backed up the UNDO tablespace, you have the redo entries through which you can recover or rollback the transactions.
48) What should be effect on DB performance if virtual memory used to store SGA parameter?
For optimal performance in most systems, the entire SGA should fit in real memory. If it does not, and if virtual memory is used to store parts of it, then overall database system performance can decrease dramatically. The reason for this is that portions of the SGA are paged (written to and read from disk) by the operating system
49) What is the role of lock_sga parameter?
The LOCK_SGA parameter, when set to TRUE, locks the entire SGA into physical memory. This parameter cannot be used with automatic memory management or automatic shared memory management.
50) What is CSSCAN?
CSSCAN (Database Character Set Scanner) is a SCAN tool that allows us to see the impact of a database character set change or assist us to correct an incorrect database nls_characterset setup. This helps us to determine the best approach for converting the database characterset.