89
Oracle 10gR2 RAC: Instalação Ricardo Portilho Proni [email protected] 1

Oracle 10gR2 RAC: Instalação

Embed Size (px)

DESCRIPTION

Oracle 10gR2 RAC: Instalação

Citation preview

Page 1: Oracle 10gR2 RAC: Instalação

Oracle 10gR2 RAC: Instalação

Ricardo Portilho Proni

[email protected]

1

Page 2: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Cursos Hands On

2

Page 3: Oracle 10gR2 RAC: Instalação

Aprendizado• Visão: 5%• Audição: 8%• Visão e Audição: 12%• Execução: 22%• Execução com erro: 42%

E 50% é perdido em 2 anos...

3

Page 4: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Cursos Nerv

4

Page 5: Oracle 10gR2 RAC: Instalação

Cursos NervOracle 11gR2: Backup & Recovery (3 Sábados)

RMAN 11gR2 - ConfiguraçãoRMAN 11gR2- BackupRMAN 11gR2 - RecoveryRMAN 11gR2 - Avançado

Oracle 11gR2: Performance Diagnostics & Tuning (3 Sábados)Oracle Event InterfaceOLTP Performance TuningDW Performance Tuning

Oracle 11gR2: RAC REAL (3 Sábados)Instalação / Configuração / Administração / Performance Tuning

Oracle 11gR2: Data Guard REAL (3 Sábados)Instalação / Configuração / AdministraçãoSwitch Over / Switch Back / Failover

5

Page 6: Oracle 10gR2 RAC: Instalação

Diferenciais Cursos únicos no mercado. Material impresso e digital. Contrato e Nota fiscal. Facilidade no pagamento. Estacionamento grátis. Análise no ambiente do Cliente (Treinamento In Company). Carta de recomendação do Instrutor.

6

Page 7: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Instrutor

7

Page 8: Oracle 10gR2 RAC: Instalação

Instrutor

• Com cerca de 20 anos de experiência profissional, já trabalhou em grande parte dos maiores bancos de dados Oracle do Brasil.

• É atualmente o Coordenador do CES – Centro de Excelência Solvo, unidade dedicada às atividades de consultoria, arquitetura, pré-venda e suporte 3o. Nível da Solvo S/A, empresa especializada na implementação e suporte de ambientes de missão crítica e atuação em toda a América Latina.

• Foi eleito pela Oracle Corporation um Oracle ACE Member, um dos maiores especalistas do mundo em tecnologia de banco de dados. Também foi palestrante do V ENPO (Encontro Nacional de Profissionais Oracle), sobre Load Balance em RAC, conselheiro do GPO (Grupo de Profissionais Oracle), e escritor regular de artigos para a revista SQL Magazine.

8

Page 9: Oracle 10gR2 RAC: Instalação

Instrutor

Certificações

• Oracle ACE

• Oracle Database 10g Administrator Certified Associate

• Oracle Database 10g Administrator Certified Professional

• Oracle Database 10g: RAC Administrator Certified Expert

• Oracle Database 10g: Managing Oracle on Linux Certified Expert

• Microsoft Certified Professional

• Microsoft Certified Database Administrator

• Microsoft Certified Technology Specialist: SQL Server 2005

• Microsoft Certified IT Professional: Database Administrator

• Certified MySQL Database Administrator

• IBM Certified Database Associate

• IBM Certified Database Administrator

• Sybase Adaptive Server Administrator Associate

9

Page 10: Oracle 10gR2 RAC: Instalação

Alunos

10

Page 11: Oracle 10gR2 RAC: Instalação

Alunos

• Se apresente.

• Trabalha, estuda?

• Comente sua experiência com Oracle.

• Diga algo interessante sobre você.

11

Page 12: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

RAC – Conceitos

12

Page 13: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Por que RAC?

• Disponibilidade

• Escalabilidade

• Custo Total de Propriedade (TCO)

13

Page 14: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Database / Instance1 Database x N Instances+ Background Processes+ daemonsOCRVoting Disk

Oracle Parallel Server (6.0.35 – VAX / VMS)

PCM (<8i) x Cache Fusion I (8i) x Cache Fusion II (9i)

Diferenças entre 9i e 10gR2 Oracle Clusterware VIP - Virtual IP ASM - Automatic Storage management FAN - Fast Application Notification Database Services AWR, ADDM, ASH, Scheduler, Enterprise Manager Cluster Verification Utility

