Sie sind auf Seite 1von 9

Oracle Question II

1) What is the default location for init<SID>.ora file or spfile<SID>.ora for a


database?

The default location for the spfile or init file of the database is in

%ORACLE_HOME%/database folder in Windows and

$ORACLE_HOME/dbs directory in case of Unix systems.

2) what is the use of oracle inventory?

Oracle inventory stores the information of all the

Oracle products installed in the system.

The OUI(Oracle Universal Installer) uses this oraInventory to

determine all the product versions which are installed in the system.

3) How to determine the location of Oracle Inventory on Unix systems?

In Solaris system there exists a file called oraInst.loc in the location

/var/opt/oracle/oratab. This file stores the information of the location of oraInventory.

While in case of HP UX oraInst.loc is located in

/etc/oratab directory which gives the location of oraInventory.

4) What is an Oracle Server?

Oracle Server consists of Oracle Instance and Oracle Database.

5) What is an Oracle Instance?

An Oracle Instance consists of Memory structures

(SGA/PGA) and background processes.

The Memory structure include sga nd pga.

SGA consists of shared pool,db buffer cache,log buffer

and optionally large pool and java pool


PGA is used to store bind variable,cursor,sort variables

There 5 mandatory background processes viz PMON,SMON,DBWR,LGWR,CKPT

and other background process also constitute the oracle instance like ARCH,RECO

6) What is the use of shared pool?

Shared pool is used to cache recently used sql statements so as to reduce the overall
response time of the sql query if they are executed consequently by the same of diffrent
user. Shared pool consists of library cache,row cache and uga(in case of shared server
configuration).Shared pool is flushed using LRU algorithm

7) What is use of libarary cache?

It is used to cache execution plan of the recently executed sql queries

so that subsequent execution of the same queries can be faster

8) what is the use of row cache?

It is use to cache the data dictionary information stored into system tablespace.

9)What is the use of the DB Buffer Cache?

The DB Buffer cache is used to cache most recently accessed data.

The tables,indexes which stores the data in the datafiles in oracle database.Caching the
data in the SGA make the execution of the query faster and reduces the response time.

DB buffer cache is also based on LRU algorithm.

10) What is the use of log buffer?

Log buffer is used to store redo information generated while manipulating the data in the

oracle database.Redo information is used for recovery. The redo information is flushed fr
om

log buffer to online redo log files of the Oracle Database in the circular fashion.

11) What is the use of the large Pool?

Large pool is mainly used to offload some burden of caching

from shared pool.


Large pool is a memory structure used during rman backup

with multiple channel location.

It is also used when DBWR I/O slaves are configured.

Finally most importantly it is used to store UGA(user global


area) when database is configured in shared server configuration.

Without large pool being configured all these


information would be stored in shared pool thereby

reducing the library hit ratio of shared pool and

degrading the performance

12) What is the use of java pool?

Java Pool is mainly used to load Java class and

libraries in oracle database

13) What is Dedicated Server Configuration?

In case of dedicated server configuration for each client which

tries to connect to the database

a user process is generated in the client machine and

when this client gets authenticated by the listener at the server,

the listener spawns a server process which fires the queries and fetches

the data from the database on behalf of the user process on the client.

Also this server process is dedicated to that particular client only and

serves only the request of that particular client

Hence such type of confirguration is called as

dedicated server process. The dedicated server configuration

requires more resources viz memory but provides better perfromance


14) What is Shared Server Configuration ?

In Shared Server Configuration when the client tries

to connect to database a user process is spawned at

the client machine.This client is authenticated by the listener on the

database server and handed over to the dispatcher.

There are normally few dispatcher pre spawned


when the instance is started dependinding on the dispatchers

parameter in init<SID>.ora

The Dispatcher places the request from client to the

common request queue placed in the sga.

The idle shared server which are also pre spawned

will pick the request from request queue service

the request and place it in the response queue

which is dedicated to each dispatcher.

The Shared server configuration requires less resources

like memory scarely and is the

favourite configuration for internet application

where large users connect to database

15) Where is the Session Information stored in case of dedicated server configuratio
n?

In case of the Dedicated server Configuration the session

information is stored in PGA.For each session which is established

a dedicated server process is spawned. And for


each dedicated server process a memory structure called as PGA

(Program Global Area) is


allocated. This PGA memory is used to store bind variable information,

cursors and session information for that particular session.

