les04.ppt

download les04.ppt

of 41

Transcript of les04.ppt

  • 8/17/2019 les04.ppt

    1/41

    4Copyright © 2007, Oracle. All rights reserved.

    RAC Database Administration

  • 8/17/2019 les04.ppt

    2/41

    Copyright © 2007, Oracle. All rights reserved.4 - 2

    Objectives

     After completing this lesson, you should e ale to!

    " #se $nterprise %anager cluster dataase pages

    " &efine redo log files in a 'AC environment

    " &efine undo talespaces in a 'AC environment" (tart and stop 'AC dataases and instances

    " %odify initiali)ation parameters in a 'AC environment

    " %anage A(% instances in a 'AC environment

  • 8/17/2019 les04.ppt

    3/41

    Copyright © 2007, Oracle. All rights reserved.4 - *

    Cluster Database Home Page

  • 8/17/2019 les04.ppt

    4/41

    Copyright © 2007, Oracle. All rights reserved.4 - 4

    Cluster Database Home Page

  • 8/17/2019 les04.ppt

    5/41

    Copyright © 2007, Oracle. All rights reserved.4 - +

    Cluster Database Instance Home Page

  • 8/17/2019 les04.ppt

    6/41

    Copyright © 2007, Oracle. All rights reserved.4 -

    Cluster Database Instance Administration Page

  • 8/17/2019 les04.ppt

    7/41Copyright © 2007, Oracle. All rights reserved.4 - 7

    Cluster Home Page

  • 8/17/2019 les04.ppt

    8/41Copyright © 2007, Oracle. All rights reserved.4 -

    The Configuration Section

  • 8/17/2019 les04.ppt

    9/41Copyright © 2007, Oracle. All rights reserved.4 -

    The Configuration Section

  • 8/17/2019 les04.ppt

    10/41Copyright © 2007, Oracle. All rights reserved.4 - /0

    Topolog !ie"er 

  • 8/17/2019 les04.ppt

    11/41Copyright © 2007, Oracle. All rights reserved.4 - //

    #nterprise $anager Alerts and RAC

  • 8/17/2019 les04.ppt

    12/41Copyright © 2007, Oracle. All rights reserved.4 - /2

    #nterprise $anager $etrics and RAC

  • 8/17/2019 les04.ppt

    13/41Copyright © 2007, Oracle. All rights reserved.4 - /*

    #nterprise $anager $etrics and RAC

  • 8/17/2019 les04.ppt

    14/41Copyright © 2007, Oracle. All rights reserved.4 - /4

    #nterprise $anager Alert Histor and RAC

  • 8/17/2019 les04.ppt

    15/41Copyright © 2007, Oracle. All rights reserved.4 - /+

    #nterprise $anager %lac&outs and RAC

  • 8/17/2019 les04.ppt

    16/41Copyright © 2007, Oracle. All rights reserved.4 - /

    Redo 'og (iles and RAC

    …RAC01.THREAD=1RAC02.THREAD=2

    SP(I'#

    Shared storage

    )roup *

    Thread *

    +ode1

    RAC,*

    +ode2

    RAC,-

    )roup -

    )roup .

    )roup /

    Thread -

    )roup 0

     ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4; ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5;

     ALTER DATABASE ENABLE THREAD 2;

  • 8/17/2019 les04.ppt

    17/41Copyright © 2007, Oracle. All rights reserved.4 - /7

    Automatic 1ndo $anagement and RAC

    …RAC01.UNDO_TABLESPACE=und!"#$RAC02.UNDO_TABLESPACE=und!"#2

     ALTER S%STE& SET UNDO_TABLESPACE=und!"#$ SID='RAC01';

    undotbs.

    +ode1

    RAC,*

    +ode2

    RAC,-

    undotbs*

    SP(I'#

    undotbs-

    Shared storage

    Transaction recover

    Pendingoffline

    Consistent reads

  • 8/17/2019 les04.ppt

    18/41Copyright © 2007, Oracle. All rights reserved.4 - /

    Starting and Stopping RAC Instances

    " %ultiple instances can open the same dataase

    simultaneously.

    " (hutting don one instance does not interfere ith other

    running instances.

    " SHUTDOWN TRANSACTIONAL LOCAL does not ait for otherinstances1 transactions to finish.

    " 'AC instances can e started and stopped y using!

      $nterprise %anager 

      (erver Control 3SRVCTL utility  (568lus

    " (hutting don a 'AC dataase means shutting don all

    instances accessing the dataase.

  • 8/17/2019 les04.ppt

    19/41Copyright © 2007, Oracle. All rights reserved.4 - /

    Starting and Stopping

    RAC Instances "ith S2'3Plus

    (#!)*+,)-n01/ ) ORACLE_SIDRACDB1#3--u# ,# #6#d",S7L8 #!,+!uS7L8 #u!d9n

    (#!)*+,)-n02/ ) ORACLE_SIDRACDB2#3--u# ,# #6#d",S7L8 #!,+!uS7L8 #u!d9n

    (#!)*+,)-n01/ #3--u# ,# #6#d",S7L8 #!,+!uS7L8 #u!d9nS7L8 )nn)! #6#+,)-:RACDB2 ,# #6#d",S7L8 #!,+!uS7L8 #u!d9n

    OR

  • 8/17/2019 les04.ppt

    20/41Copyright © 2007, Oracle. All rights reserved.4 - 20

    Starting and Stopping

    RAC Instances "ith SRCTL

    " start/stop synta9!

    " $9amples!

    #+db_name8 * >inst_name_list8 (* n?un!n?un!n+?,-!+,n#,)!n,-??d,!,"+!8/(*) >connect_str 8 *3/

    #+

  • 8/17/2019 les04.ppt

    21/41Copyright © 2007, Oracle. All rights reserved.4 - 2/

    S"itch %et"een the Automatic

    and $anual Policies

    #+

  • 8/17/2019 les04.ppt

    22/41Copyright © 2007, Oracle. All rights reserved.4 - 22

    RAC Initiali4ation Parameter (iles

    "  An SPFILE is created if you use the &:CA.

    " ;he SPFILE must e created on a shared volume or shared

    ra device.

    "  All instances use the same SPFILE.

    "

  • 8/17/2019 les04.ppt

    23/41Copyright © 2007, Oracle. All rights reserved.4 - 2*

    SPFILE Parameter !alues and RAC

    " =ou can change parameter settings using the ALTER

    SYSTEM SET command from any instance!

    " SPFILE entries such as!

      *. apply to all instances

      . apply only to

      . ta>es precedence over *.

    " #se current or future *. settings for !

    " 'emove an entry from your SPFILE!

     ALTER S%STE& RESET >d  pname8 SCOPE=SPFILE #d='>sid 8';

     ALTER S%STE& RESET >dpname8 SCOPE=&E&OR% #d='>sid 8';

     ALTER S%STE& SET >dpname8 SCOPE=&E&OR% #d='>sid 8';

  • 8/17/2019 les04.ppt

    24/41Copyright © 2007, Oracle. All rights reserved.4 - 24

    #$ and SPFILE Parameter !alues

    SCOPE=&E&OR%

  • 8/17/2019 les04.ppt

    25/41Copyright © 2007, Oracle. All rights reserved.4 - 2+

    #$ and SPFILE Parameter !alues

    SCOPE=SPFILE

    SCOPE=BOTH

  • 8/17/2019 les04.ppt

    26/41

    Copyright © 2007, Oracle. All rights reserved.4 - 2

    RAC Initiali4ation Parameters

  • 8/17/2019 les04.ppt

    27/41

    Copyright © 2007, Oracle. All rights reserved.4 - 2

    Parameters That Re6uire Identical Settings

    " ACTIVEINSTANCECOUNT

    " ARCHIVELA!TAR!ET" COMPATI"LE" CLUSTERDATA"ASE/CLUSTERDATA"ASEINSTANCE" CONTROLFILES" D""LOC#SI$E

    " D"DOMAIN" D"FILES" D"NAME" D"RECOVERYFILEDEST/D"RECOVERYFILEDESTSI$E" D"UNI%UENAME" INSTANCETYPE" PARALLELMA&SERVERS" REMOTELO!INPASSWORDFILE" MA&COMMITPROPA!ATIONDELAY" TRACEENA"LED" UNDOMANA!EMENT

  • 8/17/2019 les04.ppt

    28/41

    Copyright © 2007, Oracle. All rights reserved.4 - 2

    Parameters That Re6uire 1ni6ue Settings

  • 8/17/2019 les04.ppt

    29/41

    Copyright © 2007, Oracle. All rights reserved.4 - *0

    2uiescing RAC Databases

    " #se the ALTER SYSTEM %UIESCE RESTRICTED statement

    from a single instance!

    " ;he dataase cannot e opened y other instances after the

    ALTER SYSTEM %UIESCE( statement starts.

    " ;he ALTER SYSTEM %UIESCE RESTRICTED and ALTER

    SYSTEM UN%UIESCE statements affect all instances in a

    'AC environment." Cold ac>ups cannot e ta>en hen the dataase is in a

    ?uiesced state.

    S7L8 ALTER S%STE& 7UIESCE RESTRICTED;

  • 8/17/2019 les04.ppt

    30/41

    Copyright © 2007, Oracle. All rights reserved.4 - */

    Terminating Sessions on a Specific Instance

    S7L8 SELECT SID@ SERIAL@ INST_ID  2 FRO& GSESSION HERE USERNA&E='F';

      SID SERIAL INST_ID********** ********** **********  140 $$40 2

    S7L8 ALTER S%STE& JILL SESSION '140@$$40@:2';

    S6#!? ,-!+d.

    S7L8 

     ALTER S%STE& JILL SESSION '140@$$40@:2'ERROR ,! -n 1

    ORA*000$1 ###n ?,+Kd + K--

  • 8/17/2019 les04.ppt

    31/41

    Copyright © 2007, Oracle. All rights reserved.4 - *2

    Ho" S2'3Plus Commands Affect Instances

    S2'3Plus Command Associated Instance

     ARCHIE LOG )enerall affects the current instance

    CONNECT Affects the default instance if no instance isspecified in the CONNECT command

    HOST Affects the node running the S2'3Plus session

    RECOER  Does not affect an particular instance7 but ratherthe database

    SHO PARA&ETER  andSHO SGA 

    Sho" the current instance parameter and S)Ainformation

    STARTUP andSHUTDON

    Affect the current instance

    SHO INSTANCE Displas information about the current instance

  • 8/17/2019 les04.ppt

    32/41

    Copyright © 2007, Oracle. All rights reserved.4 - **

    +ode1

    Transparent Data #ncrption and 8allets in RAC

    " One allet shared y all instances on shared storage!

      @o additional administration re?uired

    " One copy of the allet on each local storage!

      6ocal copies need to e synchroni)ed each time master >ey is

    changed

     ALTER S%STE& SET ENCR%PTION JE%

    8allet

    $aster &es

    +ode2

    8allet

    $aster &e

    +oden

    8allet

    $aster &e

    $anual cop

    $anualcop

    *

    -

  • 8/17/2019 les04.ppt

    33/41

    Copyright © 2007, Oracle. All rights reserved.4 - *4

    AS$9 )eneral Architecture

    AS$

    instance

    SID:;AS$*

    AS$

    instance

    SID:;AS$-

    AS$ dis&s AS$ dis&s AS$ dis&s AS$ dis&s AS$ dis&s AS$ dis&s

    AS$ dis& group Tom AS$ dis& group %ob AS$ dis& group Harr

    D%instance

    SID:sales*

    D%

    instance

    SID:test*

    D%instance

    SID:sales-

    D%

    instance

    SID:test-

    AS$%

    AS$%

    ()

    () ()

    ()

    Node2 Node1 )roup Services

    tom:;AS$*bob:;AS$*

    harr:;AS$*

    )roup Services

     tom:;AS$-bob:;AS$-

    harr:;AS$-

    D%80 

    D%80 D%80 

    D%80 AS$%

    R%A' R%A'

    AR%0 

    AR% A

    …AR%0 

    AR% A

    AS$%

    R%A'

    R%A' R%A'

    R%A'

    )$O+)$O+

  • 8/17/2019 les04.ppt

    34/41

    Copyright © 2007, Oracle. All rights reserved.4 - *

    AS$ Instance and Crash Recover in RAC

    Dis& group A

    +ode2

    ;AS$-

    +ode1

    ;AS$*

    %oth instances mount

    dis& group

    Dis& group A

    +ode2

    ;AS$-

    +ode1

    ;AS$*

    AS$ instance failure

    Dis& group A

    +ode2

    ;AS$-

    +ode1

    Dis& group repaired

    b surviving instance

    Dis& )roup A

    +ode2

    ;AS$-

    +ode1

    ;AS$*

    Onl one instance

    mounts dis& group

    Dis& )roup A

    +ode2

    ;AS$-

    +ode1

    ;AS$*

    AS$ instance failure

    Dis& )roup A

    +ode2

    ;AS$-

    +ode1

    Dis& group repaired

    "hen ne

  • 8/17/2019 les04.ppt

    35/41

    Copyright © 2007, Oracle. All rights reserved.4 - *7

    AS$ Instance Initiali4ation Parameters and RAC

    " CLUSTERDATA"ASE! ;his parameter must e set to TRUE.

    " ASMDIS#!ROUP!

      %ultiple instances can have different values.

      (hared dis> groups must e mounted y each A(% instance.

    " ASMDIS#STRIN!!

      %ultiple instances can have different values.

      ith shared dis> groups, every instance should e ale to

    see the common pool of physical dis>s.

    " ASMPOWERLIMIT! %ultiple instances can have differentvalues.

  • 8/17/2019 les04.ppt

    36/41

    Copyright © 2007, Oracle. All rights reserved.4 - *

    AS$ and SRCTL "ith RAC

    " SRVCTL enales you to manage A(% from an Oracle

    Clusterare 3OC perspective!

       Add an A(% instance to OC.

      $nale an A(% instance for OC automatic restart.

      (tart up an A(% instance.  (hut don an A(% instance.

      &isale an A(% instance from OC automatic restart.

      'emove an A(% instance configuration from the OC'.

      Bet some status information.  (et A(% instance dependency to dataase instance.

    " ;he &:CA allos you to create A(% instances as ell as

    helps you to add and enale them ith OC.

  • 8/17/2019 les04.ppt

    37/41

    Copyright © 2007, Oracle. All rights reserved.4 - *

    AS$ and SRCTL "ith RAC9 #

  • 8/17/2019 les04.ppt

    38/41

    Copyright © 2007, Oracle. All rights reserved.4 - 40

    AS$ Dis& )roups "ith #$ in RAC

  • 8/17/2019 les04.ppt

    39/41

    Copyright © 2007, Oracle. All rights reserved.4 - 4/

    Dis& )roup Performance Page and RAC

  • 8/17/2019 les04.ppt

    40/41

    Copyright © 2007, Oracle. All rights reserved.4 - 42

    Summar

  • 8/17/2019 les04.ppt

    41/41

    Practice /9 Overvie"

    ;his practice covers manipulating redo threads.