关于小说网站的一些建设流程,百度网盘提取码入口,佳木斯市网站建设,google网站入口本帖最后由 sunyunyi 于 2018-11-10 10:33 编辑目前就职海天起点#xff0c;服务于电力行业#xff0c;致力于帮助客户解决生产过程中出现的问题#xff0c;提高生产效率, 爱好书法#xff0c;周易#xff01;愿结交志同道合之士#xff01;共同进步#xff01; 微信号服务于电力行业致力于帮助客户解决生产过程中出现的问题提高生产效率, 爱好书法周易愿结交志同道合之士共同进步 微信号sunyunyi_sunOracle ServiceOracle Service 向客户端提供一个统一的服务名Service位置透明一个Service能定义多个数据库实例一个数据库实例可以属于多个Service。Oracle Service 服务分为默认服务和自定义的集群管理服务默认服务定义为 DB_UNIQUE_NAME or DB_NAME or PDB_NAMESYS$BACKGROUND(后台进程使用)和 SYS$USERS (默认用户session)Oracle默认服务oracle内部管理不能被禁用不能被计划停止服务不能故障转移到ORACLE DATA GUARD。Oracle强烈建议不要使用默认Service给client提供服务但是我遇到的几乎所有在运数据库使用默认Service向外提供服务这样配置使用好像也没存在性能问题故障转移负载均衡一切运作正常。那为什么Oracle强力建议使用自定义Service向客户提供服务1默认Service存在许多限制不能管理缺少灵活性2可依据用户应用类型建立不同Service分类管理应用3可动态灵活分配主要实例和可用实例给每个Service以及动态迁移Service到其他实例4可以计划禁用Service满足计划停机事件5可依据应用定义链接时负载均衡和运行时负载均衡基于以上好处强烈建议使用自定义Service提供服务下面我们看看自定义服务的建立和相关重要属性用户可使用EM和srvctl建立、修改、禁用、启动、停止、查询这里我们只讨论srvctl的使用方法下面是12C的使用方法注意12C和11G以及10G的使用方法差异巨大10G的Service特性较少11G的Service功能强大但是参数使用方法和12C完全不同12C在11G基础增加功能列出12C的参数Usage: srvctl add service -db -service [-role [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-policy {AUTOMATIC | MANUAL}][-notification {TRUE | FALSE}] [-clbgoal {SHORT | LONG}] [-rlbgoal {NONE | SERVICE_TIME | THROUGHPUT}][-failovertype {NONE | SESSION | SELECT | TRANSACTION}] [-failovermethod {NONE | BASIC}][-failoverretry ] [-failoverdelay ][-failover_restore {NONE | LEVEL1}][-edition ] [-pdb ] [-global ] [-maxlag ] [-sql_translation_profile ][-commit_outcome {TRUE | FALSE}] [-retention ] [replay_init_time ] [-drain_timeout ][-stopoption ] [-session_state {STATIC | DYNAMIC}] [-force]-db Unique name for the database-service Service name-role Role of the service (primary, physical_standby, logical_standby, snapshot_standby)-policy Management policy for the service (AUTOMATIC or MANUAL)-failovertype (NONE | SESSION | SELECT | TRANSACTION) Failover type-failovermethod (NONE | BASIC) Failover method-failoverdelay Failover delay (in seconds)-failoverretry Number of attempts to retry connection-failover_restore Option to restore initial environment for Application Continuity and TAF (NONE or LEVEL1)-edition Edition (or for empty edition value)-pdb Pluggable database name-maxlag Maximum replication lag time in seconds (Non-negative integer, default value is ANY)-clbgoal (SHORT | LONG) Connection Load Balancing Goal. Default is LONG.-rlbgoal (SERVICE_TIME | THROUGHPUT | NONE) Runtime Load Balancing Goal-notification (TRUE | FALSE) Enable Fast Application Notification (FAN) for OCI connections-global Global attribute (TRUE or FALSE)-sql_translation_profile Specify a database object for SQL translation profile-commit_outcome (TRUE | FALSE) Commit outcome-retention Specifies the number of seconds the commit outcome is retained-replay_init_time Seconds after which replay will not be initiated-session_state Session state consistency (STATIC or DYNAMIC)-drain_timeout Service drain timeout specified in seconds-stopoption Options to stop service (e.g. TRANSACTIONAL or IMMEDIATE)-force Force the add operation even though a listener is not configured for a network-verbose Verbose output-help Print usage这里我们看看主要的几个参数-policy Service Management Policy 默认为AUTOMATICsrvctl start database 自动启动service建议默认。-preferred 定义优先的实例列表。-available 定义可用的实例列表当优先的实例不可用时使用。-cardinalityServer Pool Assignment(资源池分配) You can define the service as either UNIFORM (running on all instances in the serverpool) or SINGLETON (running ononly one instance in the server pool) using the -cardinality parameter-rlbgoal定义Run-time Connection Load Balancing默认为NONE,SERVICE_TIME基于单个事务处理效率向客户提供最好的服务质量OLTP使用。THROUGHPUT基于长时间查询和单个完整工作完成效率向客户提供最大吞吐量OLAP使用。-clbgoal定义Connection Load Balancing Goal默认值为LONG:如果 -rlbgoal 参数不为NONE,Service定义为SINGLETON也就是只在一个服务器上运行则使用session count进行负载评判.如果Service定义为uniform在所以服务器上运行则使用run queue length进行评判。另外一个值为short: 如果 -rlbgoal 参数不为NONE,则使用GOODNESS进行判断提供负载均衡。12C新增功能Creating Services for Application Continuity and Transaction Guard1Creating Services for Application Continuity-replay_init_time: 单位秒默认值300s定义replay初始化时间-retention:单位秒默认值86400(1 day)commit outcome信息保存时间。-failoverretry:链接重试次数建议30-failoverdelay:每次重试延迟建议10s-notification: FAN is highly recommended—set this value to TRUE to enable FAN for OCI and ODP.Net clients.对数据库 racdb 新增service app2 资源池 Srvpool1 的示例srvctl add service -db racdb -service app2 -serverpool Srvpool1-failovertype TRANSACTION -commit_outcome TRUE -replay_init_time 1800-retention 86400 -notification TRUE -rlbgoal SERVICE_TIME -clbgoal SHORT-failoverretry 30 -failoverdelay 10Creating Services for Transaction Guard启动事务保护To enable Transaction Guard, but not Application Continuity, create the service usingSRVCTL and set only -commit_outcome TRUE.修改示例$ srvctl modify service -db racdb -service app2 -commit_outcome TRUE -retention 86400 -notification TRUE另外必须 GRANT EXECUTE ON DBMS_APP_CONT;其他操作Starting and Stopping Services with SRVCTL$ srvctl start service -db db_unique_name [-service service_name_list][-instance inst_name] [-startoption start_options]$ srvctl stop service -db db_unique_name -service service_name_list [-instance inst_name] [-startoption start_options]Enabling and Disabling Services with SRVCTL$ srvctl enable service -db db_unique_name -service service_name_list [-instance inst_name]$ srvctl disable service -db db_unique_name -service service_name_list [-instance inst_name]Relocating Services with SRVCTLThe following command relocates the crm service from instance apps1 to instance apps3:$ srvctl relocate service -db apps -service crm -oldinst apps1 -newinst apps3The following command relocates the crm service from node1 to node3 using node$ srvctl relocate service -db apps -service crm -currentnode node1 -targetnode node3Obtaining the Status of Services with SRVCTL$ srvctl status service -db dbnameObtaining the Configuration of Services with SRVCTL$ srvctl config service -db dbname -service service_name