Você está na página 1de 61

ORACLE

Operational
Documentation
June 29, 2014
Data Base Security
The followin i!"# e$i#t in ORACLE for an% !ata&a#e'
INTERNAL
(#e! to #tartup an! #hut!own the Oracle in#tance' )re 9i !ata&a#e# onl%'
/ as sysdba
(#e! to #tartup an! #hut!own the !ata&a#e'
SYS
(#e! to a!mini#ter !ata !ictionar% ta&le#' *e+er connect a# ,-, unle## in#tructe! to &% Oracle or
the !ocumentation' Connect #%#."pa##wor!" a# #%#!&a or connect #%#."pa##wor!"/"tn#name" a#
#%#!&a
SYSTEM
(#e! to a!mini#ter the #%#tem re#ource#' Create an! a!mini#ter ta&le#pace# an! other #%#tem
o&0ect#'
PERFSTAT
(#e! to a!mini#ter the #tat#pac1 re#ource#' 2ill ha+e !efault ta&le#pace &e 3!&name4tl1'
Granting SELECT permission to DataDictionary dynamic vies!
To allow all u#er# to run ,ELECT 5uerie# aain#t the DataDictionar% !%namic +iew# 6789
o&0ect#: an! their pu&lic #%non%m# 679 o&0ect#:, we will rant ,ELECT permi##ion to the#e
o&0ect# within the CO**ECT role' Run the followin #cript to pro!uce the ;RA*T #tatement#
for thi# purpo#e<
A=L,>00?@DATA@AAT,@TEABA*CO@DRBTEAB@ORACLE@rant8+9'#5l
NAGIOS / MONITOR
The naio# i! i# u#e! on certain #%#tem# to monitor the #%#tem a+aila&ilit% an! chec1 for
ta&le#pace u#ae'
Permission to Data"ase o"#ects!
)ermi##ion# #houl! &e rante! to role#, in#tea! of in!i+i!ual u#er i!# with the e$ception that u#er
i!# that create proce!ure# mu#t &e rante! the permi##ion# e$plicitl% to their i!'
Sc$ema oner
All Dpro!uction" !&a maintaine! o&0ect# #houl! &e create! &% #inin onto the in#tance with thi#
i!' Thi# i! i# create! with DCO**ECT" an! e$ternal #ecurit% +erification' The #ecurit%
authoriEation i# +erifie! &% the (*AF #inon' Thi# i! al#o ha# DRE,O(RCE", DDGA" an!
D(*LABTED TAGLE,)ACEH
App%ication team "atc$ id
Owner of the application #tore! proce!ure#, pro!uctional ta&le# recreate! in &atch' Bu#t ha+e
o&0ect acce## rante! !irectl% to u#er i! to &e a&le to create #tore! proce!ure#' Al#o ha#
DCO**ECT", DCREATE )ROCED(RE", DCREATE ,-*O*-B", DA*AL-IE A*-" an! 5uota
D(*LABATED" on u#er ta&le#pace#, an! temp ta&le#pace#'
2
&ser Id's
(#e! for en! u#er an! &i# a!mini#tration acce##' All o&0ect permi##ion# are rante! throuh the
role# 6inclu!in DCO**ECT" acce##:' A! al#o ha# 5uota D(*LABATED" on u#er ta&le#pace#, an!
temp ta&le#pace#'
ORACLE Performance Issues
R(%e )ased vers(s Cost )ased *ptimi+ation
Rule &a#e! oe# awa% in 10'
Oracle ?'J'4 an! newer relea#e# u#e 2 proce##e# to !etermine the path a ,KL #tatement will follow
to re#ol+e the 5uer%, in#ert, up!ate etc' The option# are Rule &a#e! or Co#t &a#e!' The followin
!e#cri&e# when Oracle ?'J'4 will choo#e rule or co#t &a#e! optimiEation'
Af the init3#i!4'ora #pecifie# a +alue for the O)TABAIER8BODE then that optimiEation will &e
u#e!' 2hen we in#talle! %our Oracle #er+er we left thi# +alue !efault to DC=OO,E" ' The +alue#
that can &e #pecifie! are R(LE.C=OO,E.CAR,T8RO2,.ALL8RO2,'
Af the parameter i# #et to R(LE &a#e! the rule &a#e! optimiEation i# u#e! unle## %ou #pecif%
Dhint#" in the 5uer%' =int# are not #omethin %ou will &e a&le to u#e &ecau#e the Re#umi$ co!e or
,KL are not acce##i&le to %ou to chane'
Af the parameter i# #et top DC=OO,E" Oracle will u#e R(LE &a#e! unle## there are #tati#tic# for at
lea#t one of the ta&le# in+ol+e! in the 5uer%' Af #tati#tic# are a+aila&le then CO,T optimiEation will
&e u#e!'
-ou will mo#t li1el% not &e u#in CAR,T8RO2 or ALL8RO2, #pecificall%' CO,T &a#e! will &%
!efault u#e ALL8RO2, to minimiEe total e$ecution time'
To in+e#tiate which optimiEation path will impro+e total o+erall Re#umi$ application time %ou
can create or !elete #tati#tic# for certain Re#umi$ ta&le# or o&0ect#' Af %ou are runnin #lowl% for a
#pecific 5uer% on a reular &a#i# %ou can create #tati#tic# for that o&0ect or o&0ect#' Af the 5uer%
run# noticea&l% fa#ter then 1eep #tati#tic# on that o&0ect' Af the 5uer% run# noticea&l% #lower then
!elete #tati#tic# on the o&0ect or roup of o&0ect#'
The followin are the comman!# that can &e run to create #tati#tic#<
Anal%Ee 6ta&le, in!e$ or clu#ter: #chema'6in!e$, ta&le or clu#ter name: 6compute e#timate:
#tati#tic#L
Anal%Ee 6ta&le, in!e$, or clu#ter: #chema'6in!e$, ta&le or clu#ter name: !elete #tati#tic#L
Af %ou choo#e ta&le the #tati#tic# for that ta&le"# in!e$e# will al#o &e athere!' Our
recommendation is to choose object table and specify the table name in the analye
statement!
Af %ou choo#e compute all the row# in the ta&le or o&0ect will &e u#e! to pro!uce #tati#tic#'
E#timatin u#e# a #u&#et of the row# to e#timate the total #tati#tic#' Our recommendation is to
use compute unless a table ta"es entirely to lon# to compute then choose estimate' E+en
thouh e#timatin i# much 5uic1er if the re#ult# !o not impro+e performance %ou mo#t li1el%
woul! tr% compute to #ee if it impro+e# the performance'
The Oracle ,KL ,er+er Reference manual will #how the total #%nta$ of the comman!#'
Analyze Statistics
The followin #cript# are inten!e! for Oracle on an% platform#' Banual DSupplied PL/SQL
Packages and Types Reference gives parameters for DBMSST!TS" DBMS#$%B
J
Lcc!&0MN A<@oracle@l#tn@in#t8!&@O
Data&a#e8monitorin8#tat#'#5l P turn# monitorin on for each ta&le
&ein
!&m#8#tat#'alter8!ata&a#e8ta&8monitorin
6BO*ATORA*;Q4TR(E:L
en!L
.
;ather8!&m#8#tat#'#5l P ather #tale #tati#tic# an! report on ta&le# which ha! #tale #tat#
#et #er+erout on #iEe 1000000
#pool i<@oracle@l#tn@in#t8!&@ather8!&m#8#tat#'out
!eclare
a !&m#8#tat#'o&0ectta&L
&ein
!&m#8#tat#'ather8#chema8#tat#
6O2**ABEQ4"#chema8name" >
O)TAO*,Q4R;AT=ER A(TOR,OGJLA,TQ4a:L
for i in 1 '' a'count
loop
!&m#8output'put8line6 a6i:'ownname :L
!&m#8output'put8line6 a6i:'o&0T%pe :L
!&m#8output'put8line6 a6i:'o&0*ame :L
>> !&m#8output'put8line6 a6i:')art*ame :L
>> !&m#8output'put8line6 a6i:'#u&)art*ame :L
>> !&m#8output'put8line6 a6i:'Confi!ence :L
!&m#8output'put8line
6 R>>>>>>>>>>>>>>>>>>>>>>>>>R :L
en! loopL
en!L
.
#pool off

,che!ule8#tat#'#5l P #che!ule# 0o& to collect #tale #tati#tic# on !ata&a#e
+aria&le 0o&no num&erL
&ein
!&m#80o&'#u&mit 6<0o&no,
R!&m#8#tat#'ather8#chema8#tat#
6O2**ABEQ4"#chema8name" >
O)TAO*,Q4R;AT=ER A(TOR:LR,
,-,DATE, Rtrunc6,-,DATE: S1 S?.24R:L >> #tart# 0o& at ?<00

en!L
.
E$ecute !ata&a#e8monitorin8#tat#'#5l un!er #5lplu# D. a# #%#!&a" to #et !ata&a#e monitorin of
ta&le# to true' E$ecute #che!ule8#tat#'#5l to #che!ule a 0o& that perform# a Dather #tale" on all
ta&le# in the !ata&a#e' E$ecute ather8!&m#8#tat#'#5l to Dather #tale" out#i!e of normal #che!ule'
Thi# will al#o enerate a report #howin ta&le# ha+in #tale #tati#tic#'
The followin metho! #houl! &e u#e! when nee!in #tati#tic# on all o&0ect# !one within a #chema
on a !ail% or wee1l% &a#i#'
+aria&le 0o&no num&erL
&ein
4
!&m#80o&'#u&mit 6<0o&no,
R!&m#8#tat#'ather8#chema8#tat#
6O2*ERQ4"#chema8name" P
ESTIMATE_PERCENT=>dbms_stats.auto_sample_size, -
O)TAO*,Q4R;AT=ERR:LR,
,-,DATE, Rtrunc6,-,DATE: S1 S?.24R:L >> #tart# 0o& at ?<00
en!L
.
ORACLE Bac"up Procedures
)ac,(p Retention and Fre-(ency
Col! Gac1up fre5uenc% > Col! &ac1up# will &e ta1en on a wee1l% &a#i# at a minimum' The Oracle
#er+er will &e #hut!own an! the normal operatin #%#tem &ac1up run' ,ee the #ection on
#che!ulin for more !etail#'
Col! Gac1up Retention > Col! &ac1up file# will &e 1ept for a minimum of 2 wee1# or loner'
2arm &ac1up# will &e ta1en on a nihtl% &a#i#, unle## a col! &ac1up i# &ein ta1en nihtl%' A
minimum of 2 wee1# worth of &ac1up# will &e 1ept'
On *etware the pro!uct Open Cile Banaer can &e u#e! to #imulate col! &ac1up# while Oracle i#
up an! runnin' Thi# #houl! not &e u#e! in place of the minimum wee1l% col! &ac1up which
re5uire# a #hut!own of Oracle, &ut #houl! &e u#e! for nihtl% hot &ac1up#' Thi# pro!uct i#
a+aila&le for *etware an! *T' Other tool# ma% &e a+aila&le for (*AF'
$ote% &he control file should be bac"ed up 'ASCII and binary formats( prior to runnin# the
cold)hot bac"ups
Contro% Fi%e )ac,(p
The #cript to &ac1up the Oracle Control Cile can &e foun!<
*ET2ARE< 3+ol4<@3#i!4@&atch
file name#<
ctrl&1up'ncf
ctrl&1up'#5l
ctrl&1up'!oc
The followin chane nee!# to &e ma!e to the ctrl&1up'ncf file< Chane 3#i!4 to %our in#tance
name'
The followin chane# nee! to &e ma!e to %our ctrl&1up'#5l file' Chane 3#i!4 to %our in#tance
name an! #et the pa##wor! for T#%#temH'
loa! #+rmr comman!Q/3+ol4<@3#i!4@&atch@ctrl&1up'ncf 6 *etware :
*T< 3!ri+e letter4<@3#i!4@&atch
file name#<
ctrl&1up'&at
ctrl&1up'#5l
ctrl&1up'!oc
The followin chane nee!# to &e ma!e to the ctrl&1up'&at file' Chane 3#i!4 to %our in#tance
name'
The followin chane# nee! to &e ma!e to %our ctrl&1up'#5l file' Chane 3#i!4 to %our in#tance
name an! #et the pa##wor! for T#%#temH'
#+rmr2J comman!Q/3!ri+e letter4<@3#i!4@&atch@ctrl&1up'&at 6 *T :
M
(*AF<
E.port Retention and Fre-(ency
E$port Cre5uenc% > A full e$port #hall &e !one on a nihtl% &a#i#' Thi# e$port will o+erla% the
pre+iou# niht# e$port on !i#1' Thi# e$port file #hall &e &ac1e! up on a nihtl% &a#i# &% the Oracle
&ac1up'
E$port Retention > The tape# containin the full e$port #hall &e 1ept a minimum of 2 wee1#'
ORACLE R*A$ Bac"up Procedures for +indo,s and -$I.
Installation & Setup RMAN & Veritas
Veritas Setup
After 7erita#.Oracle aent i# in#talle! on 2in!ow#U
Ba1e #ure the T>oracleH i! i# #etup on each win!ow# #er+er' Thi# i! nee!# to &e an
a!mini#trator an! ha+e DGA authorit%' Thi# i! i# u#e! for the 7ERATA, #er+ice'
Re#tart all the Oracle #er+ice#'
Run the 3!e+ice letter4<@)roram Cile#@7ERATA,@*etGac1up@lo#@m1lo!ir'&at to
create the lo !irectorie# that *et&ac1up will u#e to lo runtime information'
After 7erita#.Oracle aent i# in#talle! on (*AFU
Ba1e the nece##ar% lin1<
#u P oracle
,hut!own all Oracle in#tance#'
Run the Toracle8lin1H #cript foun! in .u#r.open+.net&ac1up.&in
Output of #cript will &e foun! in .tmp.ma1e8trace'pi!
,tartup of all Oracle in#tance#'
Setting up NetBacup !olicy
Cor Oracle ,e+er )olic% #etup
Create polic%
)olic% *ame ORA8322V or =)4 8DG83,ER7ER
*ABE483A*,TA*CE483DG8*ame483OCC.O*48WW > 01 P99
)olic% T%pe ORACLE
)olic% ,torae (nit P choo#e appropriate unit
)olic% +olume pool P choo#e appropriate one
Limit 0o&#.polic% P 4
,che!ule
C82VL-801 or C8DL-801 or X' TAutomatic Cull Gac1upH
C8A;E*T801 X' TApplication Gac1upH
,etup to allow run 24F?
Client
(#e appropriate client name e$ lcc!&0M9 or lcc!&0M9p1 6,ee 7erita# a!mini#trator:
,cript#
3!e+ice letter4<@)roram Cile#@7ERATA,@awi@#cript# for 2in!ow#
.appl.!e+l or pro!.!a!a.#cript# P for (ni$
Y
3in#tance name483!& name48col!8!ata&a#e8&ac1up'cm!
3in#tance name483!& name48online8!ata&a#e8&ac1up'cm!
,ee RBA* #etup for creatin #cript in client'
RMAN Setup
The Reco+er% Catalo !ata&a#e will rei#ter it"# &ac1up #et# in the control file' Different &ac1up#
proce##e# are nee!e! for the Reco+er% Catalo !ata&a#e then for the Application Data&a#e'
Application Database
Create an Drman" i! in the application !ata&a#e'
create u#er rman i!entifie! &% T#tan!ar! pa##wor!H
temporar% ta&le#pace !&la&tp1 5uota unlimite! on !&la&tp1
!efault ta&le#pace !&la&ur1 5uota unlimite! on !&la&ur1L
rant connect, re#ource to rmanL
Connect u#in rman i!<
Rman'e$e taret rman.Hpa##wor!H catalo rman.Hpa##wor!H/tn#name
rman4 rei#ter !ata&a#e
rman4 confiure retention polic% to reco+er% win!ow of J0 !a%#L Af oin to tape'
rman4 confiure retention polic% to reco+er% win!ow of ? !a%#L Af oin to !i#1'
rman4 #et #nap#hot controlfile name to D3!ri+e
letter4<@oracle@a!min@3in#tance4@&!ump@ctl8J00'#np"
Reco/ery Catalo# Database
Chane initialiEation parameter control8file8recor!81eep8time Q 42 6allow# controlfile
to hol! 42 !a%# of &ac1up information for the reco+er% catalo !ata&a#e:
create ta&le#pace rc+cat!01 !atafile .u0Z.pro!.rc+cat.!ata.rc+cat!01a'!&fR #iEe ZZZm reu#e
e$tent manaement local autoallocateL
Create an Drman" i! in the application !ata&a#e'
create u#er rman i!entifie! &% T#tan!ar! pa##wor!H
temporar% ta&le#pace rc+cattp1 5uota unlimite! on rc+cattp1
!efault ta&le#pace rc+cat!01 5uota unlimite! on rc+cat!01L
rant reco+er%8catalo8owner to rmanL
rant connect, re#ource to rmanL
Create Recovery Cata%og
Connect u#in rman i!<
?
rman'e$e
rman4 connect catalo rman.H#tan!ar! pa##wor!H
rman4 create catalo
rman4 #et #nap#hot controlfile name #et to
D.u00.a!min.lcp12.&!ump.ctl8J00'#np" 6RBA* ma1e# thi# #nap#hot when
ta1in &ac1up# #o it ha# a point n time +er#ion of the control file that !oe# not
1eep chanin' Onl% u#e! !urin the &ac1up' Refre#he! for each &ac1up':
Creating Script in C%ient
*ote< 2hen &ac1in up up a #tan!ar! e!ition !ata&a#e u#in rman onl% one
Tallocate channelH can &e u#e!' Thi# i# a limit of the #oftware' Cor enterpri#e
e!ition %ou can u#e multiple Tallocate channel#H'
2in!ow#<
Ol! ,tan!ar!< 3!e+ice letter4<@)roram
Cile#@7ERATA,@*etGAc1up@D&E$t@Oracle@,ample#@rman
*ew ,tan!ar!< D<@)roram
Cile#@7ERATA,@awi@#cript#@3in#tance483!&name483col! or
online48!ata&a#e8&ac1up'1#h
Cop% an! mo!if% #ample or cop% from another RBA* Oracle ho#t an! rename an! mo!if%' Cor
uni$ ma1e #ure the col! &ac1up #cript inclu!e# the e$ecution of the #cript to manae the
alert83#i!4'lo' Thi# #cript can &e foun! in lcc!&0?N
.appl.pro!.!a!a.#cript#.!a!a8ora8manae8alertlo'1#h an! nee!# to &e #etup on all new (ni$
#er+er# that u#e the RBA* &ac1up# for Oracle'
(ni$<
.appl.3en+4.!a!a.#cript#.3in#tance483!&name483col! or online48!ata&a#e8&ac1up'1#h
Recovery Cata%og )ac,(p
Differ# from the #tan!ar! #cript in that it ha# an a!!itional #tep that copie# the control file
to .u00.a!min.3#i!4.&!ump.3#i!48cntrl8file8[!8[A8[(' Thi# name contain# the !&i!
6[A: that nee!# to &e u#e! for reco+er%' Thi# file et# &ac1e! up a# the #econ! 0o& in the
Bae#tro #che!ule' At i# re5uire! in the e+ent the control file# et lo#t, a# all the RBA*
information to reco+er the Reco+er% Catalo i# 1ept in the control file' ,ee RBA*
reco+er% on proce## to reco+er the Reco+er% Catalo'
Run \
Allocate channel ch00 t%pe !i#1L
Gac1up
Cormat D.u00.a!min.lcp12.&!ump.lcp128cntrl8file8[!8[A8[("
Current controlfileL
Relea#e channel ch00
]
Veritas Bacup
Ba1e a te#t run of the #cript with output oin to tape'
N
Setup in Maestro
RMAN Bacup Scripts " #is Bacups $or %indo&s 'NO(ATA)OG*
Af the #er+er# are to &e at the plant# !o the followin u#in nocatalo'
Cop% from lcc!&09M or lccf#020@!ownloa!@oracle
J<@appl@pro!@!a!a@#cript#@3#i!48full8&ac1up'#5l 6Bu#t e!it file with in#tance name internall%, al#o
chane name:
J<@appl@pro!@!a!a@#cript#@rman8full8&ac1up'&at
Add Scheduled &as" for Bac"up to run
Control )anel.#che!ule! Ta#1.A!! #che!ule! Ta#1
,che!ule! Ta#1 2iEar!
3ne$t4
3&row#e4
.appl.pro!.!a!a.#cript#.rman8full8&ac1up'&at
3open4
3!ail%4
3ne$t4
34<00 am4
3wee1!a%#4
,tart !ate 3to!a% !ate4
3ne$t4
(#er *ame< enLCCBE,ta#1# 6a!mini#trator roup: ,etup u#er name'
)a##wor!< 3#ee pa##wor! #afe4
3ne$t4
Clic1 a!+ance propertie#
3fini#h4
Bac"up Procedures%
Af the #er+er# are to &e at the plant# !o the followin u#in nocatalo otherwi#e u#e the reco+er%
catalo proce## on ORCLO)ER'!oc
The followin &ac1up# are !i#1 &ac1up#'
Gac1up Director%< h<@oracle@3#i!4@online
0ull bac"up script
The &ac1up comman! call# a #cript to run the full &ac1up'
Run< rman8full8&ac1up'&at 3#i!4
2hich contain#
9
Rman nocatalo lo 0<@appl@pro!@!a!a@0o&#@lo#@rman8full8&ac1up8[1'lo
/0<@appl@pro!@!a!a@#cript#@[18full8&ac1up'#5l
The content of the 3#i!48full8&ac1up'#5l
Connect taret #%#.3pa##wor!4/3#i!48fme#L
Run \
Confiure !efault !e+ice t%pe to !i#1L
Confiure channel !e+ice t%pe !i#1
CormatQ"h<@oracle@online@3#i!4@3#i!8full8&1up8[t8[#8[p"L
Confiure controlfile auto&ac1up onL
Confiure controlfile auto&ac1up format for !e+ice t%pe !i#1 to
D=<@oracle@online@mtp1@mtp18cf8&1up8[C"L
Confiure retention polic% to reco+er% win!ow of ? !a%#L
Gac1up !ata&a#e plu# archi+elo !elete inputL
Cro##chec1 &ac1upL
Delete o&#oleteL
]
&ested Reco/eries%
Cull reco+er% Te#t
,et ORACLE8,ADQ3#i!4
Rman taret #%#.3pa##wor!4 nocatalo
,et !&i! WWWWWWWWW 3et +alue from 0<@appl@pro!@!a!a@0o&#@lo#@lo from late#t &ac1up'
R(* \
,tartup force nomount
Re#tore controlfile from Dh<@oracle@online@3#i!4@3#i!48cf8&1up8c>3!&i!4>%%%%mm!!>ZZ"L
]
Run \
,tartup force mount
Re#tore !ata&a#eL
Reco+er !ata&a#eL
]
Alter !ata&a#e open re#etlo#
-sin# S1lplus
Alter !ata&a#e tempfile De<@oracle@!ata@3#i!4@fme#tp101'!&f" !rop inclu!in !atafile#L
Alter ta&le#pace fme#tp1 a!! tempfile
De<@ oracle@!ata@3#i!4@fme#tp101'!&f" #iEe M00B reu#eL
Ta1e a full &ac1up'
ARCSER2 0ull Dis" Bac"ups%
Arc#er+e mu#t full% &ac1up the C, D, = an! J !ri+e#' Af thi# nee!# to &e further refine! then #ee
Data A!mini#tration'
10
Data Base *aintenance Procedures
Maintaining Arc$ive Log Fi%es
The Oracle archi+e lo# are re5uire! in or!er to perform forwar! reco+er%' The% mu#t &e 1ept a#
far &ac1 a# the ol!e#t col! or warm &ac1up that %ou woul! want to u#e to reco+er' The
recommen!ation i# at lea#t 2 wee1#' The +olume where the archi+e lo# are place! #houl! &e
manae! #o that it !oe# not &ecome full' Af thi# +olume &ecome# full an! Oracle nee!# to archi+e a
lo, Oracle will not &e a&le to perform thi# function' After all the current lo# are full an! the% can
not &e archi+e!, Oracle will come to a #top until more #pace &ecome# a+aila&le for archi+e# to
ta1e place'
*ET2ARE<
There i# a thir! part% +en!or that ha# a pro!uct that can automate the maintainin of Oracle
archi+e lo# file#' The compan% i# VnoEall' The #pecific pro!uct i# Cile 2iEar!' Cile 2iEar! i#
#pace manaement pro!uct that will &a#e! upon an% num&er of criteria !elete, compre##, mirate
or archi+e file# on a *etware operatin #%#tem' Thi# pro!uct can &e #et to !elete file# that are o+er
21 !a%# ol! &a#e! on file name ma#1in' Thi# pro!uct can alle+iate the LA* A!mini#trator from
manuall% !eletin thi# archi+e file#' 6 Currentl% !oe# not #upport *T, &ut will &e a+aila&le #oon' :
Oracle Recommended *aintenance Schedules ) Chec"lists
)lea#e refer to the Application Operation# Banual for #pecific application proce!ure#'
AT sc$ed(%er / NT 0
Currentl% the TatH comman! i# &ein u#e! to #che!ule all nihtl%, wee1l% or monthl% 0o&#'
The followin comman! i# u#e! to #che!ule 0o&# from the con#ole<
e$'
Thi# will #u&mit a 0o& at M<00 )B e+er wee1!a%<
at 1?<00 .e+er%<mon!a%,tue#!a%,we!ne#!a%,thur#!a%,fri!a% !<@pro!@hrre@&atch@filename
To li#t out the TatH comman! #%nta$ an! other option#<
at helpQ%
To +iew the #che!ule 0o&#<
at
To !elete a 0o& from the #che!ule<
at 30o&i!4 .!elete
1no+a%% A&T*2PR* / Netare 0
Dai%y sc$ed(%e!
Cull E$port
Gac1up control file 6CTRLGV()',KL:
Col! Gac1up 6 at minimum =ot Gac1up :
Dai%y c$ec,%ist!
A !ail% chec1li#t #houl! 5uic1l% !etermine the current #tate an! #ta&ilit% of the #%#tem'
1' Ba1e #ure the !ata&a#e i# a+aila&le'
2' Ba1e #ure the !ata&a#e &ac1up wa# #ucce##ful'
11
J' Ba1e #ure !ata&a#e archi+in i# functionin properl%' Do a lo #witch 6#ee comman!#: an! +erif% that
the archi+e file wa# create!'
4' Re+iew the alrt3#i!4'lo file of the Oracle !ata&a#e in#tance to !etermine if there are an% error#
in!icatin pro&lem# with the !ata&a#e' At"# a oo! i!ea to re+iew the output of the#e critical lo file#
more than once a !a%'
3ee,%y sc$ed(%e
Cull E$port
2ee1l% Bonitor Report 6,ee Data Ga#e Bonitorin:
Gac1up control file 6ctrl&1up'#5l:
,hut!own Oracle
Col! Gac1up
,tartup Oracle
Reor ta&le#pace
)ure Archi+e Lo#
3ee,%y C$ec,%ist!
The wee1l% chec1li#t #houl! focu# primaril% on !ata&a#e maintenance'
1' A!0u#t #torae parameter# on !ata&a#e o&0ect#' 6Ga#e! on the e$tent# an! frament# report:
2' Loo1 for #ement# in the !ata&a#e that are runnin out of re#ource# 6e'', e$tent#: or rowin at an
e$ce##i+e rate' -ou ma% nee! to a!0u#t the #torae parameter# of the#e #ement#' 6Run frament# an!
e$tent#:
J' Re+iew !i#1 +olume #torae inclu!in archi+e lo location 6can &e !one manuall%, or u#in VnoEall
Cile 2iEar! or #imilar Jr! part% tool:'
Mont$%y C$ec,%ist!
The monthl% chec1li#t #houl! focu# on maintenance an! tunin' Cor now, thi# will &e !one &% the
Corporate Data Re#ource Banaement Team'
1' Re+iew common Oracle tunin point# #uch a# cache hit ratio, latch contention, an! other point# !ealin
with memor% manaementL compare with pa#t report# to i!entif% harmful tren!# or !etermine impact
of recent tunin a!0u#tment#'
2' Re+iew !ata&a#e file acti+it%L compare to pa#t output to i!entif% tren!# that coul! lea! to po##i&le
contention'
J' Re+iew an! +ali!ate the ta&le# with ca#ca!e con#traint option
4' Re+iew an! +ali!ate the in!e$ #tructure an! #torae
Disaster Reco/ery Plans
The ea#ie#t wa% to !etermine Dwhere" the pro&lem e$i#t# i# to tr% to #tartup the in#tance' Oracle will
u#uall% i+e %ou me##ae# that will in!icate what file it can"t u#e' 6Ju#t a warnin''' it onl% i+e# %ou the
fir#t pro&lem file it hit#, &ut thi# i# a oo! place to #tart loo1in':
RMAN #atabase Reco+ery
To reco+er the !ata&a#e u#in RBA* the followin comman!# can &e u#e!' )roce!ure# for &oth
the Application Data&a#e# an! Reco+er% Catalo Data&a#e# are li#te!'
Application Database
Re#tore the followin file# if nee!e! u#in a normal 7erita# re#tore'
12
3!ri+e letter4<@oracle@#e9'2'0
3!ri+e letter4<@oracle on all e$pecte! !ri+e#
Ba1e #ure the followin !irectorie# e$i#t' Af not create them'
3!ri+e letter4<@te#t@3!&name4@!ata or lo# or archlo#
#5lplu# 'e$e
connect . a# #%#!&a
#tartup nomount 6if controlfile !oe# not e$i#t: or
#tartup mount 6if controlfile e$i#t#:
rman'e$e taret rman.H#tan!ar! pa##wor!H catalo rman.H#t! pa##w!H/tn#name
#et !&i!QWWWWWWWWWWWW thi# num&er can &e retrie+e! from the reco+er% catalo
!ata&a#e i##uin T#elect !&i! from rc8!ata&a#e where name Q D3!&name4"L
rman4 run \
rman4 allocate channel ch00 t%pe ,GT8TA)EL
rman4 re#tore controlfileL onl% if nee!e!
rman4 re#tore archi+elo allL onl% if nee!e!
rman4 re#tore !ata&a#eL onl% if all file# nee!e! el#e
^rman4 #5l Dalter ta&le#pace 3ta&le#pace8name4 offline imme!iate"L
rman4 re#tore ta&le#pace 3ta&le#pace8name4
rman4 reco+er ta&le#pace 3ta&le#pace8name4
rman4 #5l Dalter ta&le#pace 3ta&le#pace8name4 online"L_
rman4 ]
#5l4 alter !ata&a#e mountL P onl% if re#tore of controlfile wa# !one
*ote< Af not appl%in lo# 6offline &ac1up: then #1ip the reco+er !ata&a#e an! o to alter
!ata&a#e #tatement &elow'
#5l4 reco+er !ata&a#e Tu#in &ac1up controlfileH until cancelL (#e Tu#in &ac1up
controlfileH if controlfile re#tore! from a &ac1up'
#5l4 Thit enter until a lo that !oe# not e$i#t i# re5ue#te!H
#5l4 CA*CEL
rman4 alter !ata&a#e open Tre#etlo#HL Re#etlo# onl% if %ou reco+ere! u#in &ac1up
controlfile'
#5l4 /Hi##ue #5l to !rop an! create temporar% ta&le#paceH P Thi# i# u#e! onl% if
temporar% ta&le#pace wa# not create! a# part of the create !ata&a#e #cript'
,5l4 Talter !ata&a#e tempfile D.uZZ.3en+4.3!&name4.!ata.3!&name4tp1a'!&f"" !rop
inclu!in !atafile#L > Thi# i# u#e! of the temporar% ta&le#pace wa# create! a# part of the
!ata&a#e create #cript'
,5l4 Talter ta&le#pace 3!&name4tp1 a!! tempfile
D.uZZ.3en+4.3!&name4.!ata.3!&name4tp1a'!&f" #iEe ZZZB reu#eL > Thi# i# u#e! of the
temporar% ta&le#pace wa# create! a# part of the !ata&a#e create #cript'
Ta1e a full &ac1up
Cor mo#t reco+er% #cenario# #ee appropriate CA,E W'
Reco/ery Catalo# Database
Re#tore the followin file# if nee!e! u#in a normal 7erita# re#tore'
.u00.pro!uct.#e9'2'0 or ee10'2'0
1J
.u00.a!min.3#i!4.&!ump.3#i!48cntrl8file8[!8[A8[( where !> !ata&a#e name A P
DGAD an! ( P #%#tem enerate! uni5ue name'
.u00.pro!.rc+cat.in#t8!&.O ,ee what !irectorie# nee! to &e #etup'
Ba1e #ure the followin !irectorie# e$i#t' Af not create them'
.uZZ.pro!.rc+cat.!ata, lo#, archlo#
.u00.a!min.lcp12.&!ump, c!ump, u!ump, pfile etc

#5lplu# 'e$e
connect . a# #%#!&a
#tartup nomount 6if controlfile !oe# not e$i#t: or
#tartup mount 6if controlfile e$i#t#:
rman'e$e taret rman.H#tan!ar! pa##wor!H
#et !&i!QWWWWWWWWWWWW thi# num&er can &e retrie+e! from the !&i! in the file name for
the control file &ac1up'
rman4 run \ 6onl% i! controlfile nee!# re#torin:
rman4 re#tore controlfile from
D.u00.a!min.lcp12.&!ump.lcp128cntrl8file8RC7CAT82NN090Y02J83enerate! name4"<
rman4 ]
rman4 run \
rman4 allocate channel ch00 t%pe ,GT8TA)EL
rman4 re#tore archi+elo allL onl% if nee!e!
rman4 re#tore !ata&a#eL onl% if all file# nee!e! el#e
^rman4 #5l Dalter ta&le#pace 3ta&le#pace8name4 offline imme!iate"L
rman4 re#tore ta&le#pace 3ta&le#pace8name4
rman4 reco+er ta&le#pace 3ta&le#pace8name4
rman4 #5l Dalter ta&le#pace 3ta&le#pace8name4 online"L_
rman4 ]
#5l4 alter !ata&a#e mountL P onl% if re#tore of controlfile wa# !one
#5l4 reco+er !ata&a#e Tu#in &ac1up controlfileH until cancelL (#e Tu#in &ac1up
controlfileH if controlfile re#tore! from a &ac1up'
#5l4 Thit enter until a lo that !oe# not e$i#t i# re5ue#te!H
#5l4 CA*CEL
rman4 alter !ata&a#e open Tre#etlo#HL Re#etlo# onl% if %ou reco+ere! u#in &ac1up
controlfile'
#5l4 /Hi##ue #5l to !rop an! create temporar% ta&le#paceH 6onl% if nee!e!:
Ta1e a full &ac1up
Af re#torin with incremental# %ou ma% nee! to i##ue reco+er !ata&a#e nore!o'
rman4 run \
rman4 allocate channel ch00 t%pe ,GT8TA)EL
rman4 allocate channel ch01 t%pe ,GT8TA)EL
rman4 allocate channel ch02 t%pe ,GT8TA)EL
rman4 allocate channel ch0J t%pe ,GT8TA)EL
rman4 re#tore controlfileL
rman4 re#tore !ata&a#eL onl% if all file# nee!e! el#e
rman4 alter !ata&a#e mountL
rman4 reco+er !ata&a#e nore!o 6incremental# et applie! an! an% archi+e# if nee!e! or
a+aila&le:
rman4 ]
Cor mo#t reco+er% #cenario# #ee appropriate CA,E W'
14
Duplicate Database Creation
Oracle #oftware matchin the taret #ource nee!# to &e in#talle! on the #er+er where the
!uplicate will &e create!'
Prep:
&nitiate t'e 'elp of t'e net(ackup team)
*) T'ey may need to determine +'ic' tape,s- are needed depending on
'o+ far (ack in time +e need to (uild t'e duplicate)
.) T'ey +ill need to make sure t'e tapes stay onsite versus going (ack
offsite (efore t'e recovery is complete)
/) T'ey can c'ange status of tape so it is does not get +ritten too (y
anot'er $o()
0) T'ey need to set t'e environment to allo+ a restore to 'appen on a
client +'ic' +as not t'e source client) T'is step is not needed if t'e
duplicate is (uilt on t'e same server as t'e original data(ase)
a. On the master (LCCNS063) we have to create an empty file
No.!estrictions which will allow restore to happen any of the
clients from where the restore was re"#este$ in
%#sr%openv%net&ac'#p%$&%altnames%(No.!estrictions)
1) !dditonal information2
a) 'ttp2//support)veritas)com/docs/*3456*777 8 , for 9ni:
;lients/Masters-
4) 'ttp2//support)veritas)com/docs.56630 7778 ,for <indo+s ;lients / Masters
Steps to clone a $ata&ase on remote host #sin* !+,N
;reating a duplicate data(ase dct$dup on t'e server lccd(=55
-ata&ase name (clone of -cp.):$ct./$#p
Servername: lcc$&000
Server name: lcc$&001
-ata&ase name: $cp.
S23P4:
on lcc$&000
;reate a pass+ord file for t'e duplicate data(ase say d(name>dct$dup
on lccd(=55
8orap+d file>/u==/product/ee3).)=/d(s/orap+dct$dup pass+ord>?????
entries>*=
S23P5:
on lcc$&000
& added t'e follo+ing t'e entries in t'e tnsnames)ora and listener)ora
@ !dded to t'e listener)ora S&DL&ST
,S&DDAS; >/u==/product/ee3).)=/
,%R!;LAB%MA > /u==/product/ee3).)=/-
,S&DC!MA >dct$dup -
-
1M
@ !dded to t'e tnsnames)ora
D;T#D9P >
,DAS;R&PT&%C >
,!DDRASSL&ST >
,!DDRASS > ,PR%T%;%L > T;P-,B%ST >
lccd(=55)americas)armstrong)com-,P%RT > *1.*--
-
,;%CCA;TD!T! >
,%R!;LAS&D > dct$dup-
-
-
@ Reload listener
8lsnrctl reload
S23P3:
on lcc$&000
;reated t'e follo+ing directories
/u==/admin/dct$dup/(dump
/u==/admin/dct$dup/udump
/u==/admin/dct$dup/cdump
/u=//dct$dup ,for control files-
/u=//dct$dup/data ,for data files-
/u=0/dct$dup/data ,for data files-
/u=*/dct$dup/data ,for data files-
/u=./dct$dup/data ,for data files-
/u=./dct$dup/logs ,for redo log files-
/u=//dct$dup/logs ,for redo log files-
/u=0/dct$dup/arc'logs
Step/!2
;opy t'e initdcp$)ora from lccd(=56 to lccd(=55 and edit it accordingly ,in
t'e initdct$dup)ora file-
T'e follo+ing entries +ill (e added in t'e initdct$dup)ora
DBC!MA>D;T#D9P
&CST!C;AC!MA>D;T#D9P
;%CTR%LD&LAS>,/u=//dct$dup/control=*)ctl"/u=//dct$dup/control=.)ct
l"/u=//dct$dup/control=/)ctl-
@ ;onvert file names to allo+ for different directory structure for data files)
DBD&LAC!MA;%CEART>,/u=//prod/focm/data/focmsysa)d(f"/u=//dc
t$dup/data/focmsysa)d(f"
/u=0/prod/focm/data/focmr(*a)d(f"/u=0/dct$dup/data/focmr(*a)d(f"
/u=*/prod/focm/data/focmi=*a)d(f"/u=*/dct$dup/data/focmi=*a)d(f"
/u=./prod/focm/data/focmld*a)d(f"/u=./dct$dup/data/focmld*a)d(f"
/u=./prod/focm/data/focmsd*a)d(f"/u=./dct$dup/data/focmsd*a)d(f"
1Y
/u=//prod/focm/data/focmur*a)d(f"/u=//dct$dup/data/focmur*a)d(f"
/u=//prod/focm/data/focmtl*a)d(f"/u=//dct$dup/data/focmtl*a)d(f-
@ ;onvert file names to allo+ for different directory structure for redo log
files)
L%FD&LAC!MA;%CEART>,/u=0/prod/focm/logs/"/u=./dct$dup/logs/"
/u=1/prod/focm/logs/"/u=//dct$dup/logs/-
DBBL%;GS&HA>6*3.
;%MP!T&BLA>3).)=)=)=
S23P6:
on lccd(=55
8%R!;LAS&D>D;T#D9PI e:port %R!;LAS&D
SJlplus8startup nomount
S23P7:
on lcc$&001
!s t'ere in no pass+ord file on lccd(=56" & created a pass+ord file on
lccd(=56 to connect to dcp$
orap+d file>/u==/product/ee3).)=/d(s/orap+dcp$ pass+ord>?????
entries>*=
on lcc$&000
<e need to connect to rman
rman T!RFAT sys/?????Kdcp$ ;!T!L%F rman/??????Klcpkrcvcat
!9L&L&!RM sys/????Kdct$dup
Bere +e faced t'e follo+ing errors pro(lem in connecting to lccd(=56
N rman T!RFAT sys/?????Kdcp$ ;!T!L%F rman/?????Klcpkrcvcat
!9L&L&!RM sys/?????Kdct$dup
Recovery Manager2 Release 3).)=)5)= 7 40(it Production
;opyrig't ,c- *331" .==." %racle ;orporation) !ll rig'ts reserved)
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7==1432 >>>>>>>>>>>>>>> ARR%R MASS!FA ST!;G D%LL%<S
>>>>>>>>>>>>>>>
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7==1102 initialiOation of internal recovery manager package failed
RM!C7=0==12 error from target data(ase2
%R!7=*=/*2 insufficient privileges
<'en +e c'ecked on lccd(=55 t'e remoteloginpass+ordfile +as Cone
on dcp$ data(ase so +e made t'e c'anges in t'e parameter file to
remoteloginpass+ordfile > e:clusive and (ounced t'e dcp$ data(ase
1?
& +as no+ a(le to connect to t'e target data(ase
!gain +e faced t'e follo+ing errors stating t'at (ackup +as invalid one
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7==1432 >>>>>>>>>>>>>>> ARR%R MASS!FA ST!;G D%LL%<S
>>>>>>>>>>>>>>>
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7=/==.2 failure of Duplicate D( command at **/=*/.==4 ==2/*2*/
RM!C7=/=*12 error occurred in stored script Memory Script
%R!7*31=52 failed to retrieve seJuential file"
'andle>P(kdD%;Mukai=u0fus*450p*t4=03450..P" parms>PP
%R!7.5=.32 skgfrtrv2 s(trestore returned error
%R!7*31**2 Arror received from media manager layer" error te:t2
Backup file not found)
<e took t'e 'elp from (ackup team to correct t'e errors as t'e (ackup is
registered to lccd=56 +e got t'e errors t'at t'e (ackup is invalid on
lccd(=55" (ackup team made t'e c'anges in t'e net(ack up server so
t'at lccd=55 can identify t'e (ackups
!gain & e:ecuted t'e follo+ing statements
N rman T!RFAT sys/?????dcp$ ;!T!L%F rman/?????Klcpkrcvcat !9L&L&!RM
sys/?????Kdct$dup
& faced t'e follo+ing errors
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7==1432 >>>>>>>>>>>>>>> ARR%R MASS!FA ST!;G D%LL%<S
>>>>>>>>>>>>>>>
RM!C7==15*2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RM!C7==1102 initialiOation of internal recovery manager package failed
RM!C7=0==42 error from au:iliary data(ase2 %R!7=*=*52 invalid username/pass+ordI
logon denied
Bere t'e pro(lem +as +'en +e connect to au:iliary data(ase +e dont
need to add t'e statements Kdct$dup in t'e rman command
N rman T!RFAT sys/?????dcp$ ;!T!L%F rman/?????Klcpkrcvcat
!9L&L&!RM sys/?????
& got connected to t'e data(ase and issued t'e follo+ing statements
S23P6
@ Duplicate data(ase to dcp$Qs state / days ago)
& allocated t'e c'annels and issued t'e follo+ing command
T'e CB%R!;L&ACT is t'e source client if your recovery to a different
client) &f your recovering t'e same client as t'e source t'en it is not
needed)
R9C R
!LL%;!TA !9L&L&!RM ;B!CCAL c* DAE&;A TMPA s(t
parms>PACE>,CB%R!;L&ACT>lccd(=56p*-PI
!LL%;!TA !9L&L&!RM ;B!CCAL c. DAE&;A TMPA s(t
parms>PACE>,CB%R!;L&ACT>lccd(=56p*-PI
1N
D9PL&;!TA T!RFAT D!T!B!SA T% dct4dup until time Qsysdate7.QI
S
By including t'e parms parameter it eliminates t'e need for t'e client name to (e
c'anged in t'e (pconf +'ic' is in t'e net(ackup li(raries under /usr/openvT
T'e data(ase got created successfully
;'ecked all t'e ta(le spaces as t'e temporary ta(les +as not created as
its a cloning process & create t'e temporary ta(le space
RMAN (o,,ands
confiure retention polic% to reco+er% win!ow of WW !a%# P retention of &ac1up# in reco+er%
catalo
confiure retention polic% to re!un!anc%X' P retention of &ac1up# to a num&er of copie#
confiure retention polic% to clear P u#e# !efault re!un!anc% 1
confiure retention polic% to none P no retention
allocate channel for maintenance !e+ice t%pe ,GT8TA)EL > can al#o #pecif% DA,V
allocate channel ch00 t%pe ,GT8TA)EL > can al#o #pecif% DA,V
cro##chec1 &ac1upL > compare# 7erita# catalo with reco+er% catalo, e$pire# reco+er% catalo
entrie# not in +erita# catalo
report #chema P report# on taret !ata&a#e
report o&#olete P &ac1up# ren!ere! o&#olete
report nee! &ac1up P nee! &ac1up to conform with retention polic%
chane archi+elo all cro##chec1 P compare# reco+er% catalo information with what i# on !i#1
chane archi+elo D3!ri+e letter4<@te#t@l#tnarch@archlo#@l#tnarch**'arc" uncatalo P uncatalo#
archi+e lo# from the reco+er% catalo #o RBA* !oe# not loo1 for them on !i#1'
re#et !ata&a#e to incarnation 3i!entifier4 > comman! i# u#e! to un!o the effect# of a re#etlo#
re#et !ata&a#e P create# a new !ata&a#e incarnation in the !ata&a#e' (#eful if %ou foret to i##ue
Talter !ata&a#e open re#etlo#H throuh RBA*' Rei#ter Current Ancarnation
re#tore controlfile P re#tore# late#t controlfile
re#tore !ata&a#e P re#tore# late# !ata&a#e file#
re#tore archi+elo Tall or from #e5uence Q nnn T P u#e! to in!icate which archi+elo# to cop%
operation &% re#torin tape# of a prior incarnation of the !ata&a#e'
li#t &ac1up P complete! &ac1up# rei#tere! &% RBA*
li#t Ancarnation of !ata&a#e P li#t# !ata&a#e# with their !ifferent incarnation num&er#
+ali!ate &ac1up#et P +ali!ate &ac1up #et# &efore %ou u#e them
run \ allocate channel ch00 t%pe ,GT8TA)EL
+ali!ate &ac1up#et nnnL
]
#how all P confiura&le parameter# an! +alue# al#o T#elect O from +9rman8confiurationH from
reco+er% catalo !ata&a#e'
retention polic% P confiure retention polic% to re!un!anc% 2 W of copie# 1ept
Confiure retention polic% to reco+er% win!ow of 4M !a%# WW time perio! to
1eep &ac1lup#
Doe# not !elete &ut mar1# a# o&#olete
!elete o&#olete P !elete# o&#olete &ac1up# in repo#itor%
(#e Tallocate channel for maintenance t%pe ,GT8TA)ELH &efore !elete
(#e Tallocate channel for maintenance t%pe !i#1LH &efore !elete
!elete noprompt e$pire! &ac1upL > !elete# all e$pire! file# from cro##chec1 a&o+e'
!elete force noprompt archi+elo #e5uence W > !i#crepanc% &etween reco+er% catalo an! actual
&ac1up# on !i#1
create Reco+er% Catalo
rman4 connect catalo rman.H#t! pa##w!H
rman4 create catalo
19
!rop Reco+er% Catalo
rman'e$e
rman4 connect catalo rman.H#t! pa##w!H
rman4 !rop catalo
rei#terin Data&a#e
rman'e$e rman taret rman.H#t! pa##w!H catalo rman.H#t! pa##w!H/tn#name
rman4 rei#ter !ata&a#e
re#%nc catalo > ma1e# chane# to reco+er% catalo &a#e! on controlfile' Automatic with &ac1up
!ata&a#e'
RMAN #elete Bacup Reco+ery (atalog -ntries
Allocate channel for maintenance !e+ice t%pe ,GT8T-)EL
Run \
Cro##chec1 &ac1upL
Delete noprompt e$pire! &ac1upL]
RMAN (ontrol .ile !ara,eters
Confiure controlfile auto&ac1up onL Automaticall% &ac1up# the controlfile for an% &ac1up
comman! a# well a# ,)CALE

Case 4 ! 3$en one or more data5i%es are damaged6
1' Cop% the intact cop% of the !atafile from the tape'
2' Chec1 the !irector% of archi+e lo# for the no of archi+e! file#' All the archi+e! lo file# with
the time#tamp after the late#t hot &ac1up #houl! &e pre#ent' There #houl! &e no mi##in #e5uence
num&er#'
J' At the con#ole < c<@4 #+rmr2J 6 loa! #+rmr > *etware :
,7RB;R4connect internal 6u#e the #cript file FFFFF:
,7RB;R4#hut!own a&ort
,7RB;R4#tartup mount
Oracle An#tance #tarte!
Data&a#e mounte!
,7RB;R4 #elect O from +9reco+er8fileL
,7RB;R4 #elect O from +9!atafile where fileW Q W< > from pre+iou# 5uer%
Thi# will i+e a li#t of file# on which me!ia reco+er% will &e !one' Ta1e a printout of thi# file'
,7RB;R4 #elect O from +9reco+er%8loL
Thi# will i+e %ou the li#t of archi+e! lo file# which will &e applie! to the !ata&a#e, for a roll
forwar!' Thi# li#t i# +er% important' Chec1 the archi+e lo !irector% to a#certain the pre#ence of all
the file#' Af #ome file# are not pre#ent in the !irector% cop% them from the &ac1up tape, if the% are
not pre#ent at all then %ou will ha+e to perform the incomplete reco+er%'
,KL)L(,4 alter !ata&a#e reco+er automatic 6in ca#e of reular reco+er%:
Af %ou perform incomplete reco+er%, enter RECO7ER DATAGA,E (*TAL CA*CEL' ,7RB;R
will prompt %ou for file# to appl%' Ju#t 1eep on pre##in E*TER, till the a&#ent file i# prompte!'
Enter CA*CEL, after #ome time , the me##ae BEDAA RECO7ER- COB)LETE will appear'
,KL)L(,4 alter !ata&a#e open'
20
,tatement )roce##e!'
Af %ou perform incomplete reco+er% an! the control file i# re#tore! from a &ac1up, enter
RECO7ER DATAGA,E (,A*; GACV() CO*TROLCALE (*TAL CA*CEL' ,KL)L(, will
prompt %ou for file# to appl%' Ju#t 1eep on pre##in E*TER, till the a&#ent file i# prompte!' Enter
CA*CEL, after #ome time , the me##ae BEDAA RECO7ER- COB)LETE will appear'
,KL)L(,4 alter !ata&a#e open'
,tatement )roce##e!'
Af %ou ha+e performe! incomplete reco+er%, enter ALTER DATAGA,E O)E* RE,ETLO;,'
,KL)L(,4#hut!own 6*ormall%:
,KL)L(,4#tartup open
*ow the !ata&a#e i# &ac1 to normal u#e' At thi# #tae it i# a!+i#a&le to ta1e a =OT or COLD
&ac1up'
Case 7 ! I5 a redo %og5i%e is damaged6
1' There are two #ituation#<
O The re!o lofile wa# current
O The re!o lofile wa# Anacti+e
2' Af the re!o lofile wa# not current, follow thi# proce!ure<
A&ort the in#tance
Cop% the intact re!o lofile from the &ac1up
,tartup the !ata&a#e'
J' Af the re!o lofile i# current, it# a &it tric1%'
Cop% the intact cop% of the re!o lofile from the &ac1up'
Bount the !ata&a#e'
,7RB;R4 prompt write RECO7ER DATAGA,E (*TAL CA*CEL
2hen the ,7RB;R4 prompt# for a lofile to appl%, !o not i+e an% lofile name &ut
0u#t enter CA*CEL' After #ometime the me##ae Be!ia Reco+er% complete will appear'
*ow open the !ata&a#e with re#etlo# option'
,7RB;R4 alter !ata&a#e open re#etlo#
,hut!own the !ata&a#e normall%
,tartup the !ata&a#e
4' Ta1e the =ot or COLD &ac1up of the !ata&a#e'
Case 8 ! I5 contro% Fi%e is damaged6
There ma% &e two t%pe# of failure# in thi# ca#e' One of the control file# i# !amae! or all of them
ha+e &een !amae!
If only one control file is dama#ed%
Af the in#tance i# #till runnin, it will continue to !o #o till the control file i# nee!e!, i'e'
chec1point, lo#witch etc' At that time the !ata&a#e will cra#h' Af the in#tance i# runnin<
a' loa! #+rmr 6#+rmr2J for *T:
&' ,7RB;R4 #hut!own a&ort
Oracle in#tance a&orte!
21
c' Remo+e the !amae! control file reference from the controlfileQparameter'' in the
init'ora file'
,7RB;R4,tartup

!' At thi# point %ou can re#ume the normal wor1'
e' To fi$ the &a! file<
,7RB;R4 #hut!own
f' Cop% a oo! control file to the name an! location of the !amae! control file' Reenter
the name in the init3#i!4'ora file'
' ,7RB;R4 #tartup
If all the control files are dama#ed!
a'
Case 9 ! I5 a Data5i%e is damaged and t$e "ac,(p is not avai%a"%e6
A##ume that the file D''''.hrre!01'!&f" of ta&le#pace =RRED01 i# !amae! an! %ou !on"t ha+e a
&ac1up of the file' )erform the followin at the ,7RB;R prompt'
,7RB;R4 #hut!own a&ort
,7RB;R4 #tartup mount
,7RB;R4 alter !ata&a#e
,7RB;R4 create !atafile D'''.=RRED01"L
,7RB;R4 reco+er !atafile D'''.=RRED01"L
,7RB;R4 #elect O from +9!atafileL
-ou will #ee a li#t of !atafile# with their #tatu#' Af the #tatu# of the concerne! file ha# not &een
re#et to O*LA*E, i##ue to the followin comman!,
,7RB;R4 alter !ata&a#e
4 !atafile D''''.=RRED01'!&f" onlineL
,7RB;R4 #elect O from !&a8ta&le#pace#L
Af the #tatu# of the =RRED01 ta&le#pace i# not O*LA*E, i##ue the followin comman!'
,7RB;R4 alter ta&le#pace =RRED01 onlineL
,7RB;R4 alter !ata&a#e openL
*ow %ou can re#ume the normal operation
Case : ! Recovering 5rom &ser Errors
,ometime# %ou ma% ha+e to reco+er from #ome unintentional &ut un!e#ira&le error# li1e a ta&le
ha# &een !roppe! or #ome !ata ha# &een !elete! an! committe! which wa# not re5uire!, in that
ca#e %ou #houl! perform the time &a#e! reco+er%'
*ote !own the time of the un!e#ira&le action' -ou will ha+e to recreate till 0u#t &efore that'
,7RB;R4#hut!own 6normal:
Cop% all the !atafile#, re!o lo# an! control file# from an earlier &ac1up'
,7RB;R4 #tartup mount
,7RB;R4 reco+er !ata&a#e
4 until D199?>0J>1M<1M<J0<00" u#in &ac1up control file'
*ote that %ou want to reco+er till 1Mth Barch 199? J<J0)B format of the time #trin i# D---->
BB>DD<==<BA<,,"' 2hen ,KLODGA prompt# %ou for archi+e! lofile# to appl%, 0u#t enter
A(TO' The !ata&a#e will &e recreate! till the in!icate! time'
,7RB;R4 alter !ata&a#e open re#etlo#L
*ow the ol! archi+e! lo file# are u#ele##, !elete them an! ta1e a fre#h &ac1up'
22
Case ; ! Re"(i%ding Comp%ete *rac%e Server
An the e+ent the Oracle ,er+er nee!# to &e completel% re&uilt !ue to a har!ware or #oftware
!i#a#ter follow the#e #tep#<
1' Re#tore *etware an! &rin up the file #er+er'
2' Re#tore the file# an! !irectorie# from the late#t Oracle Gac1up tape that i# a+aila&le'
Thi# coul! &e the wee1l% col! &ac1up or the !ail% OCB &ac1up'
J' LOAD ,7RB;R2J
4' CO**ECT A*TER*AL@"pa##wor!"
M' ,TART()
Y' At thi# point the ORACLE DataGa#e #houl! &e up an! runnin'
?' Te#t a connection from a client machine'
ORACLE Data Base *onitorin#
Oracle %indo&s or Oracle /NI0 #atabase Monitoring
2hen ha+in naio# monitor a !ata&a#e plea#e re5ue#t a win!ow of non chec1in for the followin time#'
Gloc1 off one hour &efore to one after the e$pecte! runtime# of the offline &ac1up#' Gloc1 out the ,un!a%
Y<00 am P 12<00 pm maintenance win!ow'
Certain hih a+aila&ilit% Oracle #%#tem# runnin on 2in!ow# #er+er 6e$' T)`E an! TAGCO: ha+e
monitorin !one &% *aio#' The% ha+e a *aio# i! #etup with create #e##ion authoriEation' The i! al#o ha#
certain DGA ta&le #elect# i##ue! to it 6,ee Gelow:' The *aio# i! trie# an! connect# perio!icall% to the !ata
&a#e if it can not connect a tic1et i# opene!' The *aio# i! al#o chec1# the ta&le#pace# to #ee if the% are 4
N0 [ full' Af 4N0 [ an e>mail i# #ent to DGA8,())ORT8TEAB/arm#tron'com' Af the percentae full i#
4 90 a tic1et i# i##ue!' The #cript &ein run i# &elow'
column )ercent8(#e! format 999L
#elect aa'ta&le#pace8name, &&'(#e!8#pace.cc'Total8#paceO100 a)ercent8(#e!a from
6#elect ta&le#pace8name, &%te#8coale#ce!.1024.1024 Cree8,pace
from !&a8free8#pace8coale#ce!: aa,
6#elect ta&le#pace8name, #um6&%te#.1024.1024: (#e!8#pace from !&a8e$tent# roup &% ta&le#pace8name:
&&,
6#elect ta&le#pace8name, #um6&%te#.1024.1024: Total8#pace from !&a8!ata8file# roup &%
ta&le#pace8name: cc
where aa'ta&le#pace8name Q &&'ta&le#pace8name an! aa'ta&le#pace8name Q cc'ta&le#pace8name or!er &%
ta&le#pace8nameL
The notification i# a# follow#<
Since +e are monitoring a fe+ ta(lespaces at once" it is possi(le to actually 'ave multiple
e:ceptions in one poll)
!dditional &nfo Dormat2 A:ception2 Message ,A:ception Type2Ta(lename2U-" ,A:ception
Type2Ta(lename2U-" e:ception n V * ))))
A:ception Type2 < > <arning ; > ;ritical
T'e information message +ill (e similar to one of t'e follo+ing2
OK: Tablespace Normal
WARNING: Tablespace Exception (W:OMPV4:82%)
CRITICAL: Tablespace Exception (C:OMPV4:92%)
WARNING: Tablespace Exception (W:OMPV4:82%),(W:SYSTEM:82%)
2J
CRITICAL: Tablespace Exception (W:OMPV4:82%),(C:SYSTEM:92%)
&n any case" t'e 'ig'est level e:ception is al+ays used for notification and event'andling)
Instance Monitoring Scripts
The !ata&a#e team will in#tall #tat#pac1 on each Oracle !ata&a#e that i# create!' The followin i! will &e
u#e! to in#tall an! manae the #tat#pac1 information D)ERC,TAT"' A! i# create! a# part of the tool in#tall'
Installin# the &ool
The Oracle !ocumentation pertainin to thi# tool can &e foun! in
9ORACLE8=OBE.r!&m#.a!min.#p!oc't$t' Thi# will o into not onl% what i# li#te! &elow &ut
al#o the reportin nee!# 6#preport,#5l:'
An#tallation #cript# 6#pcreate'#5l: create a u#er calle! )ERC,TAT, which will own all )L.,KL
co!e an! !ata&#e o&0ect# create! 6inclu!in the ,TAT,)ACV ta&le#, con#traint# an! the
,TAT,)ACV pac1ae:'
Durin the in#tallation %ou will &e prompte! for the )ERC,TAT u#er"# pa##wor! an! !efault
3!&name4tl1 an! temporar% 3!&name4tp1 ta&le#pace name#'
*OTE<
24
Do not #pecif% the ,-,TEB ta&le#pace for the )ERC,TAT u#er# DECA(LT or
TEB)ORAR- ta&le#pace#'
Durin the in#tallation, the DGB,8,=ARED8)OOL an! thre DGB,8JOG )L.,KL
pac1ae# are create!' The DGB,8,=ARED8)OOL i# u#e! to pin the ,TAT,)ACV
pac1ae in the #hare! poolL the DGB,8JOG i# create! on the a##umption the DGA will
want to #che!ule perio!ic #nap#hot# automaticall% u#in the DGB,8JOG'
To in#tall the pac1ae<
C! .u00.pro!uct.#e9'2'0 or ee9'2'0.r!&m#.a!min
,KL)L(,
Connect . a# #%#!&a
/#pcreate
The #pcreate in#tall #cript run# J other #cript# P %ou !o not nee! to run the#e P the#e #cript# are
calle! automaticall%<
1' #pcu#r create# the u#er an! rant# pri+ilee#
2' #pcta& create# the ta&le#
J' #pcp1 create# the pac1ae#
Chec1 the output from the#e J 0o&# to +erif% the in#tallation of the u#er, ta&le# an! pac1ae#'
Automatin# Statspac" Statistics 3atherin#%
To &e a&le to ma1e compari#ion# of performance from one !a%, wee1 or %ear to
the ne$t, there mu#t &e multiple #nap#hot# ta1en o+er a perio! of time'
Collect #tati#tic# on a reular &a#i#'
-sin# DB*S45OB
Run the DGB,8JOG #cript to ha+e #tati#tic# athere! on an e+er% 1M minute &a#i#' ,ee the
followin co!e for an e$ample' Chane the #cript from Oracle to loo1 li1e the co!e &elow an!
then run Oracle"# #cript'
+aria&le 0o&no num&erL
+aria&le in#tno num&erL
&ein
#elect in#tance8num&er into <in#tno from +9in#tanceL
!&m#80o&'#u&mit6<0o&no, R#tat#pac1'#napLR, trunc6#%#!ate,R==R:,
Rtrunc6,-,DATES1M.1440,RRBARR:R, TR(E, <in#tno:L
commitL
en!L
.
Oracle Instance Installation Oracle 6!7!8 9 -$I.
Collow the in#tallation in#truction# foun! in the TOracle 9i An#tallation ;ui!eH Banual'
Gefore #tartin the actual in#tall 6Chapter J:, !o the followin<
a' Ba1e #ure the Root ta#1# an! Oracle u#er ta#1# are complete!'
&' Create the new pro!uct !irector% 6ie' .u00.pro!uct.ee9'2'0 or #e9'2'0:
c' ,et the en+ironment with the appropriate +aria&le#<
>> ,ET ORACLE8=OBEQ.u00.pro!uct.eeN'0'M or #e9'2'0
>> Af new in#tance i# 1nown at thi# point, then T#et ORACLE8,ADQ3#i!4T
2M
otherwi#e, Tun#et ORACLE8,ADH
!' Ba1e nee!e! chane to .etc.orata&'
Gein the in#tall' Collowin Chapter J' Do a #oftware onl% in#tall'
a' 2elcome #creen 3choo#e ne$t4
&' An+entor% Location TGa#e Director%H .u00.pro!uct 3choo#e o14
c' (*AF ;roup *ame !&a 3choo#e ne$t4
!' Run .tmp.orain#tRoot'#h #cript a# ROOT'
e' Cile Location u#e appropriate path De#tination *ame O(A=ome )ath
.u00.pro!uct.ee9'2'0 or #e9'2'0 3choo#e ne$t4
f' A+aila&le )ro!uct# ,elect Oracle 91 Data&a#e 9'2'0'1'0 3choo#e ne$t4
' An#tallation t%pe# ,elect either Enterpri#e E!iton or ,tan!ar! E!ition 3choo#e ne$t4
h' Data&a#e Confiuration ,elect ,oftware Onl% 3choo#e ne$t4
i' Choo#e JDV =ome Director% .opt.0a+a1'J 3choo#e ne$t4
0' ,ummar% 3choo#e in#tall4
1' Run confiuration #cript a# ROOT'
l' Tn#name#'ora' li#tener'ora an! #5lnet'ora file# can &e copie! from lcc!&0?N an! mo!ifie!'
Appl% re5uire! patche# 69'2'0'? or 9'2'0'N:' Collow patch note#'
Appl% late#t O)ATC= utilit% for the appropriate +er#ion.relea#e to &e prepare! for an% one>off patche#
nee!e!' ,ee Oracle note# on in#tallation' Currentl% 2Y1?419 i# the late#t opatch for 10'1 an! 9'2'
a' unEip or winEip, !epen!in on the platform'
&' -ou #houl! e$tract the Eip file !irectl% un!er the ORACLE8=OBE
c' -ou can rea! the O)atch.!oc# for !ocumentation on u#in the tool'
Creating a Ne Instance Name
2hen creatin a new in#tance name perform the followin ta#1#<
Init:sid;! ora creation
,in on to the (ni$ &o$ a# Oracle' Create the Da!min" !irectorie# for %our in#tance<
.u00.a!min.3#i!4
.u00.a!min.3#i!4.pfile
.u00.a!min.3#i!4.&!ump
.u00.a!min.3#i!4.u!ump
.u00.a!min.3#i!4.c!ump
Create the init3,AD4'ora file for %our in#tance' (nle## %ou #pecif% !ifferentl% thi# #houl! &e 1ept
in the .u00.a!min.3#i!4.pfile !irector%' G% !efault Oracle will loo1 for a parameter file
containin the 3,AD4 name' Af %ou wi#h to o+erri!e thi# !efault %ou ma% #pecif% a )CALE
parameter !urin in#tance #tartup'
Create a (*AF lin1 to the pfile &% !oin the followin<
c! 9ORACLE8=OBE.!&#
ln ># .u00.a!min.3#i!4.pfile.init3#i!4'ora init3#i!4'ora
6*ote< Ge #ure to comment out Tlo8archi+e8#tartH parameter# in the pfile for if %ou ha+en"t
alrea!% create! the !ata&a#e':
&$S$A*ES!ora and LIS&E$ER!ora chan#es
The tn#name#'ora an! li#tener'ora file# mu#t &e e!ite! to contain the new 3,AD4 name' Thi# will
happen automaticall% if %ou #pecifie! the correct 3#i!4 !urin in#tallation, otherwi#e %ou will
nee! to e!it the#e file#'
Af %ou are runnin multiple +er#ion# of Oracle on the #ame #er+er, then all T*,*ABE, an!
LA,TE*ER entrie# 6for &oth +er#ion#: #houl! e$i#t in the oriinal ORACLE8=OBE' Cor
e$ample, if Ora?'J'4 i# alrea!% in#talle! on a #er+er, an! the file# in .u00.pro!uct.w?'J'4.''' ha+e
entrie# for the O?'J'4 in#tance#, then the new ON'0'M in#tance entrie# #houl! al#o &e ma!e within
the O?'J'4 file#' Thi# i# &ecau#e onl% one li#tener can &e acti+e on a #er+er, #o all li#tener entrie#
#houl! &e containe! in the file for the oriinal li#tener'
2Y
T*,*ABE, entr% e$ample
Af onl% +N'0'M i# in#talle! on the #er+er, then the entr% will &e in the tn#name#'ora file in the
.u00.pro!uct.wN'0'M.networ1.a!min !irector%' Af another +er#ion i# wa# alrea!% on the #er+er,
then the entr% #houl! &e a!!e! to the tn#name#'ora file within that +er#ion"# ORACLE8=OBE'
E$'
!ct183!ata&a#ename4 Q WWW Thi# i# not alwa%# followe! &ut let# #tart'
6DE,CRA)TAO* Q
6ADDRE,, Q 6)ROTOCOLQ TC):6=o#tQ LCCDG0?N:6)ortQ 1M21::
6CO**ECT8DATA Q 6,AD Q !ct1::
:
LA,TE*ER entr% e$ample
Af onl% +N'0'M i# in#talle! on the #er+er, then the entr% will &e in the li#tener'ora file in the
.u00.pro!uct.wN'0'M.networ1.a!min !irector%' Af another +er#ion i# wa# alrea!% on the #er+er,
then the entr% #houl! &e a!!e! to the li#tener'ora file within that +er#ion"# ORACLE8=OBE'
2ithin the #ection Tli#tener Q 6a!!re##8li#t Q T
6ADDRE,,Q 6)ROTOCOLQ A)C:6VE-Q !ct1::
2ithin the #ection T#i!8li#t8li#tener Q 6#i!8li#t Q T
6,AD8DE,C Q
6ORACLE8=OBEQ .u00.pro!uct.ee9'2'0 or #e9'2'0:
6,AD8*ABE Q !cpa:
:
*OTE >> The path in the DORACLE8=OBE" parameter #houl! alwa%# &e the 9'2'0 Oracle home
path, rear!le## of which li#tener'ora file %ou"re up!atin'
Li#tener Control Comman!#
To e$ecute li#tener control comman!# %ou mu#t #inon to (*AF a# ToracleH' The comman!# will
affect the li#tener within the ORACLE8=OBE of the current ORACLE8,AD, #o if %our chane#
were ma!e to a li#tener file from another +er#ion, %ou mu#t #elect an ORACLE8,AD from within
that +er#ion'
To pic1 up chane# in the li#tener 6without affectin connecte! u#er#:<
At the comman! prompt Tl#nrctl reloa!H
To et a li#tener #tatu#<
At the comman! prompt Tl#nrctl #tatu#H
To #tart the li#tener<
At the comman! prompt Tl#nrctl #tartH
To #top the li#tener<
At the comman! prompt Tl#nrctl #topH
Creation o5 contro% 5i%es6
Control file# > Create a!!itional +er#ion# of control file, if not alrea!% !one'
,hut!own in#tance
Cop% current control file to create a 2n! or Jr! cop% un!er the #tan!ar! !irector%
#tructure'
E!it the init3,AD4'ora file to enter the a!!itional control file name#'
Arc$iving Log Fi%es
Only production databases ha/e archi/in# turned on unless re1uested by application team
Connect #%# a# #%#!&a
,hut!own imme!iate
2?
)erform offline &ac1up 6unle## initial in#tallation then not nee!e!:
Ba1e #ure the followin initi3#i!4'ora parameter# are #et<
lo8archi+e8!e#tQ.uZZ.3en+4.3!&name4.archlo#
lo8archi+e8formatQ3!&8uni5ue8name48[#8[t8[r'arc
lo8archi+e8!e#t8#tate81Qena&le
,tartup mountL
Alter !ata&a#e archi+eloL
Alter !ata&a#e openL
,hut!own imme!iate
Gac1up the !ata&a#e 6no pre+iou# !ata&a#e &ac1up will &e an% oo! for total reco+er%:
Connect #%# a# #%#!&a
,elect O from !&a8loileL
&pdate t$e *rac%e instance %ist < =master> TNSNAMES netor, 5i%e6
A!! new in#tance information to ,er+ice De#1<
A(tomated *rac%e Instance and Listener Start(p and S$(tdon
6The create lin1# &elow ha+e a ten!enc% to &e !ifferent on !ifferent #er+er#:
Create T.#&in.init'!.oracleH from T.#&in.init'!.templateH 6or cop% from another =)(F #er+er:
E!it T.etc.rc'confi'!.oracleH' An#ert ORACLE8,TARTQ1
Create a lin1 T.#&in.rc2'!.V10Moracle >4 .#&in.init'!.oracleH' Thi# will &e u#e! for #hut!own'
Create a lin1 T.#&in.rcJ'!.,99Moracle > 4 .#&in.init'!.oracleH' Thi# will &e u#e! for #tartup'
6#ome #er+er# u#e:
Create a lin1 T.#&in.rc2'!.V204oracle >4 .#&in.init'!.oracleH' Thi# will &e u#e! for #hut!own'
Create a lin1 T.#&in.rcJ'!.,N?Moracle > 4 .#&in.init'!.oracleH' Thi# will &e u#e! for #tartup'
En#ure that the T.etc.orata&H file contain# an entr% 3in#tance4<3oracle>home4<- 6or *: for
automate! #tartup 6or not:'
E!it T9ORACLE8=OBE.&in.!&#hutH to perform a ,=(TDO2* ABBEDAATE'
Create another T.#&in.init'!.!&oraH file to i##ue the LA,TE*ER #tartup an! #hut!own' (#e the
T.#&in.init'!.oracleH file a# a mo!el, replacin the D#u > oracle >c !&#tart" with D#u > oracle >c
Tl#nrctl #tartH or Tl#nrctl #topH D
chmo! MMM .#&in.init'!.!&ora
Create a lin1 T.#&in.rcJ'!.,99Yoracle > 4 .#&in.init'!.!&oraH
Create a lin1 T.#&in.rc2'!.V10Yoracle > 4 .#&in.init'!.!&oraH
6#ome #er+er u#e:
Create a lin1 T.#&in.rcJ'!.,N?Yoracle > 4 .#&in.init'!.!&oraH
2N
Create a lin1 T.#&in.rc2'!.V20Moracle > 4 .#&in.init'!.!&oraH
Oracle Instance Installation Oracle <8!7!8 9 -$I.
Collow the in#tallation in#truction# foun! in the TOracle 10i An#tallation ;ui!eH Banual'
Gefore #tartin the actual in#tall 6Chapter J:, !o the followin<
a' Ba1e #ure the Root ta#1# an! Oracle u#er ta#1# are complete!'
&' Create the new pro!uct !irector% 6ie' .u00.pro!uct.ee10'2'0 or #e10'2'0:
c' ,et the en+ironment with the appropriate +aria&le#<
>> ,ET ORACLE8=OBEQ.u00.pro!uct.ee10'2'0 or #e10'2'0
>> Af new in#tance i# 1nown at thi# point, then T#et ORACLE8,ADQ3#i!4T
otherwi#e, Tun#et ORACLE8,ADH
!' Ba1e nee!e! chane to .etc.orata&'
e' (#in ToracleH i!' B1!ir .u00.pro!uct.oraAn+entor%
Gein the in#tall' Collowin Chapter J' Do a #oftware onl% in#tall'
a' 2elcome #creen 3choo#e A!+ance! An#tallation4 3 ne$t4
&' ,pecif% An+entor% !irector% an! cre!ential#
a' .u00.pro!uct.oraAn+entor%
&' !&a
c' ,elect An#tallation T%pe 3Enterpi#e E!ition or ,tan!ar! E!ition4 3ne$t4
!' ,pecif% =ome Detail# *ame< 3 OraD&108EE4 )ath< 3.u00.pro!uct.ee10'2'04 3ne$t4
Or ,pecif% =ome Detail# *ame< 3 OraD&108,E4 )ath< 3.u00.pro!uct.#e10'2'04 3ne$t4
e' )ro!uct>,pecific )rere5ui#ite Chec1#
a' The +ali!ate! the en+ironment
&' Chec1in operatin #%#tem pac1ae re5uirement# 3not e$ecute!4
c' Chec1in recommen!e! operatin #%#tem patche! 3warnin4 6The#e me##ae#
ma% not #how for certain platform#:
i' Ri#c 11'11 Ri#c 11'2J
ii' )=,,8J2M0N )=,,8J2M11
iii' )=,,8J2M09 )=,,8J2M12
i+' )=,,8J2M10 )=,,8J2M1J
+' )=,,8J2?J1 )=,,8J2?40
+i' Vernel )arameter# not (#e!
+ii' Ba$#wapchun1#
+iii' #emmap
!' chec1e! the &o$e# an! continue!
e' 3ne$t4
f' (pra!in an e$i#tin !ata&a#e 3*O4 3ne$t4
' ,elect Confiuration Option 3An#tall !ata&a#e ,oftware onl%4 3ne$t4
h' ,ummar% 3choo#e in#tall4
i' An#tall
0' Run confiuration #cript6#: a# ROOT'
a' Af an Oracle wa# alrea!% in#talle! on the #er+er re#pon! a# follow#<
i' .u#r.local.&in 3enter4
1' !&home ^n_
2' oraen+ ^n_
J' coraen+ ^n_
&' Af not in#talle! re#pon! a# follow#<
i' .u#r.local.&in 3enter4
1' !&home ^%_
2' oraen+ ^%_
J' coraen+ ^%_
1' En! of An#tallation
Appl% re5uire! patche# 610'2'0'J.4:' Collow patch note#'
a'2elcome #creen 3ne$t4
&' ,pecif% =ome Detail#' *ame< OraD&108EE )ath< 3 u00.pro!uct.ee10'2'04 3ne$t4
29
or ,pecif% =ome Detail#' *ame< OraD&108,E )ath< 3 u00.pro!uct.#e10'2'04 3ne$t4
c' An#tall 3ne$t4
!' Run confiuration #cript a# ROOT'
a' Af an Oracle wa# alrea!% in#talle! on the #er+er re#pon! a# follow#<
i' .u#r.local.&in
1' !&home ^n_
2' oraen+ ^n_
J' coraen+ ^n_
e' En! of An#tallation
Appl% late#t O)ATC= utilit% for the appropriate +er#ion.relea#e to &e prepare! for an% one>off patche#
nee!e!' ,ee Oracle note# on in#tallation' Currentl% 2Y1?419 i# the late#t opatch for 10'1 an! 9'2'
a' unEip or winEip, !epen!in on the platform'
&' -ou #houl! e$tract the Eip file !irectl% un!er the ORACLE8=OBE
c' -ou can rea! the O)atch.!oc# for !ocumentation on u#in the tool'
A &elie+e O)ATC= ma% &e et in#talle! automaticall% with 10'2' Chec1 to fin! out'
Create the Database Oracle <8!7
,inon to the (ni$ &o$ a# Oracle'
Run .appl.#cript#.crt8!ir8ora'1#h to create !ata&a#e #ource !irector% #tructure'
cp init'ora from .appl.#cript# to .u00.a!min.3#i!4.pfile.init3#i!4'ora
ma1e nee!e! chane# in!icate! in init3#i!4'ora
c! 9ORACLE8=OBE.!&#
ln P# .u00.a!min.3#i!4.pfile.init3#i!4'ora init3#i!4'ora
Create the !irectorie# for %our !ata&a#e file# 6archlo#, !ata, e$port# an! lo# : for %our !ata&a#e
6.u00.3en+4.3#chema4.in#t8!&.m1!ir83#chema4'1#h: e$< .u00.te#t.wr!#.in#t8!&.m1!ir8wr!#'1#h
E$'
m1!ir .u01.pro!.wr!#
m1!ir .u01.pro!.wr!#.!ata
m1!ir .u02.pro!.wr!#
m1!ir .u22.pro!.wr!#.lo#
To allow the ORACLE8,AD an! ORACLE8=OBE to &e #et at (*AF #inon, a!! an entr% to
the .etc.orata& file' The format i# 3in#tance4<3oracle>home4<-
e$'
!ct1<.u00.pro!uct.3ee10'2'0 or #e10'2'04<-
E!it.Create !ata&a#e creation file 6 .u00.3en+4.3#chema4.in#t8!&.3#chema4'!& : for %our
in#tance' T%picall% thi# file inclu!e# the followin<
Connect . a# #%#!&a
#tartup nomount pfile Q .u00.a!min.3#i!4.pfile.init3#i!4'ora
Create !ata&a#e
ma$!atafile# 1024
ma$lofile J2
ma$in#tance# 1 6unle## multiple in#tance will &e u#in !ata&a#e:
character #et TALJ2(TCNH ,ee Oracle Data&a#e ,etup Chec1li#t
Create# #%#tem ta&le#pace
Create #%#au$ ta&le#pace
Create un!o ta&le#pace
Create temporar% ta&le#pace
lofile# 6u#e roup#:' ,tan!ar! i# three roup# with onl% two entrie# per
roup' 2e onl% nee! the oriinal an! one mirror per roup'
D/9ORACLE8=OBE.r!&m#.a!min.catalo'#5l"
D/9ORACLE8=OBE.r!&m#.a!min.catproc'#5l"
D/9ORACLE8=OBE.r!&m#.a!min.cat&loc1'#5l"
J0
D/9ORACLE8=OBE.r!&m#.a!min.cate$p'#5l"
Ba% &e other# al#o re5uire! 6cat5ueue etc:, &ut the a&o+e are #tan!ar!''
Connect #%#tem.3pa##wor!4
/9ORACLE8=OBE.#5lplu#.a!min.pup&l!'#5l
Create file# in .u00.3en+4.3#chema4.in#t8!& !irector% containin creation comman!# for the
followin !ata&a#e o&0ect# when o&0ect# are a+aila&le or re5ue#te!<
Ta&le#pace# 6createDGCile#'#5l:
Role# 6a!!8role'#5l:
(#er# 6create8u#er#'#5l:
(#er# 6create8rman'#5l:
,chema owner i! 6create8u#er#'#5l:
Ta&le# 6all8t&l'#5l:
An!e$e# 6all8in!'#5l:
Trier# 6all8tr'#5l:
7iew# 6all8+iw'#5l:
)ermi##ion# 63#chema4'per:
,%non%m# 6all8#%n'#5l:
Create the !ata&a#e an! it# o&0ect#<
Chane to #chema"# in#tall !irector%<
c! .u00.3en+4.3#chema4.in#t8!&
,tartup ,5l )lu# 3#5lplu#4
Run each of the followin #cript# 6 /path.filename :' Connect #tatement i# w.in #cript'
3#chema4'!&
Run each of the followin #cript# 6 /path.filename:
createDGCile#'#5l
a!!8u#er#'#5l
Connect a# #chema owner'
Create ta&le#, in!e$e#, +iew#,an! trier# &% one of the#e metho!#<
Run creation #cript# 6all8t&l'#5l, all8in!'#5l, all8tr'#5l, all8+iw'#5l:
Run an import 6if %ou ha+e an e$port:, #pecif%in Dno trier#" in the
importL then run all8tr'#5l to create trier#'
Create o&0ect permi##ion#<
Run 3#chema4'per
Create pu&lic #%non%m#<
Run all8#%n'#5l
,hut!own.#tartup new in#tance
,tartup ,KL )lu# 3#5lplu#4
Connect . a# #%#!&a
,hut!own imme!iate
,tartup
#elect O from +9threa!L 6+erif% %our in#tance i# !efault:
#elect O from !&a8ta&le#pace#L 6+erif% all ta&le#pace# e$i#t, an! that temp
ta&le#pace i# #hown a# t%pe TEB)ORAR-:
C$ange SYS? SYSTEM? and sc$ema oner passords to @standard'6
)oc oracle ids $ro, Installation t1at are not used
Alter u#er 3u#ername4 account loc1 pa##wor! e$pire
&pdate t$e *rac%e instance %ist < =master> TNSNAMES netor, 5i%e6
A!! new in#tance information to ,er+ice De#1<
J1
Oracle Client Only Installation Oracle <8!7!8 = +indo,s 788.
,tartup Oracle An#taller u#in #etup'e$e from the Oracle 10'2 2in!ow# Client c!
Oracle =ome *ame > OraClient10
Oracle Director% > D<@opt@oracle@ora102
Af onl% in#tallin a# a connection client onl% an! not !e+elopment u#e the followin'
Cu#tom a# runtime !oe# not alwa%# in#tall the ODGC !ri+er#'
Ba1e the followin are chec1e!<
Oracle 10 client 10'2'0'1'0 Thi# i# the hih le+el pro!uct' ;et# chec1e! after fir#t option i# chec1e!'
Oracle Ja+a Client 10'2'0'1'0
,KLO)lu# 10'2'0'1'0
Oracle JDGC.Thin Anterface# 10'2'0'1'0
Oracle 2in!ow# Anterface# 10'2'0'1'0 Thi# contain# the ODGC an! OO4O !ri+er#'
Oracle Call Anterface 6OCA: 10'2'0'1'0
Oracle *et 10'2'0'1'0
Oracle *otification ,er+ice 10'1'0'J'0
Oracle Clu#terware =ih A+aila&ilit% A)A 10'2'0'1'0
-ou !o not nee! to run the tool# if %our oin to cop% acro## the tn#name#'ora an! ,KLnet'ora
e$it
Cop% tn#name#'ora an! #5lnet'ora from another client an! mo!if% nee!e! chane#'
Compete!
Oracle Instance Installation Oracle 6!7!8 = +indo,s 788.
Insta%% *rac%e so5tare
Collow #tan!ar!# for creatin the re5uire! !ata&a#e !irector% #tructure#' The#e can &e foun! in Lotu# *ote#
un!er AAT, Reference ;ui!e CJ00 Application De+elopment ,tan!ar!# ,0M0 Data&a#e ,tan!ar!#'
Collow the in#tallation in#truction# foun! in the in#tallation for 2in!ow# 2000 Banual'
-ou re5uire a!mini#trator acce## on 2in!ow# 200F to !o the in#tall'
Remote acce## throuh Terminal ,er+er u#in ,er+er Banaer are not totall% compati&le' -ou will et
an! error ORA>09JM2<Oracle6,AD: ha# not &een #tarte!' 2hen %ou connect, connect with u#ername/alia#
to to et aroun! thi# pro&lem' A# not a pro&lem an%more'
Ba1e #ure Oracle =ome i# create!' E$ample# D<@oracle@#e9'2'0 or D<@oracle@ee9'2'0
Durin the in#tall oracle will create the in+entor% !irectorie# un!er c<@proram file#@oracle' Thi# !irector%
et # create! automaticall% &% the in#taller'
Loa! CD to allow autoin#tall to &ein'
Choo#e An#tall . DeAn#tall )ro!uct# 6ta1e# time for thi# #creen to appear, &e patient:
J2
Collow in#tall prompt#< Oracle (ni+er#al An#taller
2elcome 6ne$t:
Cile Location#<
*ame< Ta1e !efault name 6if fir#t in#tallation on machine:
Location< 6!ri+e letter:<@oracle@#e9'2'0 ee9'2'0 for enterpri#e e!ition
*OTE< u#e DD" a# the !ri+e letter to #tan!ar!iEe
3ne$t4
A+aila&le )ro!uct#<
Oracle 9i Data Ga#e 9'2'0'1'0
3ne$t4
An#tallation T%pe#<
,tan!ar! E!ition
3ne$t4
,elect Data Ga#e ,uite! to -our *ee!#
,oftware An#tall onl%
3ne$t4
Oracle ,er+ice# for Bicro#oft Tran#action ,er+er
)ort W 20J0
3ne$t4
,ummar%<
3An#tall4
,witch c!"# at 1Y[ an! 4J[' 2ill chane with !ifferent relea#e#'
En! of An#tallation
3e$it4
Creating *rac%e Instance
Chec1 if Oracle ,er+ice# were create! #ucce##full% a# part of #oftware in#tall<
,ettin# . Control )anel . ,er+ice#
The followin entrie# #houl! &e li#te!<
OracleBT,Reco+er%,er+ice automatic
OracleOra=ome92Aent manual
OracleOra=ome92ClientCache manual
OracleOra=ome92=TT),er+er manual
OracleOra=ome92)ain,er+er manual
OracleOra=ome92,*B))eerEncap#ulator manual
OracleOra=ome92,*B))eerBa#terAent manual
Setting &p an Instance
2hen creatin a new in#tance name perform the followin ta#1#<
Create Database Directory structures
Af the !ata&a#e !irector% #tructure ha# not &een create! !o #o now' Collow #tan!ar!# in !ocument
AAT, Reference ;ui!e CJ00 Application De+elopment ,tan!ar!# ,0M0 Data&a#e ,tan!ar!#
Init:sid;! ora creation
Create a new init3,AD4'ora file &% cop%in the init3#i!4l'ora file from another #er+er' Thi#
#houl! &e 1ept in the +ol<'''@oracle@#e9'2'0@!ata&a#e !irector% 6Oracle will loo1 here for a
parameter file containin the 3,AD4 name #ince thi# wa# #pecifie! in the create #er+ice proce##:'
Af %ou wi#h to o+erri!e thi# !efault %ou ma% #pecif% a )CALE parameter !urin in#tance #tartup'
JJ
E!it the new file, an! mo!if% the followin item#<
!&8name >> #et to whate+er %our !ata&a#e name will &e 6e$' LOD):
!&8file# >> #et to appropriate +alue 6#houl! &e #ame a# BAFDATACALE, in O'!& file:
control8file# >> chane path.file name# accor!in to #tan!ar!#
(*DO8TAGLE,)ACE #houl! &e u#e! an! #pecifie!'
(*DO8BA*A;EBE*TQauto
(*DO8RETE*TAO*Q?200 i+e# 2 hour# of rea! con#i#tenc%
uncomment.comment ,BALL.BED.LAR;E #ettin# a# appropriate
chane path.filename# for &ac1roun!8!ump8!e#t, u#er8!ump8!e#t n! core8!ump8!e#t
entrie#
chane !&8&loc18#iEe to N192 6for NV &loc1#:
ma1e #ure REBOTE8LO;A*8)A,,2ORDCALE Q #hare! chec1 on thi#'
a!! line for *L,8DATE8CORBAT Q T!!>BO*>rrH' *OTE >> (#e thi# +alue &ecau#e
mu#t &e #ame a# what will &e #etup later in rei#tr%, an! rei#tr% i# u#e! acro##
all application# on the #er+er' ,o, u#in thi# will &e lea#t ri#1%, #ince it"# clo#e#t
to Oracle !efault'
,a+e file
Delete old ORCL database' Thi# will remo+e all file# a##ociate! with the ol! !ata&a#e'
,tart All )roram# Oracle Ora=ome92 Oracle Confiuration an! Banaement Tool
Data&a#e Confiuration A##i#tant' Choo#e Delete A Data&a#e Choo#e ORCL an! !elete'
(reating a #atabase ser+ice
An the DO, win!ow e$ecute the followin<
Dora!imH
ora!im P*E2 P,AD 3in#tance name4 >,R7C Oracle ,er+ice 3A*,TA*CE4 >A*T)2D 3#%# pa##wor!4
>,TARTBODE m P)CALE !<@oracle@#e9'2'0@!ata&a#e@init3in#tance4'ora
Chec1 if new in#tance"# 6e$' L,T1: ,er+ice# were create! #ucce##full%<
,ettin# . Control )anel . ,er+ice#
The followin entrie# #houl! &e li#te!<
OracleBT,Reco+er%,er+ice
OracleOra=ome92Aent manual
OracleOra=ome92ClientCache manual
OracleOra=ome92=TT),er+er manual
OracleOra=ome92)ain,er+er manual
J4
OracleOra=ome92,*B))eerEncap#ulator manual
OracleOra=ome92,*B))eerBa#terAent manual
Oracle ,er+iceLC); #tarte! automatic
OracleOra=ome92T*,Li#tener #tarte! automatic
,top an! #tart %our in#tance"# ,er+ice#
P+D:sid;!ora creation
A pa##wor! file for the new in#tance name wa# create! !urin the An#tance creation proce##' G%
!efault Oracle loo1# for thi# file in the +ol<'''@oracle@#e9'2'0@!ata&a#e !irector%'
or
Orapw! fileQD<@oracle@#e9'2'0@!ata&a#e@)2Dlcp'ora pa##wor!Q 3pa##wor! for #%#4 entrie#QJ0
>>>>Setup $LS4DA&E40OR*A& in re#istry>>>>> *ay not need to do!
Create entr% in *T rei#tr% for *L,8DATE8CORBAT +alue' Thi# i# nee!e! &ecau#e the rei#tr%
i# u#e! for all #er+er.client proce##e# on the *T machine' 6The init3#i!4'ora
*L,8DATE8CORBAT parameter i# onl% u#e! for connection# which !i!n"t ha+e a rei#tr% to et
a +alue from >> for e$ample, a connection from a 2inJ'1 client':
At B,>DO, prompt, t%pe Dree!it"
7iew tree an! !ata
,elect the followin path<
@h1e%8local8machine@#oftware@oracle
,elect from menu &ar< e!it . new . #trin +alue
Enter *ame Q *L,8DATE8CORBAT 6then enter to create +alue:
Dou&le clic1 on new *L,8DATE8CORBAT entr% in li#tin'
Enter 7alue Data Q !!>BO*>rr 6no 5uote#, the%"re alrea!% thereL then enter to #a+e:
E$it the rei#tr% e!itor
Create ne instance's data"ase
Ba1e #ure new in#tance"# 6e$' LC);: ,er+ice# are #tarte!<
,ettin# . Control )anel . ,er+ice#
The followin entrie# #houl! &e li#te!<
OracleBT,Reco+er%,er+ice
OracleOra=ome92Aent manual
OracleOra=ome92ClientCache manual
OracleOra=ome92=TT),er+er manual
OracleOra=ome92)ain,er+er manual
OracleOra=ome92,*B))eerEncap#ulator manual
OracleOra=ome92,*B))eerBa#terAent manual
Oracle ,er+iceLC); #tarte! automatic
OracleOra=ome92T*,Li#tener #tarte! automatic
Ba1e new in#tance the current in#tance
At B,>DO, prompt, t%pe D,ET ORACLE8,ADQLC);"
,hut!own %our in#tance
At B,>DO, prompt, t%pe D#5lplu#"
. a# #%#!&a
#hut!own imme!iate
*ote< me##ae ORA>010J4 Oracle not a+aila&le i# a +ali! me#aae an! can &e inore!
&ecau#e the !ata&a#e in the in#tance ha# not %et &een create!'
E!it.Create O'!& file for %our in#tance' Anclu!e #pool, an! D#tartup nomount" comman!# at the
&einnin of the file'
Create the !ata&a#e<
At B,>DO, prompt, t%pe D#5lplu#"
Run each #cript &% t%pin path.filename prefi$e! &% D/"' 6Loin i# within each #cript':
JM
> O'!& file
> Create Ta&le#pace#
> Create (#er#
. a# #%#!&a, an! run<
> D+ol i!<@oracle@#e9'2'0@r!&m#@a!min@catalo'#5l"
> D+ol8i!<@oracle@#e9'2'0@r!&m#@a!min@catproc'#5l"
> D+ol8i!<@oracle@#e9'2'0@r!&m#@a!min@cate$p'#5l"
Connect ,-,TEB.3pa##wor!4
Run +ol8i!<@oracle@#e9'2'0@#5lplu#@a!min@pup&l!'#5l
Guil! ta&le#.in!e$e# &% either runnin creation #cript6#:, or runnin an import'
,hut!own.#tartup new in#tance
At B,>DO, prompt, t%pe D#5lplu#"
. a# #%#!&a
,hut!own imme!iate
,tartup
#elect O from +9threa!L 6+erif% %our in#tance i# !efault:
#elect O from !&a8ta&le#pace#L 6+erif% all ta&le#pace# e$i#t:
Set -n+iron,ent Variables
,tart Control )anel #%#tem A!+ance! en+ironment +aria&le# u#er +aria&le#
6new:
ORACLE8,AD
LC);
3OV4
7erif% that !efault ha# chane! 6+ia ,er+er Banaer:
At B,>DO, prompt, t%pe D#5lplu#"
. a# #%#!&a
,elect O from +9threa!L >> re#ult #houl! #how %our in#tance, not ORCL in#tance
*ote< if %ou recei+e an error me##ae TORA>Y401< *ETCB*< in+ali! !ri+er
!e#inatorH then !o the followin<
a: e$it.clo#e the comman! win!ow
&: open up the comman! win!ow
c: retr% the comman!'
Insta%% C%ient So5tare on Server
Client #oftware 6*etN: i# in#talle! a# part of #tan!ar! Oracle9i #er+er in#tallation'
TNSNAMES and LISTENER c$anges
T*,*ABE,'ORA file chane#
,tart All )roram# Oracle Ora=ome92 Oracle Confiuration an! Banaement Tool
*et Confiuration A##i#tant
' The proce## #houl! create a new entr% li1e thi# in the tn#name#'ora file 6locate! in
+ol<@oracle@#e9'2'0@networ1@a!min@tn#name#'ora:<
LC);8L,T*'america#'arm#tron'com Q
6DE,CRA)TAO* Q
6ADDRE,, Q
6)ROTOCOL Q TC):
6=O,T Q lcc!&0MN:
6)ort Q 1M21:
:
6CO**ECT8DATA Q
6,AD Q lcp:
:
JY
:
LA,TE*ER'ORA file chane#
,tart All )roram# Oracle Ora=ome92 Oracle Confiuration an! Banaement Tool
*et manaer
E!it the li#tener'ora file 6in the +ol<@oracle@#e9'2'0@networ1@a!min@li#tener'ora :, an! a!! the
followin entrie# 6if mi##in:<
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = LCCDB058)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtPr!)
(ORACLE_HOME = "#$r%!&'$(')*2*0)
(PRO+RAM = 'xt,r!)
)

(SID_DESC =
- (+LOBAL_DBNAME = &(t.)
(ORACLE_HOME = "#$r%!&'$(')*2*0)
(SID_NAME = &!,/)
)

)

,top an! ,tart the li#tener 6+ia the *T ,er+ice# manaer: #o that the li#tener chane# ta1e effect'
Te#t #etup &% connectin to in#tance +ia ,KLO)lu#
Copy Insta%% CD to dis,
Cop% the Oracle #oftware CD to A<@oracle@#tae !irector% on the #er+er' 3*ot Re5uire!4
Creation o5 contro% 5i%es6
Control file# for the new in#tance name were create! !urin the new in#tance.!ata&a#e creation
proce##, u#in the init3,AD4'ora file'
Creation o5 RED* %og 5i%es
Re!o Lo Cile# > A!! or !rop lo file#'
The alrt3#i!4'lo file can &e u#e! to !etermine how fre5uentl% the lo# are #witchin'
,tan!ar! lo file name i# )ath.3!&name401a'lo where the 01 #tan!# for the roup
num&er
The Da" #tan!# for the occurrence in the roup' Can &e Da", D&", '''
ALTER DATAGA,E 3!&8name4
A!! lofile mem&er Dpath.3!&name401a'lo" to roup 1
ALTER DATAGA,E3!&8name4
J?
Drop lofile mem&er Dpath.3!&name401a'lo"
Arc$iving Log Fi%es
,TART() BO(*T
ALTER DATAGA,E ARC=A7ELO;
ALTER DATAGA,E O)E*
,=(TDO2* *ORBAL
EDAT init3,AD4'ora file
1': LO;8ARC=A7E8,TART Q true
2': LO;8ARC=A7E8DE,T Q i<@pro!@l#tn@archlo# 3 Director% )ath 4
J': LO;8ARC=A7E8CORBAT Q 3!&name4[#'arc [# > #e5uentail num&er
,TART()
ALTER ,-,TEB ,2ATC= LO;CALE 3 Te#t# archi+in feature 4
&pdate t$e *rac%e instance %ist
A!! new in#tance information to Oracle in#tance #prea!#heet< A=L,>
00?@DATA@AAT,@TEABA*CO@DRBTEAB@ORACLE@oraclepo'$l#' Af appropriate, up!ate the
networ1 T*,*ABE,'ORA file# 6u#e! for oracle client runnin off the Dnetwor1" cop%:'
Insta%% Des,top D)A
Collow in#truction# in the in#talation ui!e an! note where the pro!uct i# in#talle!'
To in#tall De#1top DGA on the #er+er 6we ha+e an unlimte! #er+er licen#e:, run A=L,>
00?@DATA@AAT,@TEABA*CO@DRBTEAB@DGA41,7R@!&#etup'e$e'
The client #oftware #houl! not &e in#talle! locall% 6we are limite! to J0 licen#e#:, it #houl! run
from the networ1' The )lant# are allote!.chare! for upto 1 cop% of De#1top DGA' Af the% wi#h
to u#e the tool, in#tall it from AC>01M@(,ER@DATA@DO2*LOAD@DGADE,V
Create vie Ad"A
7iew T!&H i# u#e! &% the monitor #cript to in!icate #er+er, !ata&a#e an! in#tance where the #cript
i# &ein run'
To create T!&H +iew on the #er+er , run A=L,>
00?@DATA@AAT,@TEABA*CO@DRBTEAB@ORACLE@!&8+iew'#5l'
C$ange SYS and SYSTEM passords to @standard'
(1ange additional ids to account loc
,elect u#ername from !&a8u#er#'
,et all u#er# other then #%#tem an! #%# to the followin'
Alter u#er Du#er" i!entifie! &% D!umm% pa##wor!" account loc1L
8ail Safe 9nstallation -oc#mentation 3.3.6 : ;in$ows 500<
JN
(luster -n+iron,ent Na,ing (on+entions2
*o!e A< 6)rimar% ,er+er:
3loc J po# name4!&nnn where nnn i# a J !iit num&er
LCCDGnnn
*o!e G< 6Cailo+er ,er+er:
3loc J po# name4!&nnn where nnn i# a J !iit num&er
LCCDGnnn
Clu#ter *ame<
3plt J po# name4!&nnnCB where nnn i# a J !iit num&er
LCCDGnnnCB
)ro!uction 7irtual *ame<
3loc J po# name4!&nnn where nnn i# a J !iit num&er
LCCDGnnn
Te#t 7irtual *ame<
3loc J po# name4!&nnn where nnn i# a J !iit num&er
LCCDGnnn
Clu#ter ,er+ice Account A!<
America#@#+c3loc J po# name43app i!4Clu#terA!m ,ee 3)a##wor! ,afe4'
E$< ABERACA,@#+cLCC3app i!4Clu#terA!m
Security needed on .ailsa$e Ser+ers2
,%#tem A!mini#trator#< a!! aa>6account or roup:, Clu#ter ,er+ice Account
ora8!&a< a!! aa>6account or roup:, Clu#ter ,er+ice Account 6et# create! a# part of a!!in
pro!uction !ata&a#e to roup in clu#terin proce##:
J9
#irectory setup $or Installation So$t&are3
40
Collowin ,oftware Cile# or Directorie# 6an! lower le+el !irectorie#: nee! to &e copie! from
LCCC,020@!ownloa!@oracle into the#e !irectorie#'
D<@opt@in#tall#@oracle@fail#afe 3OC,8JJ482inY48FY44
D<@opt@in#tall#@oracle@fail#afe8J2&it 3of#JJ4Vit8J2&it8pro!uction4
D<@opt@in#tall#@oracle@#oftware oracle 31020108winY48$Y48!ata&a#e4
D<@opt@in#tall#@oracle@#oftware oracle patch 3pMJJ?01481020J8B,2A*>$NY>Y44
D<@opt@in#tall#@oracle@#oftware oracle patch 3pYY2?41481020J8B,2A*>$NY>Y44
D<@opt@in#tall#@perl 3Acti+e)erl>M'N'N'N22>B,2inJ2>$Y4>2N09M2'm#i4
D<@)roram Cile#@;Eip
Oracle #atabase So$t&are 4o,e Na,e2
Each oracle home i# on a local !i#1 an! re#i!e# on &oth the *ODE A an! *ODE G'
E$' )ro!uction Oracle =ome< OraD&108pro!1
E$' )ro!uction Oracle =ome )ath< D<@oracle@pro!uct@#e10'2'08pro!1
#ri+e Setup2
Production Dri/es%
D< Oracle #oftware &inarie# for !ata&a#e an! fail#afe
E< Data Dri+e 6ta&lepace#, un!o, #%#tem, temp, !ata, in!e$e# etc:
;< Oracle lo file#
=< Gac1up An the e+ent we nee! a !i#1 &ac1up, al#o u#e! for e$port#
A< Archi+e lo#
J< A!min P #cript# to create !ata&a#e, alert lo, &!ump, u!ump, c!ump, pfile etc
&est Dri/es%
D< Oracle #oftware &inarie# for !ata&a#e an! fail#afe
V< Data Dri+e 6ta&lepace#, un!o, #%#tem, temp, !ata, in!e$e# etc:
L< Oracle lo file#
B< Gac1up An the e+ent we nee! a !i#1 &ac1up, al#o u#e! for e$port#
*< Archi+e lo#
O< A!min P #cript# to create !ata&a#e, alert lo, &!ump, u!ump, c!ump, pfile etc
?uorum Dri/e%
K< u#e! for clu#terin function# an! can al#o &e u#e! for other file# nee!in to &e
acce##e! from either #%#tem'
Production '$ode A( E@ample%
41
&est '$ode B( E@ample%
42
Installation o$ !erl So$t&are2
An#tall )erl to #etup the !ata&a#e' Cop% from LCCC,020@!ownloa!@oracle
D<@opt@in#tall#@perl@ Cop% Acti+e)erlM'N'N'N22>B,2A*J2>$Y4>2N09MJ'm#i
3!ou&le clic14 on a&o+e name to in#tall )erl' At will et e$pan!e! to o un!er
D<@)roram Cile#@)erlY4'
,ecurit% 2arnin
3run4
,etup ,creen
3ne$t4
Licen#e Areement
3choo#e4 A accept
3ne$t4
Cu#tom #etup
3&row#e4
Chane current !e#tination fol!er
D<@)roram Cile#@)erlY4
3o14
Cu#tom ,etup
3ne$t4
Choo#e ,etup Option#
Choo#e
A!! )erl to the path en+ironment +aria&le
Create perl file e$ten#ion a##ociation
3ne$t4
Rea!% to An#tall
3in#tall4
3Cini#h4
Install Oracle So$t&are $or 56373635
Collow in#tallation in#truction# in ORCLO)ER'!oc on #harepoint u#in proper #ettin#
Dou&le clic1 D<@opt@in#tall#@oracle@#oftware
oracle@1020108winY48$Y48!ata&a#e@!ata&a#e@#etup'e$e
Oracle So$t&are !atc1 $or 56373638
Collow in#tallation in#truction# in ORCLO)ER'!oc on #harepoint u#in proper #ettin#
Dou&le Clic1
D<@opt@in#tall#@oracle@#oftware oracle patch@pMJJ?01481020J8B,2A*>$NY>Y4@Di#11@#etup'e$e
Oracle O!atc12 997:;5; Installation
Collow in#tallation in#truction# in ORCLO)ER'!oc on #harepoint u#in proper #ettin#
Section A!
set ORACLE_HOME=d:\oracle\product\se10.2.0_prod1
Add opatch bin directory to the path
4J
set PATH=d:\oracle\product\se10.2.0_prod1\opatch;%PATH%
Change directory to where you have extracted the patch
cd 6627414
1 . Cleanly shut down all processes running from the ORACLE_HOME.
This includes Cluster Services, Database , Listener
Use Oracle Cluster Fail Safe (OCFS) manager to take the services offline.
2 . Set the ORACLE_HOME environment variable to the correct Oracle home
that needs to be patched.
> set ORACLE_HOME=<Oracle Home Path>
(example)
set ORACLE_HOME=d:\oracle\product\se10.2.0_prod1
3. Go to the directory where you downloaded the patch:
> cd D:\opt\installs\oracle\patch\p6627414_10203_MSWIN-x86-
64\6627414
4 . Ensure that the directory containing the OPatch script appears in your PATH
setting. Enter the following command to run OPatch:
> opatch apply
Inspect the opatch-<timestamp>.log file generated in %ORACLE_HOME
%\cfgtoollogs\opatch for any errors.
If there are errors, refer to Section 4, "Known Issues". in the readme.html.
NOTE: The following steps can only be done once the database is created.
5 . cd %ORACLE_HOME%/bundle/patch14
Set ORACLE_SID=<sid>
sqlplus /nolog
connect / as sysdba
@catcpu.sql
6. Check for invalid objects by running
select object_name from dba_objects where status = 'INVALID'
if any then run
@?/rdbms/admin/utlprp 0
44
to compile all the objects that are invalid.
Section B%
Commands -sed to Implement Section A!
set ORACLE_HOME=d:\oracle\product\se10.2.0_prod1
set PATH=d:\oracle\product\se10.2.0_prod1\opatch;%PATH%
D: (sets command line prompt to D drive)
cd D:\opt\installs\oracle\oracle software patch\p6627414_10203_MSWIN-
x86-64\6627414
opatch apply
<y>
Oracle Database must be created before following commands can be used.
set ORACLE_SID=<sid>
sqlplus /nolog
connect / as sysdba
01234.5&'2,%t!6172!%t!,4*(8&
Select object_name from dba_objects where status = INVALID;
If any show up run the following.
@?/rdbms/admin/utlprp 0
Select object_name from dba_objects where status = INVALID;
Installation o$ Application Instance & #atabase
Collow application in#tance an! Data&a#e in#truction#' Bu#t pre&uil! on &oth in#tance# if a te#t
+er#ion i# to re#i!e on no!e G'
Turn application archi+in on a!!in !ata&a#e to fail #afe roup or %ou mu#t #top the the clu#ter
manaement to ta1e the !ata&a#e !own to turn archi+in on'
Install )istener and Tnsna,es $iles3
3#tart4
3all proram#4
3ORACLE P OraD&1086pro! or te#t:14
4M
3Confiuration an! Biration Tool#4
3*et Confiuration Banaer4
Li#tener Confiuration 3ne$t4
A!! 3ne$t4
LA,TE*ER 3ne$t4
TC) 3ne$t4
(#e the ,tan!ar! )ort *um&er 1M21 3ne$t4
*o 3ne$t4
Li#tener Confiuration Complete 3ne$t4
3Cini#h4
3Banuall% e!it when complete! with Cail#afe4
A!! mtp18fme# an! mtt18fme# to tn#name#'ora on pro!uction an! a!! mtt18fme# an!
mtp18fme# to tn#name#'ora on te#t'
DO *OT *EED TO DO
Local *et ,er+ice *ame Confiuration 3ne$t4
A!! 3ne$t4
,er+ice *ame 3in#tance name4 3ne$t4
TC) 3ne$t4
=o#t *ame 3e$ 0a$!&00Y4
3u#e the #tan!ar! port num&er 1M214
3ne$t4
*et ,er+ice name 3e$' 0$p28fme#4 3ne$t4
*o 3ne$t4
*et ,er+ice name Confiuration Complete 3ne$t4
3Cini#h4

