Click here to load reader

Treinamento Oracle RAC 11gR2 - Nerv Informática Ltda

  • View
    3.570

  • Download
    9

Embed Size (px)

DESCRIPTION

Neste Treinamento cada participante irá executar todo o processo para instalar um RAC com 2 Nós, utilizando 2 máquinas cada um, instalando Linux, Configurar um Storage com NFS e ASM, instalar o Oracle 11gR2 Grid Infrastructure e o Oracle Database 11gR2. Não é um Treinamento com RAC simulado com VMware, e sim um RAC com dois servidores e mais um Storage, como um ambiente real de Produção. Saberá como configurar e preparar o Sistema Operacional corretamente para a instalação do Oracle RAC. Iremos configurar o Storage, passando pelas opções existentes de Discos Compartilhados para Dados, Oracle Cluster Registry e Voting Disk, verificar as opções possíveis para instalação do Clusterware e do Software RDBMS Oracle, as opções de uso do ASM (Automatic Storage Management), e finalmente subir e utilizar um Banco de Dados em RAC. Iremos abordar as tarefas de administração de um RAC já existente, e como elas diferem de uma implementação Single Instance do Oracle: Backup e Restore, Archives, manutenções no Storage, Backups e Restore do OCR e Voting Disk, Adicionar e Remover Nós, e executar Rolling Upgrades (aplicações de patch sem indisponibilidade).

Text of Treinamento Oracle RAC 11gR2 - Nerv Informática Ltda

  • 1.Ricardo Portilho [email protected] obra est licenciada sob a licenaCreative Commons Atribuio-SemDerivados 3.0 Brasil.Para ver uma cpia desta licena, visitehttp://creativecommons.org/licenses/by-nd/3.0/br/.1Oracle RAC 11gR21

