roacle RAC学习文档_service_第1页
roacle RAC学习文档_service_第2页
roacle RAC学习文档_service_第3页
roacle RAC学习文档_service_第4页
roacle RAC学习文档_service_第5页
已阅读5页,还剩31页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Copyright 2005, Oracle. All rights reserved.Oracle 10G Real Application ClustersCopyright 2005, Oracle. All rights reserved.I-2RAC Database Storage PrinciplesNode1Instance1Shared storageNodenInstancenOnlineredo log filesfor instance1Onlineredo log filesfor instancenData filesUndo tablespacefiles for

2、instance1Undo tablespacefiles forinstancenFlash recovery area filesChange tracking fileSPFILEControl filesTemp filesArchivedlog filesLocal storageArchivedlog filesLocal storageCopyright 2005, Oracle. All rights reserved.I-3RAC and Shared Storage TechnologiesStorage is a critical component of grids:

3、Sharing storage is fundamental New technology trendsSupported shared storage for Oracle grids: Network Attached Storage Storage Area NetworkSupported file systems for Oracle grids: Raw volumes Cluster file system ASM Copyright 2005, Oracle. All rights reserved.I-4Global Dynamic Performance ViewsStor

4、e information about all started instancesOne global view for each local viewUse one parallel slave on each instanceMake sure that PARALLEL_MAX_SERVERS is big enoughNode1Instance1NodenInstancenClusterV$INSTANCEV$INSTANCEGV$INSTANCECopyright 2005, Oracle. All rights reserved.I-5RAC and ServicesUp and

5、down events notification engineListenersRAC InstancesApplication serverERPCRMERPERPERPERPCRMCRMCRMCRMStop/Start service connectionsModify service to instance mappingService connectionsBackupPriorityAlertsTuningConnection load balancingService availability awareCRSRun-time load balancingService locat

