oracle12c 命令 创建 pdb,Oracle 12c 命令行创建PDB

1、登陆cdb创建pdb

sqlplus / as sysdba

create pluggable database pdb4

admin user pdb4 identified by pdb4

file_name_convert=(‘/u01/app/oracle/oradata/cdb/pdbseed‘,‘/u01/app/oracle/oradata/cdb/pdb4‘);

2、具体步骤

$sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 20 12:07:32 2018

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

Connected to:

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

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name

CON_NAME

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

CDB$ROOT

SQL> create pluggable database pdb4

2 admin user pdb4 identified by pdb4

3 file_name_convert=(‘/u01/app/oracle/oradata/cdb/pdbseed‘,‘/u01/app/oracle/oradata/cdb/pdb4‘);

Pluggable database created.

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED

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

2 PDB$SEED READ ONLY NO

3 PDB1 READ WRITE NO

4 PDB2 READ WRITE NO

5 PDB3 READ WRITE NO

6 PDB4 MOUNTED

SQL> alter pluggable database all open;

Pluggable database altered.

$sqlplus pdb4/pdb4@192.168.1.243:1521/pdb4

SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 20 12:11:50 2018

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

Connected to:

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

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name

CON_NAME

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

PDB4

SQL>

阅读剩余
THE END
阿里云ECS特惠活动
阿里云ECS服务器 - 限时特惠活动

云服务器爆款直降90%

新客首单¥68起 | 人人可享99元套餐,续费同价 | u2a指定配置低至2.5折1年,立即选购享更多福利!

新客首单¥68起
人人可享99元套餐
弹性计费
7x24小时售后
立即查看活动详情
阿里云ECS服务器特惠活动