PDB資料檔案的線上位置以及檔名更改
SQL> alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/o1_mf_system_b7x420m8_.dbf';
alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/o1_mf_system_b7x420m8_.dbf'
*
ERROR at line 1:
ORA-01276: Cannot add file /oracle/app/oracle/oradata/ITAMpdb/o1_mf_system_b7x420m8_.dbf. File has an Oracle Managed Files file name.
說明在OMF管理方式下資料檔案的移動不能用同樣的檔名。
SQL> host oerr ora 1276
01276, 00000, "Cannot add file %s. File has an Oracle Managed Files file name."
// *Cause: An attempt was made to add to the database a datafile, log file,
// control file, snapshot control file, backup control file,
// datafile copy, control file copy or backuppiece with an Oracle
// Managed Files file name.
// *Action: Retry the operation with a new file name.
SQL> alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/system_01.dbf';
alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/system_01.dbf'
*
ERROR at line 1:
ORA-01135: file 8 accessed for DML/query is offline
ORA-01110: data file 8: '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf'
在PDB中移動資料檔案需要PDB處於OPEN狀態,否則移動出現錯誤。
SQL> conn /as sysdba
Connected.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
---------------------------------------- ------------------------------
PDB$SEED READ ONLY
ITAMPDB MOUNTED
SQL> alter pluggable database itampdb open;
Pluggable database altered.
SQL> alter session set container=itampdb;
Session altered.
SQL> alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_system_b7x420m8_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/system_01.dbf';
Database altered.
SQL> select file_name from dba_data_files;
FILE_NAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------
/oracle/app/oracle/oradata/ITAMpdb/system_01.dbf --------檔案移動成功
/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_sysaux_b7x420mk_.dbf
/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_users_b7x425yb_.dbf
SQL> alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_sysaux_b7x420mk_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/sysaux_01.dbf';
Database altered.
SQL> alter database move datafile '/oracle/app/oracle/oradata/ITAM/0949345E60F736A4E0530101007F2940/datafile/o1_mf_users_b7x425yb_.dbf' to '/oracle/app/oracle/oradata/ITAMpdb/users_01.dbf';
Database altered.
SQL> select file_name from dba_data_files;
FILE_NAME
----------------------------------------------------------------------------------------------------------------------------------------------------------------
/oracle/app/oracle/oradata/ITAMpdb/sysaux_01.dbf
/oracle/app/oracle/oradata/ITAMpdb/users_01.dbf
/oracle/app/oracle/oradata/ITAMpdb/system_01.dbf
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28612416/viewspace-1368684/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 更改資料檔案位置或改名
- 更改資料庫裸裝置資料檔案的位置資料庫
- 更改MySQL資料檔案存放目錄位置MySql
- 更改Oracle檔案位置Oracle
- 12c pdb線上移動資料檔案或者重新命名資料檔案
- 更改MySQL資料檔案目錄位置MySql
- 4.3.2.2 關於CDB Root和PDB$SEED檔案的名稱和位置
- 更改Listener日誌檔案的位置
- 12C關於CDB、PDB線上移動資料檔案、線上重新命名資料檔案的操作說明
- Centos8中如何更改資料夾中多個檔案的副檔名CentOS
- perl更改當前資料夾下的檔名
- 資料檔案位置調整
- raw 裸裝置資料檔案更改其他raw裸裝置位置
- 更改資料檔案路徑的方法
- PDB檔案的用途
- 【TABLESPACE】通過重建控制檔案調整表空間資料檔案位置及名稱
- 如何更改線上重做日誌檔案的大小
- 4.3.2.3 關於PDB$SEED資料檔案的屬性
- oracle 12c R1 可以線上對資料檔案重新命名或者移動資料檔案位置Oracle
- oracle 線上rename資料檔案Oracle
- 線上移動資料檔案
- Linux批量更改檔案字尾名Linux
- 修改資料檔案的位置的兩種方法
- spring boot更改配置檔案 application.properties的位置Spring BootAPP
- 修改Oracle資料檔名及資料檔案存放路徑Oracle
- 移動資料檔名中含有特殊字元的資料檔案方法字元
- SAP GUI PDB檔案的作用GUI
- 更改ORACLE資料檔名字的方法Oracle
- 【TABLESPACE】資料庫Open狀態下調整表空間資料檔案位置及名稱資料庫
- 【TABLESPACE】資料庫Mount狀態下調整表空間資料檔案位置及名稱資料庫
- hosts檔案位置
- P處理 批量更改檔名
- 歸檔模式下,線上刪除資料檔案的完全恢復模式
- oracle 修改資料檔案位置(路徑)(移動)Oracle
- RMAN 資料庫克隆檔案位置轉換方法資料庫
- VS2010下使用dmp檔案和pdb檔案定位到dll中崩潰位置的方法
- Oracle 12.2.0.1.0 PDB丟失資料檔案對CDB的影響Oracle
- 來改變一下Oracle資料檔案的位置Oracle