14

Page 15: Oracle 10gR2 RAC: Instalação

User sets up the

Hardware,

network & storage

Sets up OCFS

( OPT )

Installs

Oracle Clusterware

Installs

RAC

Configures

RAC DB

-post hwos

-post cfs

-post crsinst

-pre crsinst

-pre dbinst

-pre dbcfg

-pre cfs

Cluster Verification Utility

15

Page 16: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

I - Hardware

16

Page 17: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

17

Page 18: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

18

Page 19: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB I – Criação da VM

Hands On !

19

Page 20: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Criação da Máquina Virtual

- Virtual Machine Configuration: Custom - Guest Operating System: Linux, Red Hat Enterprise Linux 4 - Virtual Machine Name: RAC1 - Acess rights: Make this virtual machine private - Virtual machine account: User that powers on the virtual machine - Processors: One - Memory: 512 MB - Network: Use host-only networking - I/O adapter types: LSI Logic - Virtual Disk Type: SCSI - Disk capacity: 20GB, Split disk into 2 GB files - Disk file: RAC1.vmdk

Após criação - Editar CD-ROM para usar ISO - Adicionar mais uma Ethernet, Host-only

20

Page 21: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB I – Criação da VM

Hands Off !

21

Page 22: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

II – Sistema Operacional

22

Page 23: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

SOs suportados para RAC Oracle 10gR2

Unix• AIX 5 (64)• Solaris (SPARC, x86, x86-64)• HP-UX (RISC, Itanium)• HP OpenVMS• HP Tru64

Windows• Windows (x86, x86-64, Itanium)

Linux (x86, x86-64, Itanium, POWER)• Red Hat Enterprise Linux (4, 5)• Oracle Enterprise Linux (4, 5)• SUSE Linux Enterprise 10• Asianux 3.0

Mainframe• z/OS (OS/390, zSeries Based Linux)

23

Page 24: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Linux: Limites

RAM• x86: 64 GB• X86-64: 128 GB (1 TB teórico)• Itanium 64: 256 GB (1024 TB teóricos)• HP OpenVMS• HP Tru64

Kernel 2.4.x• Limite de 256 Hard Disks• Limite de Partições de 2TB• Limite de 16 GB para x86• Roda bem com até 4 CPUs.

Kernel 2.6.x• Melhor desempenho de I/O• Novas configurações de I/O• Suporte nativo a Asyncronous I/O e Direct I/O• Melhorias da Memória Virtual• Roda bem até com mais de 32 CPUs

24

Page 25: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB II – Instalação CentOS 4.7

Hands On !

25

Page 26: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Instalação do CentOS 4.7 – Passo 1 de 4

- CD Found* [Skip]

- Language Selection* [English]

- Keyboard Configuration* [Brazilian (ABNT2)]

- Installation Type* [Custom]

- Disk Partitioning Setup* [Manually Partition with Disk Druid]* [Yes]

- Disk Setup/ = 18410 MB, ext3swap = 2063 MB

26

Page 27: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Instalação do CentOS 4.7 – Passo 2 de 4

- Boot Loader ConfigurationNão altere nada...

- Network Configuration:* Set the hostname

* [manually]: rac1.localdomain

* IP Address eth0: 192.168.?.101, netmask 255.255.255.0* IP Address eth1: 192.168.?+1.101, netmask 255.255.255.0* Gateway: 192.168.?.1* Primary DNS: 192.168.?.1

- Firewall Configuration* [No firewall]* Enable SELinux? [Disabled]* Proceed

- Additional Language Support* Não altere nada...

27

Page 28: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Instalação do CentOS 4.7 – Passo 3 de 4

- Time Zone Selection* America/Sao_Paulo

- Set Root Password

* tws@123* tws@123

- Package Group Selection* X Window System* GNOME Desktop Environment* Editors* Graphical Internet* Server Configuration Tools* FTP Server* Development Tools* Legacy Software Development* Administration Tools* System Tools

(Deixe apenas estes grupos de pacotes marcados)

28

Page 29: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Instalação do CentOS 4.7 – Passo 4 de 4

Após o primeiro boot:

- Welcome* [Next]

- License Agrrement* [Next]

- Date and Time* [Next]

- Display* [Next]

- System User* [Next]* [Continue]