6、ion transparencyRestart failed componentsCopyright 2005, Oracle. All rights reserved.I-6Virtual IP Addresses and RACERP=(DESCRIPTION= (HOST=clusnode-1vip) (HOST=clusnode-2vip) (SERVICE_NAME=ERP)clnode-1ERP=(DESCRIPTION= (HOST=clusnode-1) (HOST=clusnode-2) (SERVICE_NAME=ERP)Timeoutwaitclnode-2clnode-

7、1clnode-22537clnode-1vipclnode-2vip2clnode-1vipclnode-2vip347Clients146156Copyright 2005, Oracle. All rights reserved.I-7What Is a Service?Is a means of grouping sessions that are doing the same kind of workProvides single-system image instead of multiple instances imageIs a part of the regular admi

8、nistration tasks that provide dynamic service-to-instance allocationIs the base for high availability of connectionsProvides a new performance-tuning dimensionCopyright 2005, Oracle. All rights reserved.I-8High Availability of Services in RACServices are available continuously with load shared acros

9、s one or more instances.Additional instances are made available in response to failures.Preferred instances: Set the initial cardinality for the service Are the first to start the serviceAvailable instances are used in response to preferred instance failures.Copyright 2005, Oracle. All rights reserv

10、ed.I-9Possible Service Configuration with RACAPRAC01RAC02RAC03GLAPGLAPRAC01RAC02RAC03GLAPGLAPGLAPRAC01RAC02RAC03GLAPGLAPGLActive/SpareActive/SymmetricActive/AsymmetricCopyright 2005, Oracle. All rights reserved.I-10Service AttributesSingle instance: Global unique name Threshold PriorityRAC: Global u

11、nique name Threshold Priority High-availability configuration PreconnectionCopyright 2005, Oracle. All rights reserved.I-11Service TypesApplication servicesInternal services: SYS$BACKGROUND SYS$USERSLimit of 64 services per database: 62 application services 2 internal servicesCopyright 2005, Oracle.

12、 All rights reserved.I-12Creating ServicesServices are maintained in the data dictionary.Use DBMS_SERVICE.CREATE to create a service for single-instance Oracle.Services are created automatically based on SERVICE_NAMES initialization parameter.Create a service in RAC with the following: DBCA SRVCTLHi

13、gh-availability business rules are maintained in the OCR and managed by CRS.Copyright 2005, Oracle. All rights reserved.I-13Creating Services with DBCADBCA configures both the CRS resources and the Net Service entries for each service.Copyright 2005, Oracle. All rights reserved.I-14Creating Services

14、 with DBCACopyright 2005, Oracle. All rights reserved.I-15Creating Services with SRVCTL$ srvctl add service d PROD s GL -r RAC02 -a RAC01$ srvctl add service d PROD s AP r RAC01 -a RAC02APRAC01GLAPRAC02GLCopyright 2005, Oracle. All rights reserved.I-16Preferred and Available Instances$ srvctl add se

15、rvice d PROD s ERP r RAC01,RAC02 -a RAC03,RAC04ERPERPERPERPRAC01RAC02RAC03RAC04ERPERPERPERPRAC01RAC02RAC03RAC04ERPERPERPERPRAC01RAC02RAC03RAC04ERPERPERPERPRAC01RAC02RAC03RAC041234Copyright 2005, Oracle. All rights reserved.I-17Everything Switches to ServicesData dictionary maintains services.AWR mea

16、sures performance of services.Database resource manager uses service in place of users for priorities.Job scheduler, PQ, and streams queues run under services.RAC keeps services available within site.Data Guard Broker with RAC keeps primary services available across sites.Copyright 2005, Oracle. All

17、 rights reserved.I-18Using Services with Client ApplicationsERP=(DESCRIPTION= (LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP)(HOST=node-1vip)(PORT=1521) (ADDRESS=(PROTOCOL=TCP)(HOST=node-2vip)(PORT=1521) (ADDRESS=(PROTOCOL=TCP)(HOST=node-3vip)(PORT=1521) (ADDRESS=(PROTOCOL=TCP)(HOST=node-4vip)(PORT=1521)

18、(CONNECT_DATA=(SERVICE_NAME=ERP)url=jdbc:oracle:oci:ERP url=jdbc:oracle:thin:ERP Copyright 2005, Oracle. All rights reserved.I-19Using Services with Resource ManagerConsumer groups are automatically assigned to sessions based on session services.Work is prioritized by service inside one instance.API

19、nstance resourcesBATCH75%25%APBATCHConnectionsCopyright 2005, Oracle. All rights reserved.I-20Services and Resource Manager with EMCopyright 2005, Oracle. All rights reserved.I-21Services and Resource Manager: Exampleexec DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;exec DBMS_RESOURCE_MANAGER.CREATE_CO

20、NSUMER_GROUP( CONSUMER_GROUP = HIGH_PRIORITY, COMMENT = High priority consumer group); exec DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING( ATTRIBUTE = DBMS_RESOURCE_MANAGER.SERVICE_NAME, VALUE = AP, CONSUMER_GROUP = HIGH_PRIORITY); exec DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;exec - DBMS_RESOUR

21、CE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(- GRANTEE_NAME = PUBLIC, CONSUMER_GROUP = HIGH_PRIORITY, GRANT_OPTION = FALSE); Copyright 2005, Oracle. All rights reserved.I-22Using Services with SchedulerServices are associated with Scheduler classes.Scheduler jobs have service affinity: High availabi

22、lity Load balancingDatabaseJob1HOT_BATCH_CLASSHOT_BATCH_SERVJob tableJob2HOT_BATCH_CLASSHOT_BATCH_SERVJob3LOW_BATCH_CLASS LOW_BATCH_SERVHOT_BATCH_SERVJob CoordinatorJob SlavesHOT_BATCH_SERVJob CoordinatorJob SlavesLOW_BATCH_SERVJob CoordinatorJob SlavesCopyright 2005, Oracle. All rights reserved.I-2

23、3Services and Scheduler with EMCopyright 2005, Oracle. All rights reserved.I-24Services and Scheduler with EMCopyright 2005, Oracle. All rights reserved.I-25Services and Scheduler: ExampleDBMS_SCHEDULER.CREATE_JOB_CLASS( JOB_CLASS_NAME = HOT_BATCH_CLASS, RESOURCE_CONSUMER_GROUP = NULL , SERVICE = HO

24、T_BATCH_SERV , LOGGING_LEVEL = DBMS_SCHEDULER.LOGGING_RUNS, LOG_HISTORY = 30, COMMENTS = P1 batch);DBMS_SCHEDULER.CREATE_JOB( JOB_NAME = my_report_job, JOB_TYPE = stored_procedure, JOB_ACTION = my_name.my_proc();, NUMBER_OF_ARGUMENTS = 4, START_DATE = SYSDATE+1, REPEAT_INTERVAL = 5, END_DATE = SYSDA

25、TE+30, JOB_CLASS = HOT_BATCH_CLASS, ENABLED = TRUE, AUTO_DROP = false, COMMENTS = daily status);Copyright 2005, Oracle. All rights reserved.I-26Using Services with Parallel OperationsSlaves inherit the service from the coordinator.Slaves can execute on every instance.ERPExecution coordinatorParallel

26、 ExecutionserverShared disksNode 4Node 1Node 2Node 3ERPERPERPERPERPERPERPERPCopyright 2005, Oracle. All rights reserved.I-27Using Services with Metric ThresholdsPossibility to define service-level thresholds: ELAPSED_TIME_PER_CALL CPU_TIME_PER_CALLServer-generated alerts are triggered on threshold v

27、iolations.You can react on generated alerts: Change priority Relocate services Add instances for services SELECT service_name, elapsedpercall, cpupercallFROM V$SERVICEMETRIC;Copyright 2005, Oracle. All rights reserved.I-28Changing Service Thresholds Using EMCopyright 2005, Oracle. All rights reserve

28、d.I-29Services and Metric Thresholds: Exampleexec DBMS_SERVER_ALERT.SET_THRESHOLD(- METRICS_ID = dbms_server_alert.elapsed_time_per_call, WARNING_OPERATOR = dbms_server_alert.operator_ge, WARNING_VALUE = 500000, CRITICAL_OPERATOR = dbms_server_alert.operator_ge, CRITICAL_VALUE = 750000, OBSERVATION_

29、PERIOD = 15, CONSECUTIVE_OCCURRENCES = 3, INSTANCE_NAME = I0n, OBJECT_TYPE = dbms_server_alert.object_type_service, OBJECT_NAME = ERP);Must be set on each instance supporting the serviceCopyright 2005, Oracle. All rights reserved.I-30Service Aggregation and TracingStatistics are always aggregated by

30、 service to measure workloads for performance tuning.Statistics can be aggregated at finer levels: MODULE ACTION Combination of SERVICE_NAME, MODULE, ACTIONTracing can be done at various levels: SERVICE_NAMES MODULE ACTION Combination of SERVICE_NAME, MODULE, ACTIONUseful for tuning systems using sh

31、ared sessionsCopyright 2005, Oracle. All rights reserved.I-31Cluster Database: Top ServicesCopyright 2005, Oracle. All rights reserved.I-32Service Aggregation ConfigurationAutomatic service aggregation level of statisticsDBMS_MONITOR used for finer granularity of service aggregations: SERV_MOD_ACT_S

32、TAT_ENABLE SERV_MOD_ACT_STAT_DISABLEPossible additional aggregation levels: SERVICE_NAME/MODULE SERVICE_NAME/MODULE/ACTIONTracing services, modules, and actions SERV_MOD_ACT_TRACE_ENABLE SERV_MOD_ACT_TRACE_DISABLEDatabase settings persist across instance restartsCopyright 2005, Oracle. All rights re

33、served.I-33Service Aggregation: ExampleCollect statistics on service and module.Collect statistics on service, module, and action.Trace all sessions of an entire service.Trace on service, module, and action.exec DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE(- AP, PAYMENTS);exec DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE(- AP, PAYMENTS, QUERY_DELINQUENT);exec DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE(AP);exec DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE(- AP, PAYMENTS, QUER

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论