"Translated from MOS article" defines database service in Oracle stand-alone databases

Source: Internet
Author: User

From:

Defining a database Service with a stand Alone Database (document 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 on both RAC and a single instanc E. Additionally it provides the ability to disconnect all sessions which connect to the instance with a service name when RAC removes the service name from the instance.


Solution

The Dbms_service package lets your 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,-
> 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 has 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 was connected to:

SELECT username, program, machine, service_name from Gv$session;

"Translated from MOS article" defines database service in Oracle stand-alone databases

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.