10g to 11g upgrade using 11g rat

Post on 18-Aug-2015

292 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

10g to 11g Upgrade Using 11g Rat

TRANSCRIPT

CASE STUDYUsing 11g Real Application Testing to analyse the impact of making the following changes:1) Upgrade the database from 10g to 11g2) Conert from single instance database to a two node RAC database!) Conert from file system based storage to 11g A"#Overview of Real Application Testing$ne of the best new feat%res in $racle 11g is the Real Application Testing option which enables %s to test the res%lt of a change witho%t act%ally implementing the samein a prod%ction enironment& Changes s%ch as database ersion %pgrades' optimi(er changes' hardware and storage changes all carry with them an element of risk and %ncertainty& Using this feat%re m%ch of that %ncertainty and g%esswork can be aoided&Real Application Testing comprises of two components:a) )atabase Replayb) "*+ ,erformance Analy(er -",A) ",A enables %s to test the impact of a change at the leel of a partic%lar "*+ statement to see if any improements or regressions occ%rred in the e.ec%tion of the "*+ statement beca%se of the change& )atabase Replay enables %s to capt%re workload real time in a prod%ction enironment and then replay the same in a clone or copy of the changed prod%ction enironment with the e.act timings' conc%rrency and transaction characteristics fo%ndin the original workload& The A/R comparison and )atabase Replay reports can easily help %s pinpoint any potential problems and errors as well any diergence in performance&This feat%re will afford b%sinesses increased confidence and s%rety when faced with a system change as well as significantly red%cing the costs as well as reso%rces associated with the testing phase&)atabase Capt%re is now s%pported in ersions 0&2&0&1 as well as 10&2&0&! and 10&2&0&2enabling %s to test the impact of %pgrades from both 0i as well as 10g to 11g& 3ote' howeer' that replay can only be performed in a $racle 11g database&At a ery high leel' the database capt%re and replay will inole the following steps:1) ,repare the so%rce database for capt%re2) Capt%re the workload!) Copy the workload capt%re files to the target machine2) ,repare the target database for replay and process capt%red workload files4) "tart the workload replay clients5) $nce the workload replay has finished' e.amine the generated reports and make the analysisScenario/e will be generating some workload in an $racle 10&2&0&2 database -T6"T)7) hosted on A89 with :;" %sing the "wing7ench load generation tool& The tool will sim%late a $rder 6ntry and "hipping application where c%stomers place orders and those orders are processed and then shipped& The tool will generate 24 %ser connections and will r%n for abo%t !4 min%tes going thro%gh the entire transaction cycle& The database capt%re process is initiated before the load generation starts and then the workload is replayed in a two node RAC database -7/)7A) r%nning on A"# storage&Prepare the source 10!0" #ata$ase for capture/e will create a directory to hold the capt%red workload files and then also create a filter so that only database operations of the %ser alter syste set pre_..g_enable_captureD3)'(;Syste altered.Start the Capture processSQL>exec dbs_!or"load_capture.start_capture$'.0205_3*_..g'&'20,3')(_D6)'&/'LL& '(72L'D('+;,L/SQL procedure success#ully copleted.6# !e go to t%e /u02/oradata/capture location !e !ill #ind soe #ilesas s%o!n belo! testdb4/u02/oradata/capture> ls 9ltotal .=9r!9r99r99. oracle dba ;;: Sep .. 0E4:= !cr_5pad0;5002E0u.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:= !cr_cap_000.n.start9r!9r99r99. oracle dba .F0 Sep .. 0E4:= !cr_scapture.!dStart the workload generation using Swingbench testdb4/u0./oracle> cd /u0./oracle/loadgen/s!ingbenc%/bintestdb4/u0./oracle/loadgen/s!ingbenc%/bin>testdb4/u0./oracle/loadgen/s!ingbenc%/bin> export D6S,L0>D.0..0A..0:..A;40.0testdb4/u0./oracle/loadgen/s!ingbenc%/bin> ./s!ingbenc%Started S!ingbenc%& Bersion 2.F.0.522. 'sing con#ig #ile s!ingcon#ig.xl16 1eans Grap% Gersion H2.A.:.F2I (ngine Gersion H2.A.:.F2I6# !e Juery t%e database& !e can see an nuber o# ,L/SQL calls are being ade by t%e 2: connected user sessionsS' 3739999999999 99999999999999999999999999999999999999999999999999999999999999999999999999999999S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.processorders$42&4F+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.processorders$42&4F+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.processorders$42&4F+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seandupdateorders$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.bro!seproducts$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;S*(1(G6/ 4. 4D orderentry.ne!order$42&4F&45+; (/D;2: ro!s selected.6# !e go to t%e 20,3')(_D6) location !e can see a nuber o# 8.rec #iles are also generated. 3%ese are t%e binary !or"load capture #iles.testdb4/u02/oradata/capture> ls 9lrttotal .=9r!9r99r99. oracle dba .F0 Sep .. 0E4:= !cr_scapture.!d9r!9r99r99. oracle dba 0 Sep .. 0E4:= !cr_cap_000.n.start9r!9r99r99. oracle dba ;;: Sep .. 0E4:= !cr_5pad0;5002E0u.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F!2%.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00FsFJ.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F%==.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F%:#.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F5Au.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F00u.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002!0!.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002s=c.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002E5n.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002E.2.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00FsF5.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00Fs00.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00Fn:".rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00FE:5.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00FEF#.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F52n.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F5.".rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002n:n.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002%0%.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002c=".rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002E5=.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s0025FJ.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s0020.J.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s00F%Fc.rec9r!9r99r99. oracle dba 0 Sep .. 0E4:A !cr_5pad0#s002!Fn.rec3%e S!ingbenc% tool %as been con#igured to run #or F: inutes and !ill autoatically logo## t%e 2: S*( user sessions once t%at tie period %as elapsed.Stop the Workload Capture and Generate the AWR export SQL> exec dbs_!or"load_capture.#inis%_capture;,L/SQL procedure success#ully copleted.SQL> declarecapture_id nuber;begin select ax$id+ into capture_id#ro dba_!or"load_captures!%ere status D '2*?,L(3(D'; dbs_!or"load_capture.export_a!r$capture_id+;end;/,L/SQL procedure success#ully copleted.testdb4/u02/oradata/capture> ls 9lrttotal 2::559r!9r99r99. oracle dba .F0 Sep .. 0E4:= !cr_scapture.!d9r!9r99r99. oracle dba ;;: Sep .. 0E4:= !cr_5pad0;5002E0u.rec9r!9r99r99. oracle dbaA. Sep .. 0E4:E !cr_5pad0Jc00Fc2".rec9r!9r99r99. oracle dbaA. Sep .. 0E4:E !cr_5pad0Jc002n00.rec9r!9r99r99. oracle dbaA. Sep .. 0;42. !cr_5pad=0n002sA0.rec9r!9r99r99. oracle dba ;E. Sep .. 0;42F !cr_5pad.tE00202#.rec9r!9r99r99. oracle dba2:5EF; Sep .. 0;42A !cr_5pad0#s00FsF5.rec9r!9r99r99. oracle dba2F55E= Sep .. 0;42A !cr_5pad0#s00F00u.rec9r!9r99r99. oracle dba20EEE5 Sep .. 0;42A !cr_5pad0#s002s=c.rec9r!9r99r99. oracle dba2.=;:5 Sep .. 0;42A !cr_5pad0#s002%0%.rec9r!9r99r99. oracle dba2.0:E= Sep .. 0;42A !cr_5pad0#s002c=".rec9r!9r99r99. oracle dba2220E: Sep .. 0;42A !cr_5pad0#s00Fs00.rec9r!9r99r99. oracle dba2.EA=E Sep .. 0;42A !cr_5pad0#s00F5Au.rec9r!9r99r99. oracle dba2F=02= Sep .. 0;42A !cr_5pad0#s002!Fn.rec9r!9r99r99. oracle dba222=:2 Sep .. 0;42A !cr_5pad0#s002E5n.rec9r!9r99r99. oracle dba2FE5.A Sep .. 0;42A !cr_5pad0#s002E5=.rec9r!9r99r99. oracle dba2F;F=: Sep .. 0;42A !cr_5pad0#s00Fn:".rec9r!9r99r99. oracle dba225E=F Sep .. 0;42A !cr_5pad0#s00F%Fc.rec9r!9r99r99. oracle dba2F0;F5 Sep .. 0;42A !cr_5pad0#s0025FJ.rec9r!9r99r99. oracle dba22AF=E Sep .. 0;42A !cr_5pad0#s0020.J.rec9r!9r99r99. oracle dba2F.:2F Sep .. 0;42A !cr_5pad0#s00F52n.rec9r!9r99r99. oracle dba22=EF= Sep .. 0;42A !cr_5pad0#s00F5.".rec9r!9r99r99. oracle dba22AE.. Sep .. 0;42A !cr_5pad0#s00FsFJ.rec9r!9r99r99. oracle dba222:.0 Sep .. 0;42A !cr_5pad0#s00F%:#.rec9r!9r99r99. oracle dba22F50E Sep .. 0;42A !cr_5pad0#s00FE:5.rec9r!9r99r99. oracle dba22.EE: Sep .. 0;42A !cr_5pad0#s00FEF#.rec9r!9r99r99. oracle dba2F;2:0 Sep .. 0;42A !cr_5pad0#s002n:n.rec9r!9r99r99. oracle dba22;.2: Sep .. 0;42A !cr_5pad0#s002!0!.rec9r!9r99r99. oracle dba25205; Sep .. 0;42A !cr_5pad0#s002E.2.rec9r!9r99r99. oracle dba220AA0 Sep .. 0;42A !cr_5pad0#s00F!2%.rec9r!9r99r99. oracle dba222:.F Sep .. 0;42A !cr_5pad0#s00F%==.rec9r!9r99r99. oracle dba ;EF Sep .. 0;4FF !cr_5padEuc00FE:n.rec9r!9r99r99. oracle dba 200 Sep .. 0;4FF !cr_#capture.!d9r!9r99r99. oracle dba 5A;.= Sep .. 0;4FF !cr_cr.%tl9r!9r99r99. oracle dba 2FE2= Sep .. 0;4FF !cr_cr.text9r!9r99r99. oracle dba 20==A Sep .. 0;4F= !cr_ca.log-rw-r-----1 oracle dba 72007! Sep 11 0"#$ wcr%ca&d'p(repare the target database )or Workload Repla*6n noral circustances& !e !ould %aGe ta"en a bac"up o# t%e source database be#ore !e started t%e load generation and t%en restored t%e bac"up on a test serGer to run t%e replay. 1ut in t%is case& !e are using a pre9created ..g )02 database !it% t%e reJuired S*( sc%ea obKects so t%at t%e replay can be run on t%is. /ote t%at t%e databaseis %aGing t%e 0S? storage as !ell.-e !ill create t%e )eplay directory and t%en oGe all t%e captured !or"load #iles #ro t%e source ac%ine $deGu00A+ to t%e target ac%ine $.0...2.0.2.+. 3%is is one o# t%e nodes in t%e cluster& t%e ot%er node being .0...2.0.22.SQL> create directory replay_dir as '/u0./oracle/replay/';Directory created.SQL> grant read on directory replay_dir to public;Grant succeeded.testdb4/u02/oradata/capture> scp 9rp 8.8 .0...2.0.2.4/u0./oracle/replayoracleL.0...2.0.2.'s pass!ord4!cr_5pad0;5002E0u.rec.00M;;: ..0@1/s 00400!cr_5pad0#s0020.J.rec.00M222@1 222.0@1/s 00400!cr_5pad0#s0025FJ.rec.00M22=@1 22:.:@1/s 00400!cr_5pad0#s002E.2.rec.00M2F=@1 2F=.5@1/s 00400!cr_5pad0#s002E5=.rec.00M2FF@1 2F2.E@1/s 00400!cr_5pad0#s002E5n.rec.00M2.A@1 2.A.5@1/s 00400!cr_5pad0#s002c=".rec.00M20=@1 20:.A@1/s 00400!cr_5pad0#s002%0%.rec.00M2.2@1 2...;@1/s 00400!cr_5pad0#s002n:n.rec.00M2F5@1 2FF.=@1/s 00400!cr_5pad0#s002s=c.rec.00M205@1 205.0@1/s 00400!cr_5pad0#s002!0!.rec.00M225@1 22F.E@1/s 0040.!cr_5pad0#s002!Fn.rec.00M2F0@1 2F0.:@1/s 00400!cr_5pad0#s00F00u.rec.00M22;@1 22;.0@1/s 00400!cr_5pad0#s00F5.".rec.00M222@1 22..:@1/s 00400!cr_5pad0#s00F52n.rec.00M22=@1 22=..@1/s 00400!cr_5pad0#s00F5Au.rec.00M2.5@1 2.F.=@1/s 00400!cr_5pad0#s00FEF#.rec.00M2.A@1 2.=.A@1/s 00400!cr_5pad0#s00FE:5.rec.00M2.E@1 2.E.2@1/s 00400!cr_5pad0#s00F%Fc.rec.00M220@1 2.;.=@1/s 00400!cr_5pad0#s00F%:#.rec.00M2.A@1 2.A.F@1/s 00400!cr_5pad0#s00F%==.rec.00M2.A@1 2.A.F@1/s 00400!cr_5pad0#s00Fn:".rec.00M2F5@1 2FF.E@1/s 00400!cr_5pad0#s00Fs00.rec.00M2.A@1 2.=.;@1/s 0040.!cr_5pad0#s00FsF5.rec.00M25;@1 25E.;@1/s 00400!cr_5pad0#s00FsFJ.rec.00M222@1 222.:@1/s 00400!cr_5pad0#s00F!2%.rec.00M2.=@1 2.:.=@1/s 00400!cr_5pad0Jc002n00.rec.00M A. 0..@1/s 00400!cr_5pad0Jc00Fc2".rec.00M A. 0..@1/s 00400!cr_5pad.tE00202#.rec.00M;E. ..0@1/s 00400!cr_5pad=0n002sA0.rec.00M A. 0..@1/s 00400!cr_5padEuc00FE:n.rec.00M;EF ..0@1/s 00400!cr_ca.dp .00M A0F2@1 =.;?1/s 00400!cr_ca.log .00M 20@120.2@1/s 00400!cr_cr.%tl.00M 5A@15=.E@1/s 00400!cr_cr.text.00M 2F@12F.F@1/s 00400!cr_#capture.!d .00M200 0.2@1/s 00400!cr_scapture.!d .00M.F0 0..@1/s 00400(rocess the workload repla* )iles on target*n t%e ..g target database !e need to process t%e captured !or"load #iles. -e need to do t%is al!ays on t%e ..g side o# t%ings and t%is needs to be done only once. 6n ot%er !ords& !e process once but can replay any ties.SQL> exec dbs_!or"load_replay.process_capture$')(,L0>_D6)'+;,L/SQL procedure success#ully copleted.+atabase Repla*-%ile all t%e steps entioned %ere can be per#ored using t%e D1?S_-*)@L*0D_)(,L0> 0,6& !e !ill deonstrate t%e sae using t%e G'6 ..g (nterprise ?anager $Database 2ontrol and not Grid 2ontrol+-e need to clic" on t%e NSo#t!are and SupportO tab and t%en go to t%eNDatabase )eplayO lin".Since !e %aGe already #inis%ed t%e 2apture -or"load and ,reprocess 2aptured -or"load tas"s& !e need to clic" on t%e )eplay -or"load Go to 3as" $nce we select the ?)8R= in the directoryob@ect drop down list' we find that the page is then pop%lated with the releant capt%re details/e proide a name for the /orkload ReplayAA/e can c%stomise certain options in the workload replay like the database connection strings and the speed at which the replay is done among others& 3ote in this case the tns connect alias is the one that has been enabled for the RAC database proiding for load balancing&%sing the serice ?)8R from the drop down list' we will find that the 10202?T$?11g?R6,+A> task has the stat%s

top related