千家信息网

Oracle 12c 命令行创建PDB

发表于:2025-02-05 作者:千家信息网编辑
千家信息网最后更新 2025年02月05日,1、登陆cdb创建pdbsqlplus / as sysdbacreate pluggable database pdb4admin user pdb4 identified by pdb4file_
千家信息网最后更新 2025年02月05日Oracle 12c 命令行创建PDB

1、登陆cdb创建pdb

sqlplus / as sysdbacreate pluggable database pdb4admin user pdb4 identified by pdb4file_name_convert=('/u01/app/oracle/oradata/cdb/pdbseed','/u01/app/oracle/oradata/cdb/pdb4');

2、具体步骤

$sqlplus / as sysdbaSQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 20 12:07:32 2018Copyright (c) 1982, 2014, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsSQL> show con_nameCON_NAME------------------------------CDB$ROOTSQL> 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                           MOUNTEDSQL> alter pluggable database all open;Pluggable database altered.$sqlplus pdb4/pdb4@192.168.1.243:1521/pdb4SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 20 12:11:50 2018Copyright (c) 1982, 2014, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsSQL> show con_nameCON_NAME------------------------------PDB4SQL> 
0