Oracle 12cR1 RAC Creating Services with PDBs
Oracle 12cR1 RAC Creating Services with PDBs
OracleOracle RACOracle Database 12c check the open modes of all the PDBs on a RAC instance when you connect to the CDB root [oracle@zhongwc1 ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.4 (Santiago) [oracle@zhongwc1 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Mon Oct 14 20:12:25 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY ZHONGWC1 READ WRITE ZHONGWC2 READ WRITE SQL> The default database service with the same name as the PDB is created automatically during PDB creation. You should only use this default service to connect to the PDB for administrative tasks. For applications to access the PDB, you need to create user-defined services for the PDB. In Oracle 12c, the database service has an optional PDB property which allows you to create a database service that is associated with a PDB. [oracle@zhongwc1 ~]$ srvctl add service -db zwc -service crm -pdb zhongwc1 -preferred zwc1 [oracle@zhongwc1 ~]$ srvctl add service -db zwc -service erp -pdb zhongwc1 -preferred zwc2 SQL> select name,pdb from dba_services; NAME PDB -------------------- -------------------- SYS$BACKGROUND CDB$ROOT SYS$USERS CDB$ROOT zwcXDB CDB$ROOT zwc CDB$ROOT SQL> conn sys/oracle10gOCP@zhongwc-cluster-scan:1521/zhongwc1 as sysdba Connected. SQL> select name,pdb from dba_services; NAME PDB -------------------- -------------------- zhongwc1 ZHONGWC1 SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 ZHONGWC1 READ WRITE NO Start service [oracle@zhongwc1 ~]$ srvctl config service -db zwc Service name: crm Service is enabled Server pool: zwc_crm Cardinality: 1 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Global: false Commit Outcome: false Failover type: Failover method: TAF failover retries: TAF failover delay: Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: NONE Edition: Pluggable database name: zhongwc1 Maximum lag time: ANY SQL Translation Profile: Retention: 86400 seconds Replay Initiation Time: 300 seconds Session State Consistency: Preferred instances: zwc1 Available instances: Service name: erp Service is enabled Server pool: zwc_erp Cardinality: 1 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: false Global: false Commit Outcome: false Failover type: Failover method: TAF failover retries: TAF failover delay: Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: NONE Edition: Pluggable database name: zhongwc1 Maximum lag time: ANY SQL Translation Profile: Retention: 86400 seconds Replay Initiation Time: 300 seconds Session State Consistency: Preferred instances: zwc2 Available instances: [oracle@zhongwc1 ~]$ srvctl status service -db zwc -service erp Service erp is not running. [oracle@zhongwc1 ~]$ srvctl status service -db zwc -service crm Service crm is not running. [oracle@zhongwc1 ~]$ srvctl start service -db zwc -service erp [oracle@zhongwc1 ~]$ srvctl start service -db zwc -service crm [oracle@zhongwc1 ~]$ [oracle@zhongwc1 ~]$ [oracle@zhongwc1 ~]$ srvctl status service -db zwc -service crm Service crm is running on instance(s) zwc1 [oracle@zhongwc1 ~]$ srvctl status service -db zwc -service erp Service erp is running on instance(s) zwc2 Check the status of the zhongwc1 PDB [oracle@zhongwc1 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Mon Oct 14 20:31:14 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> col pdb for a20 SQL> col name for a20 SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> select name,pdb from dba_services; NAME PDB -------------------- -------------------- SYS$BACKGROUND CDB$ROOT SYS$USERS CDB$ROOT zwcXDB CDB$ROOT zwc CDB$ROOT SQL> SQL> SQL> SQL> conn sys/oracle10gOCP@zhongwc-cluster-scan:1521/zhongwc1 as sysdba Connected. SQL> select name,pdb from dba_services; NAME PDB -------------------- -------------------- zhongwc1 ZHONGWC1 erp ZHONGWC1 crm ZHONGWC1 SQL> [root@zhongwc2 ~]# crsctl stat res ora.zwc.erp.svc NAME=ora.zwc.erp.svc TYPE=ora.service.type TARGET=ONLINE STATE=ONLINE on zhongwc2 [root@zhongwc2 ~]# [root@zhongwc2 ~]# [root@zhongwc2 ~]# [root@zhongwc2 ~]# crsctl stat res ora.zwc.crm.svc NAME=ora.zwc.crm.svc TYPE=ora.service.type TARGET=ONLINE STATE=ONLINE on zhongwc1 [oracle@zhongwc1 ~]$ lsnrctl status LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 14-OCT-2013 20:33:47 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production Start Date 14-OCT-2013 19:38:33 Uptime 0 days 0 hr. 55 min. 14 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/12.1.0/grid/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/zhongwc1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.31)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.131)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "-MGMTDBXDB" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "_mgmtdb" has 1 instance(s). Instance "-MGMTDB", status READY, has 2 handler(s) for this service... Service "crm" has 1 instance(s). Instance "zwc1", status READY, has 1 handler(s) for this service... Service "zhongwc1" has 1 instance(s). Instance "zwc1", status READY, has 1 handler(s) for this service... Service "zhongwc2" has 1 instance(s). Instance "zwc1", status READY, has 1 handler(s) for this service... Service "zwc" has 1 instance(s). Instance "zwc1", status READY, has 1 handler(s) for this service... Service "zwcXDB" has 1 instance(s). Instance &q
- 更多Oracle疑问解答:
- 运行exp备份oracle数据库提示oracle-12154错误
- 有没有,生产Oracle Rman 备份脚本的工具啊!
- 初学orcle,希望有大大帮忙解说一下详细步骤,从登录oracle到创建表的过程
- oracle语句问题:一张user表,三个字段,id,name,time,插入记录比如:张三2007,李四2008,张三2011
- 如何写一个ORACLE触发器同步两个表中的数据?
- oracle 如何查看一个服务器上有多少个数据库.
- oracle 创建包的时候错误 求解
- oracle 重复列的问题
- oracle 中如何查处2星期前的数据
- 请教oracle数据库安装中的问题
- 请问谁能提供给我标准的oracle ERP的数据库表结构并详细说明各表主要的作用?
- 安装oracle遇到的问题 invalid entry CRC (expected 0x3e12e795 but got 0x9db0e9fd)
- 我的是ORACLE 10G,在RMAN中如何按指定的时间恢复数据文件啊?
- oracle为什么没有自动增长列
- oracle快捷键都有哪些啊?