如何进行pdb的重命名 Connect to the CDB and check the information about the PDB first: 第一步: select name, open_mode, restricted from v$pdbs; select name, con_id, dbid,con_uid,guid from v$containers order by con_id; select service_id,name,network_name,creation_date,pdb,con_id from cdb_services; Assuming the name of your PDB is PDB1,the steps could be like this: Put the PDB in RESTRICTED mode for a rename operation: 第二步: alter pluggable database PDB1 close; alter pluggable database PDB1 open restricted; select name, open_mode, restricted from v$pdbs; Then connect to the PDB and rename it: 第三步: alter session set container=PDB1; alter pluggable database rename global_name to <NEW_PDB_NAME>; Close the PDB. alter pluggable database close immediate; Open the PDB in read/write mode. 第四步: alter pluggable database open; Please note that it is important to perform the last two steps (close and open the PDB). You must close the PDB and open it in read/write mode for Oracle Database to complete the integration of the new PDB service name into the CDB. Connect to the CDB and check the information again: 第五步: alter session set container=CDB$ROOT; select name, open_mode, restricted from v$pdbs; select name, con_id, dbid,con_uid,guid from v$containers order by con_id; select service_id,name,network_name,creation_date,pdb,con_id from cdb_services; However, the directories corresponding to the PDB do not get renamed. If originally your PDB's files were present in something like '/u01/oradata/CDB1/pdb1' it does not get moved into a directory reflecting the new name. If you would want to move the files to a new directory matching with the name of the NEW_PDB_NAME, then you would have to create the new directory manually and then move the files using the ONLINE MOVE facility of the 12c database: $ mkdir '/u01/oradata/CDB1/<NEW_PDB_NAME> SQL> alter database move datafile '/u01/oradata/CDB1/pdb1/system01.dbf' to '/u01/oradata/CDB1/<NEW_PDB_NAME>/system01.dbf' To rename Oracle Managed Files (OMFs), Please follow the below document. How to rename Oracle-Managed Files (OMFs) (Doc ID 191574.1) The tempfiles of the temporary tablespace cannot be moved by the 'online move' command though, so you would have to drop the tempfile associated with the temp tablespace and recreate a new tempfile in the new directory. SQL> alter database tempfile '/u01/oradata/CDB1/pdb1/temp01.dbf' drop including datafiles; SQL> alter tablespace TEMP add tempfile '/u01/oradata/CDB1/<NEW_PDB_NAME>/temp01.dbf' size 10M reuse;
pdb重命名
来源:这里教程网
时间:2026-03-03 20:53:18
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 数据库优化指南:如何将基本功能运用到极 致?
数据库优化指南:如何将基本功能运用到极 致?
26-03-03 - oracle数据坏块处理(三)-数据抽取插入到新表中
oracle数据坏块处理(三)-数据抽取插入到新表中
26-03-03 - 破解 ORA-14551:在 PL/SQL 中执行 DML 的陷阱与解决方案
- Oracle 统一审计- Best 实践四
Oracle 统一审计- Best 实践四
26-03-03 - Oracle SQL语句为什么不走索引-场景三
Oracle SQL语句为什么不走索引-场景三
26-03-03 - 数据库去O搞了个寂寞!甲骨文股价翻倍,市值突破5200亿美金!
数据库去O搞了个寂寞!甲骨文股价翻倍,市值突破5200亿美金!
26-03-03 - Oracle 统一审计- Best 实践五
Oracle 统一审计- Best 实践五
26-03-03 - 查询DBA_FREE_SPACE缓慢问题
查询DBA_FREE_SPACE缓慢问题
26-03-03 - Oracle Linux 8.10 图形化安装 Oracle Database 21c
- 长沙岳麓区家具馆:邂逅高颜值餐桌,开启优雅用餐时光
长沙岳麓区家具馆:邂逅高颜值餐桌,开启优雅用餐时光
26-03-03
