Oracle 12C R1 OR R2监听相关配置包含pdb

SQL>col con_name format A30;
SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;


    CON_ID DBID NAME     OPEN_MODE
---------- ---------- ------------------------------ ----------
2 1131039996 PDB$SEED     READ ONLY
3  263525486 NETDATAPDB     READ WRITE


SQL> show pdbs;


    CON_ID CON_NAME  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED  READ ONLY  NO
3 NETDATAPDB  READ WRITE NO


查询service_name
SQL> select name,pdb from v$services;


NAME       PDB
------------------------------ --------------------------------------------------------------------------------------------------------------------------------
netdata       CDB$ROOT
SYS$BACKGROUND       CDB$ROOT
SYS$USERS       CDB$ROOT
netdatapdb       NETDATAPDB
netdataXDB       CDB$ROOT


切换至cdb
SQL> alter session set container=netdatapdb;
SQL> create tablespace tbs_netdata datafile '/u01/app/oracle/oradata/netdata/netdatapdb/tbs_netdata01.dbf' size 100M autoextend on next 20M maxsize 8G;
Tablespace created.
SQL> create user netdata identified by netdata default tablespace tbs_netdata temporary tablespace temp;


User created.
SQL> grant create view,create table,create trigger,create synonym,create procedure to netdata;


Grant succeeded.


SQL> grant unlimited tablespace to netdata;


Grant succeeded.


配置监听
[oracle@ORA12CR2-213-8 ~]$ cd /u01/app/oracle/product/12.2.0/db_1/network/admin
[oracle@ORA12CR2-213-8 admin]$ cat sqlnet.ora 
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.


NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8


[oracle@ORA12CR2-213-8 admin]$ cat listener.ora 
# listener.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.


SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = netdata)
      (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
      (SID_NAME = netdata)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = netdatapdb)
      (ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
      (SID_NAME = netdata)
    )
  )


LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.213.8)(PORT = 1521))
  )


ADR_BASE_LISTENER = /u01/app/oracle
DIAG_ADR_ENABLED_LISTENER = OFF

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24486203/viewspace-2141392/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24486203/viewspace-2141392/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值