来源于:

Service Management For Multitenant (文档 ID 2009500.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later

Information in this document applies to any platform.

GOAL

This Note is intended to cover the most important point about the management of database services in a Multitenant environment.

SOLUTION

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.

SQL*Plus: Release 12.1.0.2.0 Production on Mi Mai 13 10:20:44 2015



Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Enter user-name: / as sysdba



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics

and Real Application Testing options



SQL> select service_id, name,enabled ,pdb from cdb_services order by 1;



SERVICE_ID NAME                           ENA PDB

---------- ------------------------------ --- --------------------

         1 SYS$BACKGROUND                 NO  CDB$ROOT

         2 SYS$USERS                      NO  CDB$ROOT

         3 o12cXDB                        NO  CDB$ROOT

         4 o12c                           NO  CDB$ROOT



SQL> alter pluggable database pdb1 open read write;



Pluggable database altered.



SQL> select service_id, name,enabled ,pdb from cdb_services order by 1;



SERVICE_ID NAME                           ENA PDB

---------- ------------------------------ --- --------------------

         1 SYS$BACKGROUND                 NO  CDB$ROOT

         2 SYS$USERS                      NO  CDB$ROOT

         3 o12cXDB                        NO  CDB$ROOT

         4 o12c                           NO  CDB$ROOT

         7 pdb1                           NO  PDB1

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:

SQL> select service_id, name,enabled ,pdb from cdb_services order by 1;

When you need to create or delete a service, then you need to switch to the container listed under 'PDB' using:

SQL> alter session set container = <pdb name>;

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

$ srvctl status service -db <cdb name> -v

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.

【翻译自mos文章】多租户中的service管理的更多相关文章

  1. 【翻译自mos文章】11gR2中的asm后台进程

    11gR2中的asm后台进程 參考原文: ASM Background Processes in 11.2 (Doc ID 1641678.1) 适用于: Oracle Database - Ente ...

  2. 【翻译自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 ...

  3. 【翻译自mos文章】job 不能自己主动执行--这是另外一个mos文章,本文章有13个解决方法

    job 不能自己主动执行--这是另外一个mos文章 參考原文: Jobs Not Executing Automatically (Doc ID 313102.1) 适用于: Oracle Datab ...

  4. 【翻译自mos文章】在10g中,当发生ORA-00020时,sqlplus登陆会报“connected to an idle instance”

    在10g中.当发生ORA-00020时,sqlplus登陆会报"connected to an idle instance" 来源于: Sqlplus Logon Reports ...

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

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

  6. 【翻译自mos文章】在11gR2 rac环境中,文件系统使用率紧张,而且lsof显示有非常多oraagent_oracle.l10 (deleted)

    在11gR2 rac环境中,文件系统使用率紧张.而且lsof显示有非常多oraagent_oracle.l10 (deleted) 參考原文: High Space Usage and "l ...

  7. 【翻译自mos文章】在Oracle GoldenGate中循环使用ggserr.log的方法

    在OGG中循环使用ggserr.log的方法: 參考原文: OGG How Do I Recycle The "ggserr.log" File? (Doc ID 967932.1 ...

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

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

  9. 【翻译自mos文章】ABMR:在asm 环境中測试Automatic Block Recover 特性的方法

    ABMR:在asm 环境中測试Automatic Block Recover 特性的方法 參考原文: ABMR: How to test Automatic Block Recover Feature ...

随机推荐

  1. Java线程和多线程(三)——线程安全和同步

    线程安全在Java中是一个很重要的课题.Java提供的多线程环境支持使用Java线程.我们都知道多线程共享一些对象实例的话,可能会在读取和更新共享数据的事后产生数据不一致问题. 线程安全 之所以会产生 ...

  2. NOS跨分区灾备设计与实现

    本文来自网易云社区 作者:王健 摘要 NOS(网易对象存储)在实现多机房(杭州机房,北京机房等)部署后,允许一个用户在建桶时选择桶所属机房.在此基础上,我们实现了跨机房的数据复制,进一步实现了跨机房的 ...

  3. 用python计算100以内的素数

    用python计算100以内的素数 : break else: list.append(i)print(list)

  4. 使用pipework将Docker容器桥接到本地网络环境中

    在使用Docker的过程中,有时候我们会有将Docker容器配置到和主机同一网段的需求.要实现这个需求,我们只要将Docker容器和主机的网卡桥接起来,再给Docker容器配上IP就可以了.pipew ...

  5. 长沙理工大学第十二届ACM大赛-重现赛

    年轮广场 时间限制:1秒 空间限制:131072K 题目描述 在云塘校区,有一个很适合晒太阳的地方————年轮广场 年轮广场可以看成n个位置顺时针围成一个环. 这天,天气非常好,Mathon带着他的小 ...

  6. PTA 10-排序4 统计工龄 (20分)

    题目地址 https://pta.patest.cn/pta/test/15/exam/4/question/721 5-13 统计工龄   (20分) 给定公司NN名员工的工龄,要求按工龄增序输出每 ...

  7. MHA脚本master_ip_failover.pl(三)

    #!/usr/bin/env perl use strict;use warnings FATAL => 'all'; use Getopt::Long; my ( $command, $ssh ...

  8. 【Luogu】P2762太空飞行计划(最大权闭合图)

    题目链接 woc这题目的输入格式和输出格式真的恶心 首先我们就着样例讲一下闭合图 如图所示,第一层是两个实验节点,带来正收益:第二层是三个仪器节点,带来负收益:问讲道理到终点可以获得多大收益. 闭合图 ...

  9. 【Luogu】P2522Problemb(莫比乌斯反演)

    题目链接 同Zip—Queries,但是用到容斥原理 设f(n,m)是(x,y)的对数,其中1<=x<=n,1<=y<=m 则有f(n,m)-f(a-1,n)-f(b-1,m) ...

  10. 【容斥】HDU 4135 Co-prime

    acm.hdu.edu.cn/showproblem.php?pid=4135 [题意] 询问[a,b]中与n互质的数有多少个 [思路] 考虑[1,m]中与n互质的数有多少个,答案就是query(b) ...