- Additional CDs* [Next]

- Finish Setup* [Next]

29

Page 30: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB II – Instalação CentOS 4.7

Hands Off !

30

Page 31: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração Linux

NTP

Hangcheck-Timer

Huge Pages

Kernel Parameters• kernel.sem (semmsl)• kernel.sem (semmns)• kernel.sem (semopm)• kernel.sem (semmni)• kernel.shmall• kernel.shmmax• kernel.shmmni• fs.file-max• net.core.rmem_default• net.core.rmem_max• net.core.wmem_default• net.core.wmem_max• net.ipv4.ip_local_port_range

31

Page 32: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB III – Configuração

CentOS 4.7

Hands On !

32

Page 33: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 1 de 10

Executar como root:mount /dev/hdccd /media/cdrom/CentOS/RPMSrpm -Uvh openmotif-2*rpm -Uvh openmotif21*rpm -Uvh libaio-0*rpm -Uvh libaio-devel*rpm -Uvh rsh-server-*

33

Page 34: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 2 de 10

Editar o arquivo /etc/sysctl.conf e acrescentar:kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmem_max=262144

34

Page 35: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 3 de 10

Editar o arquivo /etc/security/limits.conf e acrescentar:* soft nproc 2047* hard nproc 16384* soft nofile 1024* hard nofile 65536

Editar o arquivo /etc/pam.d/login e acrescentar:session required /lib/security/pam_limits.so

35

Page 36: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 4 de 10

Executar como root:touch /etc/hosts.equivchmod 600 /etc/hosts.equivchown root:root /etc/hosts.equiv

Editar o arquivo /etc/hosts.equiv e acrescentar:+rac1 oracle+rac2 oracle+rac1-priv oracle+rac2-priv oracle

Editar o arquivo /etc/xinetd.d/rsh e trocar o “YES” por “NO”: disable = NO

Editar o arquivo /etc/xinetd.d/rlogin e trocar o “YES” por “NO”: disable = NO

36

Page 37: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 5 de 10

Editar o arquivo /etc/hosts e acrescentar:192.168.?.101 rac1.localdomain rac1192.168.?.102 rac2.localdomain rac2192.168.?+1.101 rac1-priv.localdomain rac1-priv192.168.?+1.102 rac2-priv.localdomain rac2-priv192.168.?.111 rac1-vip.localdomain rac1-vip192.168.?.112 rac2-vip.localdomain rac2-vip

Executar como root:chmod +x /etc/rc.d/rc.local

Editar o arquivo /etc/rc.d/rc.local e acrescentar:chown oracle:dba /dev/raw/raw*chmod 660 /dev/raw/raw*

37

Page 38: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 6 de 10

Executar como root:chkconfig anacron offchkconfig arptables_jf offchkconfig atd offchkconfig autofs offchkconfig cpuspeed onchkconfig cups offchkconfig cups-config-daemon offchkconfig gpm offchkconfig haldaemon onchkconfig iptables offchkconfig irqbalance onchkconfig isdn offchkconfig kudzu onchkconfig lvm2-monitor off

38

Page 39: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 7 de 10

Executar como root:chkconfig mdmonitor offchkconfig messagebus onchkconfig microcode_ctl offchkconfig netfs offchkconfig nfslock offchkconfig pcmcia offchkconfig portmap offchkconfig rawdevices onchkconfig readahead offchkconfig readahead_early offchkconfig rhnsd offchkconfig rpcgssd offchkconfig rpcidmapd offchkconfig sendmail offchkconfig smartd off

39

Page 40: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 8 de 10

Executar como root:groupadd oinstallgroupadd dbagroupadd operuseradd -g oinstall -G dba oraclemkdir -p /u01/crs/oracle/product/10.2.0/crsmkdir -p /u01/app/oracle/product/10.2.0/db_1mkdir -p /u01/oradatachown -R oracle:oinstall /u01passwd oracle

(Coloque como senha do usuário oracle: tws@123)

40

Page 41: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 9 de 10

Como usuário oracle, edite o arquivo /home/oracle/.bash_profilee acrescente no final do arquivo:

