标签:
来源于:
Service Management For Multitenant (文档 ID 2009500.1)
This Note is intended to cover the most important point about the management of database services in a Multitenant environment.
An introduction on the topic of database services can be found here.
‘...A service name is a logical representation of a service used for client connections.
When a client connects to a listener, it requests a connection to a service. When a database instance starts,
it registers itself with a listener as providing one or more services by name. Thus, the listener acts as a
mediator between the client and instances and routes the connection request to the right place....‘
For a Multitenant-specific introduction please check here and here.
Services are an integral part of the management for Multitenant , esp. as there is
always a service created when a PDB is created or plugged in. The PDB and the
Service always have the same name and therefore you should never create any
services manually which have the same names as a PDB you intend to plug in.
It is important to note that the service only becomes active when the PDB is started.
There are two ways to create a database service:
1. The DBMS_SERVICES package provides an interface to the creation and management of services.
This is also what is used to create the services for the PDB‘s.
To see a list of currently active services, please run as SYS in the CDB:
When you need to create or delete a service, then you need to switch to the container listed under ‘PDB‘ using:
and then run the required procedure of the DBMS_SERVICE package
2. There is a utility called srvctl that is mostly used in a RAC environment but it also works in a non-RAC setup.
This is described here for RAC and in Note 1260134.1 for
a stand-alone environment.
In order to see a list of the services managed by srvctl, you need to run
You can use this to make sure that there are no conflicts when you plan to plug in a database.
A complete reference and examples for this can be found here.
标签:
原文地址:http://blog.csdn.net/msdnchina/article/details/50444133