16) Where is the Session Information stored in Shared Server Configuration?

In case of the Shared server Configuration the session information

is stored in Shared pool.

Because in shared server confirguration all the session are not linked

to same shared server during the entire period of the session.

17) Where is Shared Server Configuration used in Oracle Database?

The Shared Server is used in internet application

where large users connect to database.

It is also used in application where not all the users connect or

hit the database simultaneously

Shared server Confirguration is based on the concept that between

two consequent queries fired by a particular session on the database

there is a idle time for server process and this idle time is

used to serve request from other clients.

18) Which process starts the shared server process dynamically?

In shared server confirguration initially shared servers

specified by shared_server parameter in init<SID>.ora is started at instance startup.

But as the load on the shared server process

increases background process PMON starts the shared server process dynamically .

19) What is the maximum of number of shared servers which can be started by
PMON?

The max number shared server processes which can be started by PMON is decided by
max_shared_servers parameter in init.ora

20) What is the location of init<SID>.ora file for windows system and for unix
system?

The default location of init<SID>.ora file is %ORACLE_HOME%/database folder for


Windows while it is $ORACLE_HOME/dbs for UNIX System.

21) What is the use of init<SID>.ora file in Oracle Database?

init<SID>.ora Files contains all the parameters which is used to configure the Oracle Inst
ance.

For e.g

shared_pool_size parameter in init<SID>.ora decides the size of shared pool

large_pool parameter decides the size of large pool.

22) Can the parameter of init file be changed dynamically?

No, the parameters of the init<SID>.ora does not take effect on the fly when the database

is running. To change the parameter we need to modify the parameter in init<SID>.ora

and then stop the database and start the database with the modified pfile.

23) How can we start the database with pfile which is

located in the non default location?

To start the database with pfile located in the non default location

i.e (Not in %oracle_home%/database OR $ORACLE_HOME/


dbs) we can use the following command at SQL prompt

SQL> startup pfile=<location of pfile>

24) Which parameter determines the location control files in oracle database?

CONTROL_FILES parameter decides the location of control files in oracle database.

25) What are Instance specific parameters and how are they defined in init<SID>.or
a?
In RAC (Real Application Cluster) which is a Oracle HA(High Availability) Feature we
can have multiple oracle instance configured on different nodes which can access the
same database located in shared storage area. These instances configured on different
nodes can be configured differently by using these instance specific parameters. These
instance specific parameters are defined in init<SID>.ora as

Letz say the database name is ORCL

Instance1 SID: ORCL1

Instance 2 SID:ORCL2

initORCL1.ora

ORCL1.undo_tablespace=UNDOTBS1

ORCL2.undo_tablespace=UNDOTBS2

26) What is spfile<SID>.ora?

In Oracle 9i, spfile<SID>.ora was introduced as a replacement for init<SID>.ora in whic


h

some of databaseparameters can be changed dynamically

without shutting down the database.

Spfile<SID>.ora is a binary file and cannot be modified manually

27) How can we create spfile from pfile and vice versa?

In the server set oracle_sid environment variable to the SID name

Log in to the database with sys as sysdba user

and fire the following query at the SQL prompt

SQL> create spfile from pfile;

File created

SQL> create pfile from spfile;

File created
By firing the above command the spfile/pfile is created in the default location i.e
%oracle_home%/database in Windows and

$ORACLE_HOME/dbs

28) How can we dynamically change the parameter with spfile<SID>.ora?

To dynamically change the database parameter your database must be started with
spfile<SID>.ora

log into the datbase with sys as sysdba

and fire the following query

SQL> alter system set <parameter name>=<value> scope=both;

If the parameter cannot be modified on the fly use the following command

SQL> alter system set <parameter-name>=<value> scope=spfile;

29) When you give startup to start the database and if both spfile and pfile are prese
nt in

default location which file is used to start the database?

When the oracle starts the instance it looks the following files in the specified order

1)spfile<SID>.ora

2) spfile.ora

3)init<SID>.ora

4) init.ora

If it finds spfile<SID>.ora it will start the database using that but if it is not

present it will look for spfile.ora file. If that file is also not present it looks for init<SID>.
ora

and so on.

30) how can we create pointer to other init/spfile?

We can use
IFILE= ’<location of the pfile>’

SPFILE=’<location of spfile>’

parameters to create pointer to init/spfile which are located at some other location.

Das könnte Ihnen auch gefallen