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

来源于:

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;

时间: 2024-10-10 10:12:54

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

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

在12c数据库中,哪种audit trail 受到支持? 来源于:What Audit Trail Types Are Supported For A 12c Database? (文档 ID 1986609.1) 适用于: Oracle Audit Vault and Database Firewall - Version 12.1.2.0 and later Information in this document applies to any platform. 目标: 在12c数据库中,

【翻译自mos文章】Oracle db 12c中,每次日志切换时,会改变alert_sid.log的权限

12c中,每次日志切换时,会改变alert_sid.log的权限 来源于: Alert log file's permissions Change with every log switch in 12c (Doc ID 1637367.1) 适用于: Oracle Database - Enterprise Edition - Version 12.1.0.1 and later Information in this document applies to any platform. 症状:

【翻译自mos文章】oracle数据库的最大数据容量限制和表空间的最大数据容量限制

oracle数据库的最大数据容量限制和表空间的最大数据容量限制 参考原文: What Is The Maximum Tablespace Size And Database Limit For An Oracle Database ? (Doc ID 1372905.1) 适用于: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2] Oracle Database -

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

参考原文: Users Accounts Getting Locked. (Doc ID 791037.1) 其实这个文章是为oracle 别的软件产品写的,不过涉及到user 锁定问题,那还是跟db有关系. 该文章我就不全部翻译了,只翻译最有用的一点: ---lcount列是记录oracle用户用错误的密码登陆db的登陆的次数. Select lcount from SYS.USER$ where name ='<USERNAME>' [翻译自mos文章]oracle db 中的用户账户被锁

【翻译自mos文章】Oracle GoldenGate(OGG) trail file的最大大小

Oracle GoldenGate(OGG) trail file的最大大小 参考原文: what's the OGG trail size limit? (文档 ID 1348080.1) 适用于: Oracle GoldenGate - Version: 10.4.0.99 and later   [Release: 10.4.0 and later ] Information in this document applies to any platform. 目标: 在AIX 平台下,做i

【翻译自mos文章】oracle密码管理策略

oracle密码管理策略 参考原文: Oracle Password Management Policy (Doc ID 114930.1) 细节: 密码管理通过使用profile来建立. 当密码过期后,如果user有能力独立地从 end-user application(前台业务软件)修改密码的话,通常的推荐是只指派给这些schemas 一个profile,该profile有  password aging an expiration features . 通常这意味着application(

【翻译自mos文章】oracle linux 和外部存储系统 的关系

oracle  linux 和外部存储系统 的关系 参考原文: Oracle Linux and External Storage Systems (Doc ID 753050.1) 适用范围: Linux OS - Version Oracle Linux 4.4 to Oracle Linux 6.0 with Unbreakable Enterprise Kernel [2.6.32] [Release OL4U4 to OL6] Linux x86-64 Linux x86 Linux

【翻译自mos文章】在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log)

在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log) 参考原文: Retrieve deleted files on Unix / Linux using File Descriptors (Doc ID 444749.1) 适用于: Oracle Database - Enterprise Edition - Version 8.1.7.0 to 11.2.0.3 [Release 8.1.7 to 11.2] Linu

【翻译自mos文章】控制OGG Director 中Repository Table 保留几天记录的参数

控制OGG Director 中Repository Table  保留几天记录的参数 翻译自mos文章: Can I Purge The Director "STATSENTRYB" Repository Table? (Doc ID 971709.1) QUESTION My Director Repository Table "STATSENTRYB" has grown to more than 100,000 rows. Is there a way to