export TMP=/tmp; export TMPDIR=$TMPexport ORACLE_BASE=/u01/app/oracleexport CRS_HOME=$ORACLE_BASE/product/10.2.0/crsexport ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1export ORACLE_SID=ORCL1export ORACLE_TERM=xtermexport PATH=$ORACLE_HOME/bin:$CRS_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport CLASSPATHif [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi

41

Page 42: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração do CentOS 4.7 – Passo 10 de 10

Executar como root:cdumount /media/cdrom

No Vmware, configurar VM para usar o CD Físico - VM → Install Vmware Tools → Install

Executrar como root:mount /dev/hdcrpm -ivh /media/cdrom/VMwareTools-1.0.*.rpm

Executar como root, no ambiente gráfico:vmware-config-tools.pl

(Aceitar todas opções default.)

vmware-toolbox (Selecionar “Time syncronization...”)

halt

42

Page 43: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB III – Configuração

CentOS 4.7

Hands Off !

43

Page 44: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

III – Shared Disks

44

Page 45: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

RAW Devices (Irá ser descontinuado para dados...)• Plataformas: Todas• Arquivos não suportados: Software, Dump, Recovery

NFS• Plataformas: Linux, Solaris SPARC• Arquivos não suportados: Nenhum

LVM• Plataformas: HP-UX, HP Tru64 UNIX, Solaris SPARC Arquivos não suportados: Nenhum

Certified Vendor CFS (Caro...)• Plataformas: AIX, HP Tru64 UNIX, Solaris SPARC• Arquivos não suportados: Nenhum

OCFS2 (Deve ser descontinuado...)• Plataformas: Windows, Linux• Arquivos não suportados: Nenhum

ASM• Plataformas: Todas• Arquivos não suportados: CRS, Voting Disk, Software, Dump

45

Page 46: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB IV – Criar Raw Devices

Hands On !

46

Page 47: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 1 de 9

- Desligar RAC1 - No VMware, clique em Edit Virtual Machine Settings - Virtual Machine Settings

* Add - Add Hardware Wizard

* Next - Hardware Type

* Hard Disk - Select a Disk

* Create a Virtual Disk - Select a Disk Type

* SCSI - Specify Disk Capacity

* Disk size: 10 GB* [ ] Allocate all disk space now* [x] Split disk into 2 GB files

- Specify Disk File* C:\Virtual Machines\Shared\ocr.vmdk

- Advanced* Virtual device node: SCSI 1:1* [x] Independent* [x] Persistent

47

Page 48: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 2 de 9

- No VMware, clique em Edit Virtual Machine Settings - Virtual Machine Settings

* Add - Add Hardware Wizard

* Next - Hardware Type

* Hard Disk - Select a Disk

* Create a Virtual Disk - Select a Disk Type

* SCSI - Specify Disk Capacity

* Disk size: 10 GB* [ ] Allocate all disk space now* [x] Split disk into 2 GB files

- Specify Disk File* C:\Virtual Machines\Shared\votingdisk.vmdk

- Advanced* Virtual device node: SCSI 1:2* [x] Independent* [x] Persistent

48

Page 49: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 3 de 9

- No VMware, clique em Edit Virtual Machine Settings - Virtual Machine Settings

* Add - Add Hardware Wizard

* Next - Hardware Type

* Hard Disk - Select a Disk

* Create a Virtual Disk - Select a Disk Type

* SCSI - Specify Disk Capacity

* Disk size: 10 GB* [ ] Allocate all disk space now* [x] Split disk into 2 GB files

- Specify Disk File* C:\Virtual Machines\Shared\asm1.vmdk

- Advanced* Virtual device node: SCSI 1:3* [x] Independent* [x] Persistent

49

Page 50: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 4 de 9

- No VMware, clique em Edit Virtual Machine Settings - Virtual Machine Settings

* Add - Add Hardware Wizard

* Next - Hardware Type

* Hard Disk - Select a Disk

* Create a Virtual Disk - Select a Disk Type

* SCSI - Specify Disk Capacity

* Disk size: 10 GB* [ ] Allocate all disk space now* [x] Split disk into 2 GB files

- Specify Disk File* C:\Virtual Machines\Shared\asm2.vmdk

- Advanced* Virtual device node: SCSI 1:4* [x] Independent* [x] Persistent

50

Page 51: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 5 de 9

- No VMware, clique em Edit Virtual Machine Settings - Virtual Machine Settings

* Add - Add Hardware Wizard

* Next - Hardware Type

* Hard Disk - Select a Disk

* Create a Virtual Disk - Select a Disk Type

* SCSI - Specify Disk Capacity

* Disk size: 10 GB* [ ] Allocate all disk space now* [x] Split disk into 2 GB files

- Specify Disk File* C:\Virtual Machines\Shared\asm3.vmdk

- Advanced* Virtual device node: SCSI 1:5* [x] Independent* [x] Persistent

51

Page 52: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

52

Page 53: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 6 de 9

- O arquivo Red Hat Enterprise Linux 4.vmx deve ter estas linhas:

disk.locking = "FALSE"diskLib.dataCacheMaxSize = "0" diskLib.dataCacheMaxReadAheadSize = "0" diskLib.dataCacheMinReadAheadSize = "0" diskLib.dataCachePageSize = "4096" diskLib.maxUnsyncedWrites = "0"

scsi1.sharedBus = "VIRTUAL"

tools.syncTime.period = "1"timeTracker.periodicStats="TRUE"timeTracker.statsIntercal="10"

reslck.timeout = "300"

53

Page 54: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 7 de 9

- O arquivo Red Hat Enterprise Linux 4.vmx deve ter estas linhas:

scsi1:1.deviceType = "plainDisk"scsi1:1.redo = ""

scsi1:2.deviceType = "plainDisk"scsi1:2.redo = ""

scsi1:3.deviceType = "plainDisk"scsi1:3.redo = ""

scsi1:4.deviceType = "plainDisk"scsi1:4.redo = ""

scsi1:5.deviceType = "plainDisk"scsi1:5.redo = ""

54

Page 55: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 8 de 9

- Iniciar o RAC1

- Se o Kudzu avisar sobre novo hardware, aceitar a configuração.[*] Configure

- Executar o fdisk de /dev/sdb a /dev/sdf, com as opções abaixo: fdisk /dev/sdb

* n* p* 1* [Enter]* [Enter]* w

55

Page 56: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Configuração dos Raw Devices – Passo 9 de 9

Editar o arquivo /etc/sysconfig/rawdevices e acrescentar:/dev/raw/raw1 /dev/sdb1/dev/raw/raw2 /dev/sdc1/dev/raw/raw3 /dev/sdd1/dev/raw/raw4 /dev/sde1/dev/raw/raw5 /dev/sdf1

Executar como root:service rawdevices restartln -s /dev/raw/raw1 /u01/oradata/ocrln -s /dev/raw/raw2 /u01/oradata/votingdiskln -s /dev/raw/raw3 /u01/oradata/asm1ln -s /dev/raw/raw4 /u01/oradata/asm2ln -s /dev/raw/raw5 /u01/oradata/asm3chown oracle:oinstall /dev/raw/raw1chown oracle:oinstall /dev/raw/raw2chown oracle:oinstall /dev/raw/raw3chown oracle:oinstall /dev/raw/raw4chown oracle:oinstall /dev/raw/raw5chmod 600 /dev/raw/raw1chmod 600 /dev/raw/raw2chmod 600 /dev/raw/raw3chmod 600 /dev/raw/raw4chmod 600 /dev/raw/raw5

56

Page 57: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB IV – Criar Raw Devices

Hands Off !

57

Page 58: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB V – Clonar VM

Hands On !

58

Page 59: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Clonagem da VM

- Desligar o RAC1 - Copie a pasta RAC1 para RAC2

- No arquivo “Red Hat Enterprise Linux 4.vmx” do RAC2:Mudar displayName = "RAC1"Para displayName = "RAC2"

- No Vmware, importar o RAC2 (File → Open - Browse) - Iniciar o RAC2 (ainda não inicie o RAC1 !!!) - Ao iniciar a VM, usar a opção “Create” - No Kudzu, escolher “Keep Configuration” e depois “Ignore”

- Ajustar as configurações de rede do RAC2: - Logar como root no ambiente gráfico - Applications → System Settings → Network - DNS → Hostname → rac2.localdomain - Devices → eth0 → Edit → Hardware Device → Probe → OK - Devices → eth0 → Edit → General → Address → 192.168.202.102 → OK - Devices → eth1 → Edit → Hardware Device → Probe → OK - Devices → eth1 → Edit → General → Address → 192.168.203.102 → OK - File → Save → OK - Devices → eth0 → Activate - Devices → eth1 → Activate

- No arquivo /home/oracle/.bash_profile, trocar ORCL1 por ORCL2.

59

Page 60: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB V – Clonar VM

Hands Off !

60

Page 61: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

IV – Oracle Clusterware

61

Page 62: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

62

Page 63: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Oracle Clusterware – Conceitos

• 9.0.1: Oracle Cluster Management Services• 10.1: Cluster Ready Services• 10.2: Clusterware

• Oracle Cluster Registry

• Voting Disk (Quorum Disk)

• Daemons: evmd, ocssd, crsd

• crsctl, crs_stat, srvctl

63

Page 64: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VI – Instalar

Oracle Clusterware

Hands On !

64

Page 65: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Clusterware

Como usuário oracle, no WinSCP: Copiar 10201_clusterware_linux32.zip para o RAC1, descompactar. Copiar 10201_database_linux32.zip para o RAC1, descompactar.

Verificar no /etc/hosts se a linha abaixo está ok, no RAC1:127.0.0.1 rac1.localdomain rac1 localhost.localdomain localhost

Verificar no /etc/hosts se a linha abaixo está ok, no RAC2:127.0.0.1 rac2.localdomain rac2 localhost.localdomain localhost

Instalar o cvuqdisk no RAC1, como root:rpm -Uvh /home/oracle/clusterware/rpm/cvuqdisk-1.0.1-1.rpm

Copiar o rpm do cvuqdisk para o RAC2 e instalar, como root.

Verificar as opções do cluvfy, com o usuário oracle, no RAC1:/home/oracle/clusterware/cluvfy/runcluvfy.sh stage -help

Validar sua instalação com o cluvfy, com o usuário oracle, no RAC1:

65

Page 66: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Clusterware

Logar no ambiente gráfico do RAC1 com o usuário oracle:

export $ORACLE_HOME=$CRS_HOME/home/oracle/clusterware/runInstaller.sh

Quando o último check acusar problemas, configurar os VIPs com o VIPCA em outro terminal, dentro do mesmo ambiente gráfico, antes de prosseguir.

Após rodar o VIPCA, volte para a tela de instalação do Clusterware, clique em Retry.

66

Page 67: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

67

Page 68: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

68

Page 69: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

69

Page 70: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

70

Page 71: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

71

Page 72: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

72

Page 73: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VI – Instalar

Oracle Clusterware

Hands Off !

73

Page 74: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

V – Oracle Database Software

74

Page 75: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VII – Instalar

Oracle Database Software

Hands On !

75

Page 76: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

76

Page 77: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

77

Page 78: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Oracle Database Software

• Use a opção “Install software only” do Oracle Universal Installer

78

Page 79: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VII – Instalar

Oracle Database Software

Hands Off !

79

Page 80: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

VI – ASM

80

Page 81: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Automatic Storage Management

Suporte:• Datafiles• Tempfiles• Control files• Online Redo Logs• Archived Redo Logs• RMAN backups• SPFILEs• Change Tracking Files• Flashback Logs

Reduz manutenção

É um LVM, possui Stripping e Mirroring

Vizualização e manutenção de arquivos: asmcmd

Acesso a arquivos: ftp, RMAN, asmcmd (11g)

81

Page 82: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VIII – Instalar ASM

Hands On !

82

Page 83: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Automatic Storage Management

• Configure um listener para o RAC usando o NETCA.

• Use a opção “Configure Automatic Storage Management” do DBCA.

• Criar as instâncias ASM com PFILE

• Crie um Disk Group usando os 3 Raw Devices , com High Mirrroring.

83

Page 84: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB VIII – Instalar ASM

Hands Off !

84

Page 85: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

VII – Oracle Database

85

Page 86: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Database RAC

Novos Background Process• LMSn• LMON• LMDn• LCK0• DIAG

Online Redo Log Threads

UNDO Tablespaces

Control Files

PFILEs, SPFILEs

86

Page 87: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB Final – Instalar

Oracle Database

Hands On !

87

Page 88: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

Oracle Database

• Crie um Banco de Dados no RAC, usando DBCA.

• Crie o Banco com 3 Serviços: FATURAMENTO, RH, e DEV

• O Serviço DEV deve usar apenas o RAC2

• Os 3 Serviços devem usar TAF Basic.

88

Page 89: Oracle 10gR2 RAC: Instalação

<Insert Picture Here>

LAB Final – Instalar

Oracle Database

Hands Off !

89