Вы находитесь на странице: 1из 3

Oracle DBA Interview Questions and Answers From GeekInterview.

Which process writes data from data files to database buffer cache?
buffer cache ..........datafiles :dbwr
data files ...............buffer cache :server process
Oracle admin Scenario based question
I have applied the following commands:
Shutdown abort
Now what will happen, will the database will give an error / it will work?
Yes, Given no other factors, the database will start up without issue. You killed all sessions, killed all
transactions, and didn't write from the buffers. Note that instance recovery will take place during startup.
Definately database will be start without error but all uncommitted data will be lost because shutdown abort
directly shutdown instance without comitting.
What is the use of control file?
control file is used to startup the database from nomount stage to mount stage. Firstly, when the database is
started it looks for the path of control file in the parameter file and the database is now in the nomount stage.
Now the database looks for the control files to startup the instance and then database.
How do you kill a process in UNIX?
kill -9 (process id)
pkill (process name)
What is difference between spfile and init.Ora file???
init.ora spfile both are contains Database parameters info. Both are supported by oracle. Every database
instance required either any one. If both are present first choice is given to spfile only. (be careful if both are
present any changes made in pfile those are not recognized in next instance because it always first preference
is given to spfile only).
init.ora saved in the format of ASCII
SPFILE saved in the format of binary.
init.ora info is read by oracle engine at the time of database instance starting time only any modification made
in this, those are applicable when in the next startup only. But in spfile modifications (through alter system.....
command) can applicable without restarting oracle database(restarting instance).
spfile we can create with the help of
create spfile from pfile.
as well as we can create pfile (init.ora) from spfile
create pfile from spfile.
In general 24x7 environment, spfile is only preferable, because parameters can change dynamically.
Can you start a database without spfile in Oracle 9i?
Yes it is possible to start the database using init.ora file only. The main advantage of using the SPFILE.ora is
only to make changes to the dynamic initialization parameters without restarting the database using the
SCOPE option. The changes will be stored in the spfile only and if you start the database using "pfile" option
those changes wont be applicable to the database.
What parameter should be consider while defining the size of SGA
Before 11g, following init parameters we need to define in pfile while we r giving sga size
After 11g, onwards memory_target is mandatory.
What is database link
A database link is a pointer in the local database that allows you to access on a remote database.
How will you move a table from one schema to other ?
using alter table command we can move one table from one schema to other
1. SQL>create TABLE t1 unrecoverable AS SELECT * FROM other_schema.t1;
how to estimate size of database?
SQL> select sum(bytes/1024/1024/1024) from dba_data_files; ----->total size
SQL> select sum(bytes/1024/1024/1024) from dba_segments; ------>used sapce
SQL> select sum(bytes/1024/1024/1024) from dba_free_space; ----> free space
Online backup of a Control File
Can you take online backup of a Control File If yes, How?
Alter database backup controlfile to trace as 'Path/control.ctl'
it backs up the control file to the location specified..
Or else
Controlfile online backup can be done by using RMAN
RMAN> backup current controlfile;
Which functions can be improved by using transportable tablespaces?
Moving data using transportable tablespace can be much faster than performing either export/import or
unload/load of the same data.Bcz transporting a tablespace only requires the copying of datafiles &
integrating the tablespace structural information.
What is the difference between view and materialised view?
A view is a simple select statement executed each time user runs query against it.
A materialized view is a replica of a target master from a single point in time. The master can be either a
master table at a master site or a master materialized view at a materialized view site. Whereas in
multimaster replication tables are continuously updated by other master sites, materialized views are
updated from one or more masters through individual batch updates, known as a refreshes, from a single
master site or master materialized view site
What is SCN number in Oracle? Plz any one give me the explanation for SCN
The system change number (SCN) is an ever-increasing value that uniquely identifies
a committed version of the database. Every time a user commits a transaction,
Oracle records a new SCN. You can obtain SCNs in a number of ways, for example,
from the alert log. You can then use the SCN as an identifier for purposes of
recovery. For example, you can perform an incomplete recovery of a database up to
SCN 1030. Oracle uses SCNs in control files, datafile headers, and redo records. Every redo log
file has both a log sequence number and low and high SCN. The low SCN records
the lowest SCN recorded in the log file, while the high SCN records the highest SCN
in the log file.
What is the use of storage option in Materialized view ?
Materialized views are useful for fast REPLICATION purpose..
Using the storage options can bring further performance gains by using the techniques available for
regular tables, including parallel option, partitioning or nologging for the table that holds the materialized
view data.
What is a Schema ?
A schema is a collection of components and database objects under the control of a given database user.
What are Schema Objects
When a database user is created, a corresponding schema with the same name is created for that user.
A schema is a named collection of objects that include Tables, Triggers, constraints, Indexes, Views,
Sequences, clusters, procedures and packages that are associated with a particular user, etc.
What is difference between SQLNET.ORA AND TNSNAMES.ORA AND
SQLNET.ORA :: It is the optional network configuration file.it contain network configuration details.
LISTINER.ORA : It is the listener file for creating at server side
TNSNAMES.ORA:client side configuration file.it was matched with listener file.it for remote access.
Oracle mainly designed for three tire architecture so
Listner.ora ---> it is to set & add Listners at Server side configuration
TNSNAMES.ORA ---> This must be confugred at client side environment. These values must match
the Server side configuration deatils.
For eg. To check the given or Configured TNSNAMES command is
at command prompt
in 10g : tnsping listner_name_def_at_tnsname
in 8i : tnsping80 listener_name_def_at_tnsname
SQLNET.ora tells you what path to take in resolving the name of an instance (among other things). In the
context of this question, the NAMES.DIRECTORY_PATH parameter specifys the order of the naming
methods used for client name resolution lookups. (TNSNAMES, ONAMES...)
What is rollback segment
Rollback segment is a database object, containing before image of data written to the database. It is
used to..
:Undo changes when the transaction is rolled back.
:Recover the database in case of failures.
:Uncommitted changes made to the database,this will protected by it.
Explain Oracle memory structure.
SGA(system global area) & PGA(program global area) are two memory structures in oracle.
The SGA (System Global Area) is an area of memory (RAM) allocated when an Oracle
Instance starts up. The SGA's size and function are controlled by initialization (INIT.ORA or
SPFILE) parameters. SGA is shared by all server and background processes.
SGA Components:
Shared pool: Contains the library cache for storing SQL and PL/SQL parsed code in order to share
it among users. It also contains the data dictionary cache, which holds key data dictionary
Database buffer cache: Holds copies of data blocks read from datafiles.
Redo log buffer: Contains the information necessary to reconstruct changes made to the database
by DML operations. This information is then recorded in the redo logs by the log writer.
Java pool: Represents the heap space for instantiating your java objects.
Large pool: Stores large memory allocations, such as RMAN backup buffers.
The PGA (Program or Process Global Area) is a memory area (RAM) that stores data and
control information for a single process. For example, it typically contains a sort area, hash
area, session cursor cache, etc. PGA is private to each server and background process; there
is one PGA for each process.
The reason being that even though the parse information for SQL or PLSQL may be available in library
cache of shared pool, the value upon which the user want to execute the select or update statement
cannot be shared. These values are stored in PGA. This is also called Private Global Area.