来源于:

Defining a Database Service with a Stand Alone Database (文档 ID 1260134.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.5 to 11.2.0.3 [Release 10.2 to 11.2]

Information in this document applies to any platform.

GOAL

The DBMS_SERVICE package allows the creation, deletion, starting and stopping of services in both RAC and a single instance. Additionally it provides the ability to disconnect all sessions which connect to the instance
with a service name when RAC removes that service name from the instance.

SOLUTION

The DBMS_SERVICE package lets you create, delete, activate and deactivate services for a single instance.



- Functions :

  • dbms_service.CREATE_SERVICE , Example:
SQL> exec dbms_service.CREATE_SERVICE(SERVICE_NAME=>'orderentry', NETWORK_NAME=>'db11g')
  • dbms_service.MODIFY_SERVICE , Example:
SQL> exec DBMS_SERVICE.MODIFY_SERVICE( -

> service_name => 'o11gr1', -

> goal => DBMS_SERVICE.GOAL_THROUGHPUT, -

> failover_method => DBMS_SERVICE.FAILOVER_METHOD_BASIC, -

> failover_type => DBMS_SERVICE.FAILOVER_TYPE_SELECT, -

> failover_retries => 10, -

> failover_delay => 1, -

> clb_goal => DBMS_SERVICE.CLB_GOAL_LONG);
  • dbms_service.START_SERVICE , Example:
SQL> exec dbms_service.START_SERVICE('orderentry')

SQL> show parameter service

It Recommended to have the LOCAL_LISTENER (Database) parameter set for the Database :

If You are using the default local address of TCP/IP, port 1521 :

alter system set LOCAL_LISTENER = '(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTNAME or IP Add)(PORT=1521))' scope=spfile;

If You are using non default local address of TCP/IP, port other than 1521 :

alter system set LOCAL_LISTENER = '(ADDRESS=(PROTOCOL=TCP)(HOST=HOSTNAME or IP Add)(PORT=1522))' scope=spfile;

References:

http://docs.oracle.com/cd/E11882_01/network.112/e41945/listenercfg.htm#CHDCCHIC

  • dbms_service.STOP_SERVICE , Example:
SQL> exec dbms_service.STOP_SERVICE('orderentry')
  • dbms_service.DELETE_SERVICE , Example:
SQL> exec dbms_service.DELETE_SERVICE('orderentry')

-Monitoring



Use the following dictionary views to monitor services:



* dba_services - All defined services

* gv$active_services - All active (started) services



To see what service a session is connected to:

SELECT username, program, machine, service_name FROM gv$session;

【翻译自mos文章】在Oracle单机数据库中定义database service的更多相关文章

  1. 【翻译自mos文章】在12c数据库中,哪种audit trail 受到支持?

    在12c数据库中,哪种audit trail 受到支持? 来源于:What Audit Trail Types Are Supported For A 12c Database? (文档 ID 198 ...

  2. 【翻译自mos文章】oracle db 中的用户账户被锁--查看oracle用户的尝试次数

    參考原文: Users Accounts Getting Locked. (Doc ID 791037.1) 事实上这个文章是为oracle 别的软件产品写的,只是涉及到user 锁定问题.那还是跟d ...

  3. 【翻译自mos文章】oracle支持在RDBMS HOME 下的 符号链接( Symbolic Links)吗?

    oracle支持在RDBMS HOME 下的 符号链接( Symbolic Links)吗? 參考原文: Does Oracle support Symbolic Links in the RDBMS ...

  4. 【翻译自mos文章】Oracle GoldenGate 怎么在源头的传输进程和目的端的server/collector进程之间分配 port?

    Oracle GoldenGate 怎么在源头的传输进程和目的端的server/collector进程之间分配 port? 来源于: How Does GoldenGate Allocates Por ...

  5. 【翻译自mos文章】11.2.0.4及更高版本号的asm实例中MEMORY_TARGET 和 MEMORY_MAX_TARGET的默认值和最小值

    [翻译自mos文章]11.2.0.4及更高版本号的asm实例中MEMORY_TARGET 和 MEMORY_MAX_TARGET的默认值和最小值 来源于: Default and Minimum ME ...

  6. 14.翻译系列:从已经存在的数据库中生成上下文类和实体类【EF 6 Code-First系列】

    原文链接:https://www.entityframeworktutorial.net/code-first/code-first-from-existing-database.aspx EF 6 ...

  7. Oracle 18c 数据库中scott用户不存在的解决方法

    Oracle 18c 数据库中scott用户不存在的解决方法 注:该文为转载 上面标题可直接跳转 原文地址:http://www.cnblogs.com/zangdalei/p/5482732.htm ...

  8. Oracle查询数据库中所有表的记录数

    1.Oracle查询数据库中所有表的记录数,但是有可能不准建议用第二种方式进行查询 select t.table_name,t.num_rows from user_tables t 2.创建orac ...

  9. 【翻译自mos文章】使用asm来部署 超大数据库(10TB到PB 范围)--针对oracle 10G

    使用asm来部署 超大数据库(10TB到PB 范围) 參考原文: Deployment of very large databases (10TB to PB range) with Automati ...

随机推荐

  1. ie_placeholder最佳兼容方案

    https://gitee.com/hustcc/placeholder.js巧妙的使用了canvas.toDataURL(),动态生成了一个背景图,可以作为兼容IE9-的placeholder方案. ...

  2. HDU-3555

    Bomb Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submi ...

  3. django + dropzone.js 上传文件

    1.dropzone.js http://www.dropzonejs.com/ dropzone.js是一个可预览\可定制化的文件拖拽上传,实现AJAX异步上传文件的工具 2.dropzone.js ...

  4. 在ubuntu下面为php添加redis扩展

    首先下载redis扩展:wget https://github.com/nicolasff/phpredis/zipball/master -o php-redis.zip 解压缩:unzip php ...

  5. Python中类方法重载---大部分

    重载方法格式: def __xxx__(self,other): ... 注:重载方法格式------------------------------------------------------- ...

  6. REST SOAP XML-RPC分析比较

    本文的标题“REST与SOAP之比较”确实有些让人误解.REST是代表性状态传输的名称首字母缩写,与其说它是标准,不如说是一种风格.然而,在我的前一篇文章中,正如我们所讨论的,众多从事Web服务的软件 ...

  7. Miller-Rabin与Pollard-Rho备忘

    Miller-Rabin素性测试算法: 根据费马小定理当p为素数时成立,所以如果存在一个a使x不满足此定理,则x必然不为素数. 但这是充分条件而不是必要条件,所以对于每个a,可能存在满足定理的x,这时 ...

  8. [CTSC2017]游戏(Bayes定理,线段树)

    传送门:http://uoj.ac/problem/299 题目良心给了Bayes定理,但对于我这种数学渣来说并没有什么用. 先大概讲下相关数学内容: 1.定义:$P(X)$ 表示事件$X$发生的概率 ...

  9. 【枚举】URAL - 2081 - Faulty dial

    //._. ... ._. ._. ... ._. ._. ._. ._. ._. //|.| ..| ._| ._| |_| |_. |_. ..| |_| |_| //|_| ..| |_. ._ ...

  10. 【神奇の做法】bzoj2456 mode

    题解:http://www.tuicool.com/articles/BfQBzif #include<cstdio> using namespace std; int n,x,ans,t ...