创建一个新的容器数据库PDB:create pluggable database pdb1 admin user pdb1 identified by pdb1 file_name_convert=('/u01/app/oracle/oradata/orcl/pdbseed/','/u01/app/oracle/oradata/orcl/pdb1/'); 启动一个创建好的PDB:alter pluggable database pdb1 open; 切换使用一个启动了的PDB: alter sessio...
1. 通过alter session set container切换到PDB 登录到CDB,通过alter session set container切换当前的容器为PDB, 2. 通过ORACLE_PDB_SID 如果是18c、19c以上,可以设置ORACLE_PDB_SID环境变量的值,然后再登录,就是这个PDB, 3. 通过设置tnsnames.ora 配置一下tnsnames.ora,其中的service_name设置成PDB的名称, 再通...
SQL>selectpdb_name,statusfromcdb_pdbs ; PDB_NAME STATUS--- ---D3CPDB NORMAL PDB$SEED NORMAL D4CPDB NEW SQL>selectcon_id,dbid,NAME,OPEN_MODEfromv$pdbs; CON_ID DBID NAME OPEN_MODE--- --- ---
WHEREPDBISNOTNULLANDCON_ID>2ORDERBYPDB; --查看历史pdb信息 col db_namefora15 col pdb_namefora15 col CLONED_FROM_PDB_NAMEfora20 SELECTDB_NAME,CON_ID,pdb_id,PDB_NAME,OPERATION,OP_TIMESTAMP,CLONED_FROM_PDB_NAME FROMCDB_PDB_HISTORYWHERECON_ID<>pdb_idandpdb_id>2 anddb_name=(selectnamefro...
1. PDB创建执行步骤 1.1 创建PDB su - oracle sqlplus /nolog conn /as sysdba;show pdbs; ---可以先查看下当前CDB下面有哪些已存在的PDB,防止名称重复 create pluggable database pdb_name admin user username identified by password [default tablespace tablespace_name];注意:只需在其中一个节点上执行以下...
CREATE PLUGGABLE DATABASE PDB_GBK FROM PDBGBK@cdbgbk_link; select name ,con_id , open_mode from v$pdbs ; 1. 2. 5 .打开PDB alter session set container=pdb_gbk ; alter database open ; show con_name ; select value from nls_database_parameters where parameter ='NLS_CHARACTERSET'; ...
alter pluggable database pdb1 open restricted; 二、重命名命名PDB 我们切换到 PDB 并重命名全局名称。 alter session set container=pdb1; alter pluggable database rename global_name to pdb2; 我们重新启动 PDB 并显示 PDB 名称。 alter pluggable database close immediate; ...
3.3、创建一个新的PDB: SQL> create pluggable database test_pdb admin user admin identified by admin; SQL> alter pluggable database test_pdb open; ---将test_pdb 打开 SQL> select con_id,dbid,con_uid,guid,name,open_mode,create_scn,total_size,block_size from v$pdbs; ---查看pdb的状态 CON...
5 PDB1 MOUNTED 目标库:启动pdb1 SQL> alter pluggable database pdb1 open; Pluggable database altered. 源库:查看pdb1,发现pdb1已经不存在了。 SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED --- --- --- 2 PDB$SEED READ ONLY NO Creating a PDB by relocating it ...
我们可以通过查询 DBA_PDBS 和 V$PDBS 视图来查看 PDB 是否存在。COLUMN pdb_name FORMAT A20SELECT pdb_name, statusFROM dba_pdbsORDER BY pdb_name;PDB_NAME STATUS--- ---PDB$SEED NORMALPDB1 NORMALPDB2 NEWPDB3 NEWSQL> COLUMN name FORMAT A20SELECT name, open_modeFROM v$pdbsORDER BY name;NAME ...