Use Grid Infrastructure to Manage Oracle Databases and Other Resources

8
3/2/2015 Use Grid Infrastructure to Manage Oracle Databases and Other Resources http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 1/8 DBA Junior Fortunas y adversidades de un DBA Oracle Home OCM 11g 12c Buscar Ir Use Grid Infrastructure to Manage Oracle Databases and Other Resources 1. Documentación en Tahiti > Masters Book List > Database Installation Guide for Linux > 3 Oracle Grid Infrastructure Documentación en Tahiti > Masters Book List > Administrator’s Guide > 4 Configuring Automatic Restart of an Oracle Database 2. “Oracle Grid Infrastructure” se compone del software ASM, Oracle Restart (en SingleInstance) y Clusterware (en clusters). Hemos hecho ejercicios sobre ASM y Clusterware en las secciones de “Grid Infrastructure and ASM” y “Real Application Clusters”. En este objetivo nos vamos a centrar en “Oracle Restart”. Instalaremos Grid Infrastucture SIN ASM. Añadiremos la BD al Grid y luego gestionaremos los recursos haciendo algunas pruebas. 3. IMPORTANTE > Antes de hacer ningún ejercicio hacemos una copia de seguridad de la máquina virtual OCM. Click “VM” > > Click “Power” > > Click “Power Off” > > Copiamos el contenido de la VM a otra ubicación (Ej.: F:\Virtual Machines\OCM => F:\Virtual Machines\Backups\OCM)

description

Use Grid Infrastructure to Manage Oracle Databases and Other Resources