2. 2Oracle RAC: Conceitos2 3. 3 Disponibilidade Escalabilidade Custo Total de Propriedade (TCO)3Por que usar o RAC? 4. 4 Custo de Equipamentos Custo de Licenas Custo de Conhecimento Complexidade Escalabilidade4Por que no usar o RAC? 5. 5 1 Database x N Instances + Background Processes + daemons OCR Voting Disk5Oracle RAC x Single Instance 6. 6Oracle 6.0.35: VAX / VMSOracle 7: PCMOracle 8i: Cache Fusion IOracle 9i: Cache Fusion II, Oracle Cluster Management ServicesOracle 10gR1: Oracle Cluster Management Services => Cluster Ready Services (CRS) VIP - Virtual IP ASM - Automatic Storage management FAN - Fast Application Notification Database Services AWR, ADDM, ASH, Scheduler, Enterprise ManagerOracle 10gR2: CRS => Oracle Clusterware. New Features incluem: cluvfy, asmcmd.Oracle 11gR1: Apenas 7 New Features.Oracle 11gR2: CRS => Grid Infrastrucutre. 32 New Features.6Evoluo Oracle RAC 7. 7 Enhanced Oracle RAC Monitoring and Diagnostics in Enterprise Manager Enhanced Oracle Real Application Clusters Configuration Assistants OCI Runtime Connection Load Balancing Parallel Execution for Oracle Real Application Clusters Support for Distributed Transactions in an Oracle RAC Environment Enhanced Oracle RAC Switchover Support for Logical Standby Databases Enhanced Oracle RAC Monitoring and Diagnostics in Enterprise Manager7RAC 11gR1 New Features 8. 8 Configuration Assistants Support New Oracle RAC Features Enhanced Cluster Verification Utility Integration of Cluster Verification Utility and Oracle Universal Installer Cluster Time Service Oracle Cluster Registry (OCR) Enhancements Grid Plug and Play (GPnP) Oracle Restart Policy-Based Cluster and Capacity Management Improved Clusterware Resource Modeling Role-Separated Management Agent Development Framework Zero Downtime Patching for Oracle Clusterware and Oracle RAC Enterprise Manager-Based Clusterware Resource Management Enterprise Manager Provisioning for Oracle Clusterware and Oracle Real ApplicationClusters Enterprise Manager Support for Grid Plug and Play Enterprise Manager Support for Oracle Restart Configuration Assistant Support for Removing Oracle RAC Installations8RAC 11gR2 New Features 9. 9 Oracle Universal Installer Support for Removing Oracle RAC Installations Improved Deinstallation Support With Oracle Universal Installer Downgrading Database Configured With DBControl Oracle Restart Integration with Oracle Universal Installer Out-of-Place Oracle Clusterware Upgrade OUI Support for Out-of-Place Oracle Clusterware Upgrade Server Control (SRVCTL) Enhancements Server Control (SRVCTL) Enhancements to Support Grid Plug and Play SRVCTL Support for Single-Instance Database in a Cluster Universal Connection Pool (UCP) Integration with Oracle Data Guard UCP Integration With Oracle Real Application Clusters Universal Connection Pool (UCP) for JDBC Java API for Oracle RAC FAN High Availability Events EMCA Supports New Oracle RAC Configuration for Enterprise Manager Global Oracle RAC ASH Report + ADDM Backwards Compatibility9RAC 11gR2 New Features 10. 10Hardware10 11. 11 11Hardware 12. 12Sistema Operacional12 13. 13Windows (32-Bit ou 64-Bit) Windows Server 2003 Windows Server 2003 R2 Windows XP Professional Windows Vista - Business, Enterprise, and Ultimate editions Windows Server 2008 and Windows Server 2008 R2 - Standard, Enterprise, Datacenter, Web,and Foundation editions. The Server Core option is not supported. Windows 7 - Professional, Enterprise, and Ultimate editionsUnix AIX 5L V5.3 TL 09 SP1 / AIX 6.1 TL 02 SP1 / AIX 7.1 TL 0 SP1 HP-UX PA-RISC 11i V3 / HP-UX Itanium 11i V3 Oracle Solaris 10 U6 x86-64 (64-Bit) / Oracle Solaris 10 U6 SPARC (64-Bit) Oracle Solaris 11 11/11 x86-64 (64-Bit) / Oracle Solaris 11 11/11 SPARC (64-Bit)Linux Asianux Server 3 SP2 Red Hat Enterprise Linux / Oracle Enterprise Linux 4 Update 7 Red Hat Enterprise Linux / Oracle Enterprise Linux 5 Update 2 Red Hat Enterprise Linux / Oracle Enterprise Linux 6 SUSE Linux Enterprise Server 10 SP2 SUSE Linux Enterprise Server 1113Sistemas Operacionais suportados 14. 14RAM x86: 64 GB x86-64: 512 GB (1 TB terico) Itanium 64: 1024 GB (1024 TB tericos)Kernel 2.4.x Limite de 256 Hard Disks Limite de Parties de 2TB Limite de 16 GB para x86 Boa escalabilidade com at 4 CPUs.Kernel 2.6.x Melhor desempenho de I/O Novas configuraes de I/O Suporte nativo a Asyncronous I/O e Direct I/O Melhorias da Memria Virtual Boa escalabilidade com mais de 32 CPUs14Linux: Limites 15. 15Cluster Verification UtilityUser sets up theHardware,network & storageSets up OCFS( OPT )InstallsOracleClusterwareInstallsRACConfiguresRAC DB-post hwos-post cfs-post crsinst-pre crsinst-pre dbinst-pre dbcfg-pre cfs15 16. 16Lab 1 Instalao OEL 6Hands On !16 17. 17 17Lab 1.1: Instalao OEL 6Nas mquinas nerv01 e nerv02, instale o OEL.- 1a tela: Install or upgrade an existing system- 2a tela: Skip- 3a tela: Next- 4a tela: English (English), Next- 5a tela: Brazilian ABNT2, Next- 6a tela: Basic Storage Devices, Next- 7a tela: Fresh Installation, Next- 8a tela: nerv01.localdomain, Next- 9a tela: America/Sao Paulo, Next- 10a tela: Nerv2014, Nerv2014, Next- 11a tela: Create Custom Layout, Next 18. 18 18Lab 1.2: Instalao OEL 618- 12a tela: Crie as parties como abaixo, e em seguida, Next:sda1 1024 MB /bootsda2 100000 MB /sda3 20000 MB /homesda5 16384 MB swapsda6 10000 MB /varsda7 10000 MB /tmpsda8 Espao restante /u01- 13a tela: Format- 14a tela: Write changes to disk- 15a tela: Next- 16a tela: Desktop- 17a tela: Reboot- Retire o DVD. 19. 19Lab 2 Configurao OEL 6Hands On !19 20. 20Nas mquinas nerv01 e nerv02, configure as placas de rede pplica e privada.20Lab 2.1 Configurao OEL 6 21. 21Nas mquinas nerv01 e nerv02, atualize o sistema operacional e execute ainstalao dos pr-requisitos.# service network restart# yum -y update# yum -y install oracle-rdbms-server-11gR2-preinstall# yum -y install oracleasm-support# yum -y install unzip iscsi-initiator-utils java-1.7.0-openjdk parted# yum -y install unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i68621Lab 2.2 Configurao OEL 6 22. 22Nas mquinas nerv01 e nerv02, ACRESCENTAR AO FINAL do arquivo/etc/hosts:# Public192.168.0.101 nerv01.localdomain nerv01192.168.0.102 nerv02.localdomain nerv02# Private192.168.1.101 nerv01-priv.localdomain nerv01-priv192.168.1.102 nerv02-priv.localdomain nerv02-priv# Virtual192.168.0.111 nerv01-vip.localdomain nerv01-vip192.168.0.112 nerv02-vip.localdomain nerv02-vip# Storage192.168.0.201 nerv09.localdomain nerv0922Lab 2.3 Configurao OEL 6 23. 23Nas mquinas nerv01 e nerv02, executar os comandos abaixo.# groupadd oper# groupadd asmadmin# groupadd asmdba# groupadd asmoper# usermod -g oinstall -G dba,oper,asmadmin,asmdba,asmoper oracle# mkdir -p /u01/app/11.2.0.4/grid# mkdir -p /u01/app/oracle/product/11.2.0.4/db_1# mkdir -p /u01/shared_config01# mkdir -p /u01/shared_config02# mkdir -p /u01/shared_config03# chown -R oracle:oinstall /u01# chmod -R 775 /u01# passwd oracle (Coloque como senha do usurio oracle: Nerv2014)23Lab 2.4 Configurao OEL 6 24. 24Nas mquinas nerv01 e nerv02, altere o SELinux de enforcing parapermissive.# vi /etc/selinux/configNas mquinas nerv01 e nerv02, desabilite o firewall.# chkconfig iptables off# chkconfig ip6tables offNas mquinas nerv01 e nerv02, desabilite o NTP.# mv /etc/ntp.conf /etc/ntp.conf.org# reboot24Lab 2.5 Configurao OEL 6 25. 25Nas mquinas nerv01 e nerv02 , com o usurio oracle, ACRESCENTAR NOFINAL do arquivo /home/oracle/.bash_profile as linhas abaixo.export TMP=/tmpexport TMPDIR=$TMPexport ORACLE_HOSTNAME=nerv01.localdomainexport ORACLE_UNQNAME=ORCLexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1export GRID_HOME=/u01/app/11.2.0.4/gridexport CRS_HOME=$GRID_HOMEexport ORACLE_SID=ORCL1export ORACLE_TERM=xtermexport PATH=/usr/sbin:$PATHexport PATH=$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibif [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi25Lab 2.6 Configurao OEL 6 26. 26Shared Storage26 27. RAW Devices (Descontinuado para dados no 11gR1, e para tudo no 11gR2) Plataformas: Todas Arquivos no suportados: Software, Dump, RecoveryNFS Plataformas: Linux, Solaris SPARC Arquivos no suportados: NenhumLVM Plataformas: HP-UX, HP Tru64 UNIX, Solaris SPARCArquivos no suportados: NenhumCertified Vendor CFS Plataformas: AIX, HP Tru64 UNIX, Solaris SPARC Arquivos no suportados: NenhumOCFS2 Plataformas: Windows, Linux Arquivos no suportados: NenhumASM Plataformas: Todas Arquivos no suportados: OCR (11gR2 suporta), Voting Disk (11gR2 suporta), Software, Dump Areas2727Opes de Shared Storage 28. 28Lab 3 StorageHands On !28 29. 29Na mquina nerv09, crie 3 diretrios.# mkdir /shared_config01# mkdir /shared_config02# mkdir /shared_config03Na mquina nerv09, adicionar no arquivo /etc/exports:/shared_config01 *(rw,sync,no_wdelay,insecure_locks,no_root_squash)/shared_config02 *(rw,sync,no_wdelay,insecure_locks,no_root_squash)/shared_config03 *(rw,sync,no_wdelay,insecure_locks,no_root_squash)Na mquina nerv09, iniciar o NFS Server:# service nfs start# chkconfig nfs on29Lab 3.1 Storage (NFS) 30. 30Nas mquinas nerv01 e nerv02, adicionar no arquivo /etc/fstab as TRS linhasabaixo.nerv09:/shared_config01 /u01/shared_config01 nfsrw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,noac 0 0nerv09:/shared_config02 /u01/shared_config02 nfsrw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,noac 0 0nerv09:/shared_config03 /u01/shared_config03 nfsrw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,noac 0 030Lab 3.2 Storage (NFS) 31.

Search related