Anda di halaman 1dari 3

Zulqarnain Ejaz,

S.no 30293

Question: 1. what is instance? and when database start what would be the
state of that instance in memory.
Instance: A set of Oracle background processes or threads and a shared
memory area, which is memory that is shared across those threads or
processes running on a single computer. This is the place for volatile, no
persistent stuff, some of which gets flushed to disk. A database instance can
exist without any disk storage whatsoever. It might not be the most useful
thing in the world, but thinking about it that way definitely helps draw the
line between the instance and the database.
State of that instance in memory.

Q2. How we increase the size of sga and discuss the parameter.
We can increase the size of SGA by two methods:
1. Through sql:

SGA_TARGET: Sets the total memory size of SGA.


If youre using Automatic Memory Management, then you would set
Page 1 of 3

SGA_TARGET=0 and then set MEMORY_TARGET=nM where n is a value


of the SGA and PGA combined in megabytes.

2. Enterprise Manager
We can set the size of sga in Enterprise Manager > Server > Memory
Advisor

Q.3: What is the effect of brining the database into archive mode.
When you enable Archievelog mode redo logs will be archived instead of
overwritten. The archivelogs are stored in a separate place usually can
backed up regularly.
Explanation:
The Oracle database can run in one of two modes: ARCHIVELOG mode and
NOARCHIVELOG mode. The difference between these two modes is simply
what happens to a redo log file when Oracle goes to reuse it. Will we keep a
copy of that redo or should Oracle just overwrite it, losing it forever? is an
important question to answer. Unless you keep this file, you cant recover
data from a backup to that point in time. Suppose you take a backup once a
week on Saturday. Now, on Friday afternoon, after you have generated
hundreds of redo logs over the week, your hard disk fails. If you have not
been running in ARCHIVELOG mode, the only choices you have right now are
as follows:

Drop the tablespace(s) associated with the failed disk. Any tablespace
that had a file on that disk must be dropped, including the contents of
that tablespace. If the SYSTEM tablespace (Oracles data dictionary) or
Page 2 of 3

some other important system related tablespace like your UNDO


tablespace is affected, you cant do this. You will have to use the next
option instead.
Restore last Saturdays data and lose all of the work you did that week.

Neither option is very appealing. Both imply that you lose data. If you had
been executing in
ARCHIVELOG mode, on the other hand, you simply would have found another
disk and restored the affected files from Saturdays backup onto it. Then, you
would have applied the archived redo logs and, ultimately, the online redo
logs to them (in effect replaying the weeks worth of transactions in
fastforward mode). You lose nothing. The data is restored to the point of the
failure

Q. 4.What are the default number of online redo log file and control files
numbers and what is the advantage of multiplexing of online redo log and
control files.
Redo log file
Every Oracle database has at least two online redo log file groups. Each redo
log group consists of one or more redo log members (redo is managed in
groups of members). The individual redo log file members of these groups
are true mirror images of each other. These online redo log files are fixed in
size and are used in a circular fashion. Oracle will write to log file group 1,
and when it gets to the end of this set of files, it will switch to log file group 2
and rewrite the contents of those files from start to end. When it has filled
log file group 2, it will switch back to log file group 1 (assuming we have only
two redo log file groups; if we have three, it would, of course, proceed to the
third group).
Control Files
By default, at least one copy of the control file is created during database
creation. On some operating systems the default is to create multiple copies.
You should create two or more copies of the control file during database
creation. You might also need to create control files later, if you lose control
files or want to change particular settings in the control files.
Advantage:
More than one copy should exist, and the copies should be stored on
separate disks to avoid losing them in case you have a disk failure. It is not
fatal to lose your control files, it just makes recovery that much harder.
Page 3 of 3

Anda mungkin juga menyukai