Transcript of Use Grid Infrastructure to Manage Oracle Databases and Other Resources

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 1/8

    DBAJuniorFortunasyadversidadesdeunDBAOracle

    Home

    OCM11g12c

    Buscar Ir

    UseGridInfrastructuretoManageOracleDatabasesandOtherResources1.DocumentacinenTahiti>MastersBookList>DatabaseInstallationGuideforLinux>3OracleGridInfrastructure

    DocumentacinenTahiti>MastersBookList>AdministratorsGuide>4ConfiguringAutomaticRestartofanOracleDatabase

    2.OracleGridInfrastructuresecomponedelsoftwareASM,OracleRestart(enSingleInstance)yClusterware(enclusters).HemoshechoejerciciossobreASMyClusterwareenlasseccionesdeGridInfrastructureandASMyRealApplicationClusters.EnesteobjetivonosvamosacentrarenOracleRestart.InstalaremosGridInfrastuctureSINASM.AadiremoslaBDalGridyluegogestionaremoslosrecursoshaciendoalgunaspruebas.

    3.IMPORTANTE>AntesdehacerningnejerciciohacemosunacopiadeseguridaddelamquinavirtualOCM.

    ClickVM>>ClickPower>>ClickPowerOff>>CopiamoselcontenidodelaVMaotraubicacin(Ej.:F:\VirtualMachines\OCM=>F:\VirtualMachines\Backups\OCM)

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 2/8

    4.AntesdearrancarlaVMverificamosquetenemossuficientememoriaparapoderinstalarGridInfrastructure(2.5GB).EselrequisitomnimorecomendadoparatenerunainstalacindeGridmslaBasedeDatos.

    ClickVM>>ClickSettings>>Memoryforthisvirtualmachine=2560>>ClickOk>>ClickPoweronthisvirtualmachine

    5.CopiamoselsoftwaredeGridInfrastructure(p10404530_112030_LINUX_3of7.zip)enlaMquinaVirtualOCMconWinSCPoFileZilla.

    p10404530_112030_LINUX_3of7.zip>/u01/stage

    6.Descomprimimoselsoftwareconelusuariooracleyborramoslosarchivoscomprimidos.

    7.ComoslotenemosunusuarioparaelGrid,ledamostodolosprivilegiosalmismousuario(oracle).

    8.ActivamoselmodoslewingdeldemonioNTP.Estepasoesnecesarioparaevitarerroresenlainstalacindelsoftware.

    9.CreamoslaubicacinparaelsoftwaredelGridydamoslospermisoscorrectos.

    1234

    suoraclecd/u01/stageunzipp10404530_112030_LINUX_3of7.ziprmp10404530_112030_LINUX_3of7.zip

    12

    #AsignamoselusuariooracleatodoslosGROUPSdeadministracindeASM/usr/sbin/usermodGdba,asmdba,asmoper,asmadminoracle

    1234567

    #Editamoselfichero/etc/sysconfig/ntpdcomorootycambiamoslalinea:OPTIONS="untp:ntpp/var/run/ntpd.pid"#Porestaotra:OPTIONS="xuntp:ntpp/var/run/ntpd.pid"#GuardamosyreiniciamoseldemonioNTPservicentpdrestart

    12

    mkdirp/u01/app/11.2.0/gridchownRoracle:oinstall/u01/app/11.2.0/grid

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 3/8

    10.LanzamoselasistentedeinstalacindelGridInfrastructure(runInstaller).

    11.InstalamossloelsoftwareGridInfrastructure.

    SeleccionamosInstallGridInfrastructureSoftwareOnly>>ClickNext>>EnSelectedLanguagesslotendremosEnglish>>ClickNext>>DejamoslosgruposdeOSpordefecto(asmdba,asmoperyasmadmin)>>ClickNext>>OracleBase=/u01/app/oracle>>SoftwareLocation=/u01/app/11.2.0/grid>>ClickFinish

    12.Cuandoterminalainstalacin,nospidequeejecutemoselsiguientescript/u01/app/11.2.0/grid/root.shcomoroot.

    13.IMPORTANTE>Trasfinalizarlaejecucindelcomando/u01/app/11.2.0/grid/root.shnosindicalospasosaseguirparaconfigurarGridInfrastructureenunainstalacinStandAloneyregistrarelORACLE_HOME.EstoesnecesarioparatenerunainstalacincorrectadeOracleRestart.

    14.CerramoselasistentedeinstalacindelGI.

    3 chmodR755/u01/app/11.2.0/grid

    123

    #EjecutamoselcomandorunInstallerconelusuariooraclecd/u01/stage/grid/./runInstaller

    123

    #Abrimosunasesincomorootyejecutamoselscript#Aceptamoslosdirectoriospordefectoquenossolicita[INTRO]yindicamosquesobreescriba[Y]/u01/app/11.2.0/grid/root.sh

    123456

    #EjecutamoselsiguientecomandocomorootparaconfigurarGridInfrastructure/u01/app/11.2.0/grid/perl/bin/perlI/u01/app/11.2.0/grid/perl/libI/u01/app/11.2.0/grid/crs/install/u01/app/11#RegistramoselORACLE_HOMEdelGIsuoracle/u01/app/11.2.0/grid/oui/bin/runInstallerupdateNodeListsilentlocalCRS=trueORACLE_HOME=/u01/app/11

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 4/8

    ClickOk>>ClickClose

    15.RegistramoslosrecursosquetenemosenlamquinadentrodeGI.

    16.HacemosvariascomprobacionessobreelGI.

    17.TambinpodemosaadirserviciosalaBDatravsdeGI.Sinoexiste,GIloscrearpornosotros.

    12345678

    #RegistramoslaBDyelLISTENER(usuariooracle)#Pordefecto,cuandosearranquelamquinaselevantaralainstanciadeOCM/u01/app/11.2.0/grid/bin/srvctladddatabasedOCMo/u01/app/oracle/product/11.2.0/dbhome_1/u01/app/11.2.0/grid/bin/srvctladdlistenerlLISTENERo/u01/app/oracle/product/11.2.0/dbhome_1#LevantamoslosrecursosatravsdelGI/u01/app/11.2.0/grid/bin/srvctlstartlistenerlLISTENER/u01/app/11.2.0/grid/bin/srvctlstartdatabasedOCM

    123456

    #ValidamosquesehanaadidolosrecursosdelLISTENERylaBDcorrectamente#TenemosqueverONLINE(TARGETySTATE)lossiguientesrecursos:"ora.LISTENER.lsnr"y"ora.ocm.db"/u01/app/11.2.0/grid/bin/crsctlstatrest#ValidamosqueelGIlevantardeformaautomticatraselreinicio(autostartisenabled)/u01/app/11.2.0/grid/bin/crsctlconfighas

    1234567891011121314

    #CreamosunserviciobsicodepruebaconGIylolevantamos#PodemosverlasopcionesdisponiblesenladocumentacindeSRVCTLparaOacleRestart#http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm#i1008562/u01/app/11.2.0/grid/bin/srvctladdservicedOCMsSERVTEST/u01/app/11.2.0/grid/bin/srvctlstartservicedOCMsSERVTEST#ComprobamoselestadodelserviciodesdeGI/u01/app/11.2.0/grid/bin/crsctlstatrest#ComprobamosqueseregistraenelLISTENER(esperamosunminuto)lsnrctlservicesLISTENER#ParamoselservicioSERVTESTyloeliminamos/u01/app/11.2.0/grid/bin/srvctlstopservicedOCMsSERVTEST

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 5/8

    18.BorramoselsoftwaredeinstalacindelGI

    DBAJunior

    Pginas

    HomeConfigurearchivinginaRACDatabaseAccountAdministerandTuneSchemaObjecttoSupportVariousAccessMethodsAdministerExternalTablesAdministerFlashbackDataArchiveandSchemaEvolutionAdministerPartitionedTablesandIndexesUsingAppropriateMethodsandKeysAdministerResourceManagerAdminister,ManageandTuneParallelExecutionAssignJobstoWindowsChoosetheAppropriateTablespaceTypefortheIntendedUseConfigureaFastRecoveryAreaConfigureaSchematoSupportaStarTransformationQueryConfigureandManageDistributedMaterializedViewsConfigureandUseParallelExecutionforQueriesConfigureArchivelogDeletionPolicyfortheDataguardConfigurationConfigureASMfortheshareddisksandcreateaclustereddatabaseConfigureBaselineTemplatesConfigureConnectTtimeFailoverConfigureEnterpriseManagertoModifyaDatabaseAvailabilityConfigureGridControlforBusinessRequirementsConfigureRecoveryManagerConfigureRMANConfigureServicesusingbothManualandPolicyManagedMethodsConfiguretheDataGuardEnvironmenttoReduceOverheadsofFastIncrementalBackupsonthePrimaryDatabaseConfiguretheDatabaseEnvironmenttoSupportOptimalDataAccessPerformanceConfiguretheDatabaseInstancetoSupportSharedServerConnections

    15 /u01/app/11.2.0/grid/bin/srvctlremoveservicedOCMsSERVTEST

    1 rmRf/u01/stage/grid

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 6/8

    ConfiguretheEnterpriseManagerRepositoryConfiguretheNetworkEnvironmenttoAllowConnectionstoMultipleDatabasesConfiguretheObserverConverttheStandbytoaSnapshotStandbyCrearmquinavirtualOCMCreateandConfigureaListenerCreateandManageaTablespacethatusesNFSMountedFileSystemFileCreateandmanageanASMinstanceCreateandManageBigfileTablespacesCreateandManageContextsCreateandManageDatabaseConfigurationFilesCreateandManageEncryptedTablespacesCreateandManageJobsCreateandManageLOBSegmentsCreateandManageMultipleNetworkConfigurationFilesCreateandManageTemporary,Permanent,andUndoTablespacesCreateAndMonitorAlertsCreateASMDiskGroupsCreateDifferentTypesofRMANBackupstoCaterforDifferentPerformanceandRetentionRequirementsCreateEnterpriseManagerGridControlUsersCreateJobClassesCreateMultitenantCointanterDatabase(CDB)CreateNotificationsCreatePhysicalStandbyDatabasewithRealtimeApplyCreateProgramsCreateSchedulerJobsCreateSchedulesCreatethedatabaseCreateVirtualMachineTemplateCreatingACFSFileSystemDeployEnterpriseManagerGridControlAgentsDeployOEMCloudControlManagementAgentDetermineandSetSizingParametersforDatabaseStructuresDownloadOracle12cSoftwareGatherStatisticsonaSpecificTableWithoutInvalidatingCursorsImplementASMFailureGroupsImplementDataPumpExportandImportJobsforDataTransfer

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 7/8

    ImplementDataPumpToandFromRemoteDatabasesImplementFinegrainedAccessControlImplementGridControlandDatabaseControlImplementInstanceCagingImplementSecureFileLOBInstalacinOracleLinux5.4enMquinaOCMInstalacinSoftwareOracle11.2.0.3enOCMInstallandPatchEnterpriseManagerGridControlSoftwareInstallOEMCloudControl12cInstallOracleGridInfrastructureInstalltheEnterpriseManagerGridControlInfrastructureInstalltheOracleDatabase11gR2softwareInterpretExecutionPlanMaintainIndexesonaPartitionedTableManageMaterializedViewstoImproveRewriteandRefreshPerformanceManageOracleNetworkProcessesManageTransportofTablespacesAcrossPlatformsMantainRecoveryCatalogsNewFeatures12cPerformPartitionMaintenanceOperationsPerformVariousRecoveryOperationsUsingFlashbackTechnologyProtectedContentRegisterSetFlashbackDatabaseParametersSetupNetworkTracingSetupOEMDatabaseExpressStart,Stop,ConfigureandAdministerOracleGridInfrastructureStripeDataFilesAcrossMultiplePhysicalDevicesandLocationsSwitchoverandSwitchBackUseMultiColumnStatisticsUseConfigurationlessConnectionsUseEnterpriseManagerConfigurationAssistant(EMCA)UtilityUseEnterpriseManagertoModifyaDatabaseConfigurationUseGridInfrastructuretoManageOracleDatabasesandOtherResourcesUseOPatchtoInstallaPatchUsePartitionedIndexesUseRecoverManagertoPerformCompleteDatabaseRestoreandRecoveryOperations

  • 3/2/2015 UseGridInfrastructuretoManageOracleDatabasesandOtherResources

    http://www.dbajunior.com/usegridinfrastructuretomanageoracledatabasesandotherresources/ 8/8

    UseRecoveryManagertoPerformDatabaseBackupsUseResultCacheUseSQLAccessAdvisorUseSQLPerformanceAnalyzerUseSQLPlanManagementFeatureUseSQLTuningAdvisorUseSQLTuningToolsandFeaturesUseSQL*LoaderOracleCertifiedMaster11g

    PermaneceenContacto

    SiteRSSFeedTwitter

    Ms

    QuieresserDBA?EresunDBAJunior?Juntosprofundizaremosennuevastcnicasy"machacaremos"losconceptosbsicos,parapoderconvertirnosencracks!)

    2013DBAJunior