Ser+ices2
Chane TOracle,er+ice3in#tance4H )ropertie#
,tartup t%pe TAutomaticH
3appl%4
3o14
#OS (o,,and )ine 'Ability to logon*
,5lplu#
. a# #%#!&a
Once the in#tance an! !ata&a#e are &uilt on &oth )ro!uction an! Te#t ,er+er# then Cail ,afe can &e
in#talle!, confiure! an! +erifie!'
.ail Sa$e Installation
D<@opt@oracle@Cail#afe 6cop% OC,8JJ482A*Y48FY4 from another #er+er:
D<@oracle@pro!uct@Of#JJ 6Cail ,afe =ome )ath:
Of#=omeJJ P Oracle Cail ,afe =ome *ame
Dou&le Clic1 on !<@opt@pro!uct@Cail#afe@OC,8JJ482A*Y48FY4@autorun
2elcome #creen
4Y
3ne$t4
,elect An#tallation T%pe
T%pical
3ne$t4
,pecif% =ome Detail#
*ame< Of#=omeJJ
)ath< !<@oracle@pro!uct@Of#JJ
3ne$t4
Re&oot *ee!e! after An#tallation
3ne$t4
,ummar%
3in#tall4
Confiuration A##i#tant#
Enter Oracle ,er+ice# for B,C, Account.)a##wor!
Domain@(#ername< America#@#+cJAFBE,Clu#terA!m
)a##wor!< OOOOOO
Conform )a##wor!< OOOOOO
3o14
En! of An#tallation
3e$it4
3-e#4
.ail Sa$e 87 bit Manager Installation
D<@opt@oracle@Cail#afe8J2&it 6cop% of#JJ4Vit8J2&it8pro!uction from another
#er+er Cail ,afe Banaer:
D<@oracle@pro!uct@Of#JJ8J2&it8mr 6Cail ,afe Banaer =ome )ath:
Of#=omeJJ8J2&it8mr 6fail ,afe Banaer =ome *ame:
Dou&le Clic1 on
D<@opt@pro!uct@Cail#afe@of#JJ4Vit8J2&it8pro!uction@Di#11 JJ48)ro!uction@autorun
2elcome
3ne$t4
,pecif% Cile Location
*ame< Of#=omeJJ8J2&it8mr
)ath !<@oracle@pro!uct@Of#JJ8J2&it8mr
3ne$t4
,elect An#tallation T%pe
Client
3ne$t4
,ummar%
3An#tall4
En! of An#tallation
3e$it4
3%e#4
Repeat &oth fail#afe in#tallation# on *o!e G' (#e the #ame oracle home#'
Veri$ication o$ Oracle .ail Sa$e
Collow in#truction# for +erification in ORCLO)ER'!oc in #harepoint'
4?
Open 2in!ow# Clu#ter A!mini#trator
Choo#e mtl!&004CB
Choo#e mtl!&004 or mtl!&00M 6mu#t !o for &oth:
Choo#e Acti+e ;roup#
3riht clic14 Clu#ter ;roup, *o!e A, *o!e G
3clic14 )ropertie#
A!! all a+aila&le no!e# to preferre! Owner
,tartup Cail,afe Banaer 6Ba% not nee! to !o:
Connect to clu#ter 3plt a&&re+iation:DGnnnCB JAFDG00YCB
(#er *ame< #+cJAFBE,Clu#terA!m
)a##wor!< OOOOOO
Domain< ABERACA,'ARB,TRO*;'COB
3o14
2erify Cluster '$eed to perform on both $odes(
Collow An#truction# J'1 '1 P J'1'Y in the Oracle Cail ,afe An#tallation ;ui!e Rel $'$'$ for
2in!ow#'
Correct an% i##ue# with J'1'J Run 7erif% Clu#ter'
Oracle Cail ,afe manaer
Choo#e BTLDG004CB
E$pan! BTLDG004CB
3riht clic14 BTLDG0nnCB
3+erif% clu#ter4
2erify Stand Alone Database 'Perform on both nodes(
Collow #tep# foun! in Oracle Cail ,afe Concept# an! A!mini#tration ;ui!e Rel $'$'$ for
2in!ow#'
,ection ?'J'2 Confiuration #tep#'
Ci$ an% error# an! re>+erif%'
Oracle Cail ,afe manaer
Choo#e BTLDG004CB
E$pan! BTLDG004CB
E$pan! *o!e#
E$pan! ,tan! Alone
3riht clic14 Data&a#e
3+erif% #tan! alone re#ource4
Addin# Oracle Database to 3roup 'Perform on both $odes(
Collow #tep# foun! in Oracle Cail ,afe Concept# an! A!mini#tration ;ui!e Rel $'$'$ for
2in!ow#'
,ection ?'J'2 Confiuration #tep#'
Af thi# #how# error# correct an! tr% to rea!'
Af it i# #ucce##ful it will perform all the #etup< failo+er to #econ!ar% #er+erL fail &ac1 to
primar% #er+er' Af the proce## #eem# to han in &rinin up the !ata&a#e on the #econ!ar%
#er+er, certain !irectorie# coul! &e mi##in for the #tartup on the #econ!ar% #er+er' E$
4N
!<@oracle@a!min@3in#tance name4@&!ump, c!ump, u!ump' Lea+e the proce## run if %ou
choo#e, a!! the !irectorie# an! the proce## #houl! continue if %ou create all nee!e!
!irectorie#'
Oracle Cail ,afe manaer
Choo#e BTLDG004CB
E$pan! BTLDG004CB
E$pan! *o!e#
E$pan! ,tan! Alone
3riht clic14 Data&a#e
3A!! re#ource ;roup4
Choo#e correct roup )ro!uction or Te#t Depen!in on which #%#tem
%ou are on'
Te#t Cail )ro!uction o+er to Te#t ,er+er
Te#t Cail )ro!uction &ac1 to )ro!uction ,er+er
Te#t Cail Te#t to )ro!uction ,er+er
Te#t Cail Te#t &ac1 to Te#t ,er+er
!rocedures Needed &1en ser+er sent to !lants
2hen ,er+er mo+e! to plant the ip a!!re## chane# #o the followin nee!# to &e !one'
Clu#ter roup mu#t &e on no!e %ou are +erif%in roup on'
(p!atin A) a!!re##
Oracle Cail ,afe manaer
BTLDG004CB.*o!e#.BTLDG004.;roup#.pro!uction or te#t
3riht clic14 3+erif% roup4
2ill up!ate with new A) a!!re##
Repeat on te#t #er+er'
,hut )ro!uction #er+er !own an! te#t that %ou can #till connect to pro!uction !ata&a#e' ,tart
pro!uction #er+er &ac1up' Doe# )ro!uction Data&a#e fail &ac1 to )ro!uction ,er+er or !o %ou
nee! a manual #witch'
Oracle (lient Only Installation Oracle <3736 " %indo&s 7660
,tartup Oracle An#taller u#in #etup'e$e from the Oracle 9'2 2in!ow# Client c!
Oracle =ome *ame > Ora=ome92
Oracle Director% > D<@opt@oracle@ora92
Af onl% in#tallin a# a connection client onl% an! not !e+elopment u#e the followin'
Cu#tom a# runtime !oe# not alwa%# in#tall the ODGC !ri+er#'
Ba1e the followin are chec1e!<
Oracle 9i client 9'2'0'1'0 Thi# i# the hih le+el pro!uct' ;et# chec1e! after fir#t option i# chec1e!'
Oracle *etwor1 (tilitie#
,5lplu#
Oracle JDGC.OCA
49
Oracle JDGC.Thin
Oracle 2in!ow# Anterface# Thi# contain# the ODGC !ri+er#'
C<@)roram Cile#@Oracle@0re1'1'N
)ort 20J0
-ou !o not nee! to run the tool# if %our oin to cop% acro## the tn#name#'ora an! ,KLnet'ora
e$it
Cop% tn#name#'ora an! #5lnet'ora from another client an! mo!if% nee!e! chane#'
Compete!
Oracle Data Base and Instance Operational Commands
Starting &p t$e *rac%e Instance
-ou mu#t connect internal to the Oracle An#tance throuh ,KL)L(,'
#5lplu#
Connect . a# #%#!&a > Certain platform# will prompt for or re5uire an pa##wor!
Ba% nee! to loon connect #%#.3pa##wor!4/lcp8l#tn a# #%#!&a
,TART()
There i# a ,KL #cript that will automate the proce##' Crom the con#ole comman! line t%pe
!<@pro!@hrre@#tartup'#5l' The output can &e foun! in !<@pro!@hrre@#tartup'out' 6 *T :
S$(tting Don t$e *rac%e Instance
-ou mu#t connect internal to the Oracle An#tance throuh ,KL)L(,'
#5lplu#
connect . a# #%#!&a
,=(TDO2* or ,=(TDO2* ABBEDAATE
At i# recommen!e! that ,=(TDO2* ABBEDAATE &e u#e!' Af %ou 0u#t i##ue ,=(TDO2*
Oracle will wait for proce##e# to complete an! (#er# to !i#connect' Thi# will ta1e a while if it
happen# at all' The ,=(TDO2* ABBEDAATE will cau#e Oracle to cancel proce##e# an! &ac1up
uncommite! chane#' At will #hut!own 5uic1l%'
There i# a ,KL #cript that will automate the proce##' Crom the con#ole comman! line t%pe
!<@pro!@hrre@#hut!own'#5l' The output can &e foun! in !<@pro!@hrre@#hut!own'out' Thi# #cript
i##ue# the ,=(TDO2* ABBEDAATE'
Sitc$ing Log Fi%es
#5lplu#
connect . a# #%#!&a
ALTER ,-,TEB ,2ATC= LO;CALE 3 Te#t# archi+in feature 4
)ac,(p Contro% Fi%e
loa! #+rmr or #5lplu#
M0
connect internal or connect . a# #%#!&a
ALTER DATAGA,E CO*TROLCALE TO Dfilename" reu#eL
ALTER DATAGA,E CO*TROLCALE TO TRACEL
The#e comman!# will fir#t ma1e a &inar% cop% of the control file to which %ou #pecif%' ,econ!l%
an a#cii file containin the control file parameter# will &e ma!e' Thi# #econ! file et# place! into
the TRACE !irector% #pecifie! in the init3#i!4'ora file'
B(ery Connected &sers
loa! #+rmr or #5lplu#
connect #%#tem or . a# #%#!&a
enter pa##wor! at the prompt
#elect O from 79,E,,AO*L
At woul! &e ea#ier to i##ue the comman! in De#1Top DGA #o that %ou can pae riht an! left
throuh the output' Two of the ma0or fiel!# are u#ername an! o#u#er' Thi# will #uppl% the Oracle
i! an! the Operatin ,%etem i!' Thi# report will al#o #how null +alue# in u#ername' The#e null
+alue# are #%#tem proce##e#'
1i%%ing Session
An #ome #ituation# %ou ma% nee! to 1ill an actice or inacti+e #e##ion' 2hen a #e##ion i# 1ille! all
uncommite! wor1 i# rolle! &ac1' Collow the followin ,5l comman!# to VALL a ,E,,AO*'
loa! #+rmr or #5lplu#
connect #%#tem or . a# #%#!&a
enter pa##wor! at the prompt
#elect #i!, #erialW, u#ername, o#u#er, #tatu# from +9#e##ionL
A!entif% the #i! an! #erialW of the #e##ion %ou wi#h to 1ill'
ALTER ,-,TEB VALL ,E,,AO* D#i!, #erialW"L
Cor a!!itional information #ee the ,er+er A!mini#trator# ;ui!e 6Villin ,e##ion#: an! ,er+er ,KL
Reference 6ALTER ,-,TEB:'
A(tomating o5 commands6
(#in ,7RB;R %ou can input a #cript an! ha+e Oracle e$ecute the #cript an! clo#e ,7RB;R'
loa! #+rmr comman!Q/path@file'#5l
(#e the ,)OOL comman! to open a #pool file for the output' Af a path i# i+en for the filename, a
D@" mu#t &e u#e! in the path to #eparate !irectorie#' The D." will not wor1' Af %ou 0u#t #pecif% a
filename the file will &e in the orant@r!&m#?2 !irector%'
E$ample of Oracle #cript<
spool d%prodAhrreAhrred8<!out
connect internal
.O Create #tatement for the temporar% #pace hrre!01 O.
create ta&le#pace hrre!01 !atafile
Re<te#t@hrre@!ata@hrre!01a'!&fR #iEe M00m >> ma$ !atafile #iEe Q M00m
M1
!efault #torae 6
initial 122NN >> 6J O 409Y :
ne$t 122NN >> 62 O 409Y :
mine$tent# 1 >> 6 121: initial allocation
ma$e$tent# 121: >> 6 !efault ma$ #iEe Q 6121 O 121: S 121 Q 1'4me for an o&0ect :
L
Oracle BI Installation usin# Oracle -ni/ersal Installer On -$I.
Oracle (ni+er#al in#taller u#e# the F > 2in!ow# capa&ilit% ' ,o %ou #houl! ma1e #ure %our pc.terminal i#
capa&le of runnin F>win!ow# proram#' Then ma1e #ure the 9DA,)LA- +aria&le i# #et properl% &efore %ou in#tall'
Steps
> (#e pf#8mount comman! to mount the c!rom
> o to the mount point an! t%pe oraAn#tall
> Di#pla%# intaller 2in!ow'
> To li#t pro!uct# choo#e An#talle! )ro!uct#
> Cor a new in#tall pre## *e$t
> Enter oracle home'
> Enter (ni$ roup 6 !&a :
> Choo#e cu#tom An#tall
> Li#t the pro!uct#
Products to be selected
> Oracle NA Enterpri#e E!ition N'1'M'0'0
S )ro!uct option#
S Oracle NA ,er+er N'1'M'0'0
S Oracle )ro!uct Option# N'1'M'0'0 6 no nee! for D,,.OLT) #%#tem#:
S Oracle time #erie# N'1'M'0'0
S Oracle 7i#ual Anformation Retrie+al N'1'M'0'0
S Oracle ,patial N'1'M'0'0
S Oracle A!+ance! ,ecurit% N'1'M'0'0
S Oracle interBe!ia N'1'M'0'0
S *et N pro!uct# N'1'M'0'0
S *etN client N'1'M'0'0
S *etN ,er+er N'1'M'0'0
S Oracle utilitie#
S Oracle !ata&a#e utilitie# N'1'M'0'0
S ,5l)lu# N'1'M'0'0
S Oracle confiuration A##i#tant# N'1'M'0'0
S ,er+er Onl%
S Oracle Datamiration a##i#tance N'1'M'0'0
S oracle !ata&a#e confiuration a##i#tance N'1'M'0'0
S De+elopment Tool# N'1'M'0'0
S Oracle Call Anterface N'1'M'0'0
S O&0ect T%pe tran#lator N'1'M'0'0
S Oracle Ja+a )ro!uct# N'1'M'0'0
S Oracle JDGC !ri+er# N'1'M'0'0
S Oracle JDGC OCA !ri+er for JDV 1'1'N'1'M'0'0
> Oracle JDGC OCA !ri+er for JDV 1'0'2'N'1'M'0'0
S Oracle JDGC thin !ri+er for JDV 1'1'N'1'M'0'0
> Oracle JDGC thin !ri+er for JDV 1'0'2'N'1'M'0'0
S Oracle ,KLJ N'1'M'0'0
S Oracle Ja+a tool#
S Oracle Enterpri#e manaer pro!t# N'1'M'0'0 6if %ou wi#h to in#tall enterpri#e mr mo!ule#:
S Oracle intellient aent N'1'M'0'0
M2
S Oracle in#tallation pro!uct#
S An#talla&le component#
S Oracle uni+er#al in#taller
S =)9000 ,erie# =)>(F !ocumentation
Choo#e *e$t
> Choo#e *O to Create Data&a#e
> Choo#e *o to in#tall Gac1up #oftware
*ow it will #how all the pro!uct# to in#tall ' *ow choo#e An#tall' An#tallation ta1e# a&out an hour'
After in#tallin it will a#1 %ou to run 9ORACLE8=OBE.root'#h with #uper u#er pri+ilae'
Clic1 O1 an! %ou will #ee the me##ae TAn#tallation CompleteH
MJ
!enamin* an Oracle 9nstance an$ -ata 8iles
1' ,hut!own the oracle in#tance normall%'
2' E$it ,er+er manaer'
J' A##ue the oraunl! comman!'
Ja' Ba1e a complete &ac1up of all oracle relate! !irectorie#, &oth #oftware an! !ata&a#e'
4' Throuh Bicro#oft 2or! >> !ata1<@oranw?J2@!ata&a#e@init3#i!4'ora
a' Replace 3ol!#i!4 with 3new#i!4 e$' mnp1 with mnt1
&' Chane the !irector% path of the control file# from 3pro!4 to 3te#t4'
c' ,a+e chane# a# init3new#i!4'ora in the !ata1<@oranw?J2@!ata&a#e !irector%'
M' loa! e!it !ata1<@oranw?J2@ncf@confi'ora
a' Chane the in#tance name to 3new#i!4 name' E$ mnp1 to mnt1
&' ,a+e file
Y' loa! e!it !ata1<@oranw?J2@networ1@a!min
a' E!it tn#name#'ora chane all reference# to 3ol!#i!4 to 3new#i!4'
&' ,a+e tn#name#'ora
c' E!it li#tener'ora chane all reference# to 3ol!#i!4 to 3new#i!4'
!' ,a+e li#tener'ora
?' Chane all !irector% name# from 3pro!4 to 3te#t4'
N' Chane 3ol!#i!4 !irector% to 3new#i!4 !irector%'
9' A##ue oraloa!
10 ' Rename pw!3ol!#i!4'ora to pw!3new#i!4'ora'
10a' -ou can create the followin #cript# in notepa! an! #tore on !ata1<mnt1@&atch@alter'#5l an!
alterlo'#5l' An
11' loa! #+rmr
a' connect internal
&' #tartup mount
c' /!ata1<mnt1@&atch@alter'#5l
/!ata1<mnt1@&atch@alterlo'#5l
M4
or
c' alter !ata&a#e
rename
file D!ata1<pro!@0lm#@!ata@0lm##%#a'!&f",
D!ata1<pro!@0lm#@!ata@0lm#r&1a'!&f",
D!ataJ<pro!@0lm#@!ata@0lm#ur1a'!&f",
D!ata2<pro!@0lm#@!ata@0lm#tp1a'!&f",
D!ata1<pro!@0lm#@!ata@0lm#tl1a'!&f",
D!ata2<pro!@0lm#@!ata@0lm#!01a'!&f",
D!ata1<pro!@0lm#@!ata@0lm#!01&'!&f",
D!ataJ<pro!@0lm#@!ata@0lm#i01a'!&f"
to
D!ata1<te#t@0lm#@!ata@0lm##%#a'!&f",
D!ata1<te#t@0lm#@!ata@0lm#r&1a'!&f",
D!ataJ<te#t@0lm#@!ata@0lm#ur1a'!&f",
D!ata2<te#t@0lm#@!ata@0lm#tp1a'!&f",
D!ata1<te#t@0lm#@!ata@0lm#tl1a'!&f",
D!ata2<te#t@0lm#@!ata@0lm#!01a'!&f",
D!ata1<te#t@0lm#@!ata@0lm#!01&'!&f",
D!ataJ<te#t@0lm#@!ata@0lm#i01a'!&f"
L
c' alter !ata&a#e
rename
file D!ata1<pro!@0lm#@lo#@0lm#01a'lo",
D!ata1<pro!@0lm#@lo#@0lm#02a'lo",
D!ata1<pro!@0lm#@lo#@0lm#0Ja'lo",
D!ataJ<pro!@0lm#@lo#@0lm#01&'lo",
D!ataJ<pro!@0lm#@lo#@0lm#02&'lo",
D!ataJ<pro!@0lm#@lo#@0lm#0J&'lo"
to
D!ata1<te#t@0lm#@lo#@0lm#01a'lo",
D!ata1<te#t@0lm#@lo#@0lm#02a'lo",
D!ata1<te#t@0lm#@lo#@0lm#0Ja'lo",
D!ataJ<te#t@0lm#@lo#@0lm#01&'lo",
D!ataJ<te#t@0lm#@lo#@0lm#02&'lo",
D!ataJ<te#t@0lm#@lo#@0lm#0J&'lo"
L
12' Alter !ata&a#e openL
12a' Chane #cript# in !ata1<3new#i!4@&atch to in!icate the new !irector% name#' E$ #tartup'ncf,
#tartup'#5l, ctrl&1up'ncf, ctrl&1up'#5l etc
1J' Gac1up the control file !ata1<3new#i!4@&atch@ctrl&1up'ncf
14' ,hut!own in#tance an! run a full&ac1up'
1M' Chane ,KLO*et Alia#e# on the client machine#'
Oracle Instance *onitorin#
Oracle ha# put toether a roup of #cript# to &e run on an a# nee!e! &a#i#' The purpo#e of the#e #cript# i# to
i+e plant a!mini#trator# #tati#tic# on the ThealthH of their Oracle !ata&a#e !urin a #et time perio! of
hea+% acti+it%' G% re+iewin the output of the#e #cript#, an a!mini#trator will &e a&le to ma1e #%#tem
a!0u#tment# to 1eep their Oracle #er+er runnin #moothl% an! a+oi! poor performance' 2hile the output
from thi# report i# #imilar to the wee1l% monitorin report we !o not nee! a rec%cle of Oracle to ather
correct an! pertinent re#ult#' 2e will a#1 %ou to run the#e utilitie# !urin a pee1 perio! on %our #er+er' Thi#
perio! woul! &e a&out 1 hour in lenth an! will let u# #ee how well Oracle i# performin !urin thi# time
MM
perio!' The wee1l% report ha# the !ata an! re#ult# #prea! o+er a wee1 an! %ou lo#e pee1 wor1loa!
information'
An e$ample of the output i# the roll&ac1 #ement #tati#tic#' The% will in!icate! if the roll&ac1 #ement# are
#iEe! correctl% for %our #%#tem# proce##in' Af %ou #%#tem nee!# more roll&ac1 #ement#' Af the roll&ac1
#ement# are continuall% e$ten!in or #hrin1in in #iEe'
Ba1e the !irectorie# 6if the% !o not alrea!% e$i#t:<
D<@3#i!4@GATC=
To pro!uce the An#tance Bonitor Report<
Crom the con#ole prompt<
)ROB)T<4 D<@3#i!4@GATC=@utl&#tat
thi# will create certain ta&le# in the Oracle !ata&a#e containin #tati#tic# a# of the time %ou ran the
(TLG,TAT'*CC #cript'
Crom the con#ole prompt
)ROB)T<4D<@3#i!4@GATC=@utle#tat
thi# will create another #et of ta&le# in the Oracle !ata&a#e containin en!in re#ult#' Thi# #cript will
compare the ta&le# an! pro!uce a report of the !ifference#' The !ifference# are the acti+it% occurin !urin
the time perio! &etween the two runnin#'
The file >> D<@3#i!4@&atch@report't$t >> #houl! &e printe!, re+iewe! an! file! a# BBDDrpt't$t'
Thi# proce## will &e re5ue#te! &% the DRBTEAB when performin performance an! tunin re5ue#t#'
MY
O!,CL3 4
-,2, =,S3 S3C>!92? 5
I$&ER$AL 7
) as sysdba 7
SCS 7
SCS&E* 7
PER0S&A& 7
3rantin# SELEC& permission to DataDictionary dynamic /ie,s% 7
$A3IOS ) *O$I&OR 7
Permission to Database objects% 7
Schema o,ner 7
Application team batch id 7
-ser IdDs E
O!,CL3 P3!8O!+,NC3 9SS>3S 3
Rule Based /ersus Cost Based Optimiation E
Analye Statistics E
O!,CL3 =,C@>P P!OC3->!3S 7
Bac"up Retention and 0re1uency F
Control 0ile Bac"up F
E@port Retention and 0re1uency G
O!,CL3 !+,N =,C@>P P!OC3->!3S 8O! ;9N-O;S ,N- >N9< 6
Installation H Setup R*A$ H 2eritas G
2eritas Setup G
Settin# up $etBac"up Policy G
R*A$ Setup I
Application Data&a#e ?
Reco+er% Catalo Data&a#e ?
2eritas Bac"up B
Setup in *aestro 6
M?
R*A$ Bac"up Scripts = Dis" Bac"ups for +indo,s '$OCA&ALO3( 6
A!! ,che!ule! Ta#1 for Gac1up to run 9
Gac1up )roce!ure#< 9
Cull &ac1up #cript 9
Te#te! Reco+erie#< 10
ARC,ER7 Cull Di#1 Gac1up#< 10
-,2, =,S3 +,9N23N,NC3 P!OC3->!3S 44
*aintainin# Archi/e Lo# 0iles <<
O!,CL3 !3CO++3N-3- +,9N23N,NC3 SCA3->L3S % CA3C@L9S2S 44
A& scheduler ' $& ( <<
Jnoall A-&O)PRO ' $et,are ( <<
Daily schedule% <<
Daily chec"list% <<
+ee"ly schedule <7
+ee"ly Chec"list% <7
*onthly Chec"list% <7
-9S,S23! !3COB3!? PL,NS 45
R*A$ Database Reco/ery <7
Application Data&a#e 12
Reco+er% Catalo Data&a#e 1J
Duplicate Data&a#e Creation 1M
R*A$ Commands <6
R*A$ Delete Bac"up Reco/ery Catalo# Entries 78
R*A$ Control 0ile Parameters 78
Case < % +hen one or more datafiles are dama#ed! 78
Case 7 % If a redo lo#file is dama#ed! 7<
Case E % If control 0ile is dama#ed! 7<
Af onl% one control file i# !amae!< 21
Af all the control file# are !amae!' 22
Case K % If a Datafile is dama#ed and the bac"up is not a/ailable! 77
Case F % Reco/erin# from -ser Errors 77
Case G % Rebuildin# Complete Oracle Ser/er 7E
O!,CL3 -,2, =,S3 +ON92O!9NC 53
Oracle +indo,s or Oracle -$I. Database *onitorin# 7E
MN
Instance *onitorin# Scripts 7K
An#tallin the Tool 24
Automatin ,tat#pac1 ,tati#tic# ;atherin< 2M
(#in DGB,8JOG 2M
O!,CL3 9NS2,NC3 9NS2,LL,29ON O!,CL3 D.5.0 E >N9< 57
Creatin# a $e, Instance $ame 7G
Anit3#i!4' ora creation 2Y
T*,*ABE,'ora an! LA,TE*ER'ora chane# 2Y
Creation of control files! 7I
Archi/in# Lo# 0iles 7I
-pdate the Oracle instance list H LmasterM &$S$A*ES net,or" file! 7B
Automated Oracle Instance and Listener Startup and Shutdo,n 7B
O!,CL3 9NS2,NC3 9NS2,LL,29ON O!,CL3 40.5.0 E >N9< 5D
C!3,23 2A3 -,2,=,S3 O!,CL3 40.5 30
Chan#e SCSN SCS&E*N and schema o,ner pass,ords to OstandardD! E<
Loc" oracle ids from Installation that are not used E<
-pdate the Oracle instance list H LmasterM &$S$A*ES net,or" file! E<
O!,CL3 CL93N2 ONL? 9NS2,LL,29ON O!,CL3 40.5.0 : ;9N-O;S 500< 35
O!,CL3 9NS2,NC3 9NS2,LL,29ON O!,CL3 D.5.0 : ;9N-O;S 500< 35
Install Oracle soft,are E7
Creatin# Oracle Instance EE
Settin# -p an Instance EE
Create Data&a#e Director% #tructure# JJ
Anit3#i!4' ora creation JJ
Creatin# a Database ser/ice EK
)2D3#i!4'ora creation JM
WWWW,etup *L,8DATE8CORBAT in rei#tr%WWWWW Ba% not nee! to !o' JM
Create ne, instanceDs database EF
Set En/ironment 2ariables EG
Install Client Soft,are on Ser/er EG
&$S$A*ES and LIS&E$ER chan#es EG
Copy Install CD to dis" EI
Creation of control files! EI
M9
Creation of REDO lo# files EI
Archi/in# Lo# 0iles EB
-pdate the Oracle instance list EB
Install Des"top DBA EB
Create /ie, PdbP EB
Chan#e SCS and SCS&E* pass,ords to OstandardD EB
Chan#e additional ids to account loc" EB
8,9L S,83 9NS2,LL,29ON -OC>+3N2,29ON 3.3.6 : ;9N-O;S 500< 31
Cluster En/ironment $amin# Con/entions% E6
Security needed on 0ailsafe Ser/ers% E6
Oracle Database Soft,are Qome $ame% K<
Dri/e Setup% K<
)ro!uction Dri+e#< 41
Te#t Dri+e#< 41
Kuorum Dri+e< 41
)ro!uction 6*o!e A: E$ample< 41
Te#t 6*o!e G: E$ample< 42
Installation of Perl Soft,are% KE
Install Oracle Soft,are for <8!7!8!< KE
Oracle Soft,are Patch for <8!7!8!E KE
Oracle OPatch% GG7IK<K Installation KE
,ection A' 4J
,ection G< 4M
Comman!# (#e! to Amplement ,ection A' 4M
Installation of Application Instance H Database KF
Install Listener and &nsnames files! KF
Ser/ices% KG
DOS Command Line 'Ability to lo#on( KG
0ail Safe Installation KG
0ail Safe E7 bit *ana#er Installation KI
2erification of Oracle 0ail Safe KI
7erif% Clu#ter 6*ee! to perform on &oth *o!e#: 4N
7erif% ,tan! Alone Data&a#e 6)erform on &oth no!e#: 4N
A!!in Oracle Data&a#e to ;roup 6)erform on &oth *o!e#: 4N
Procedures $eeded ,hen ser/er sent to Plants K6
Oracle Client Only Installation Oracle 6!7!8 = +indo,s 788. K6
Y0
O!,CL3 -,2, =,S3 ,N- 9NS2,NC3 OP3!,29ON,L CO++,N-S 70
Startin# -p the Oracle Instance F8
Shuttin# Do,n the Oracle Instance F8
S,itchin# Lo# 0iles F8
Bac"up Control 0ile F8
?uery Connected -sers F<
Jillin# Session F<
Automatin# of commands! F<
!3N,+9NC ,N O!,CL3 9NS2,NC3 ,N- -,2, 89L3S 76
O!,CL3 9NS2,NC3 +ON92O!9NC 77
Y1

Você também pode gostar