1. 程式人生 > >12C -- ORA-65005: missing or invalid file name pattern for file

12C -- ORA-65005: missing or invalid file name pattern for file

com users 新的 pdb 是不是 undo use 方式 blog

克隆pdb創建新的pdb的時候遇到了以下的錯誤,具體過程如下文。
數據庫版本:12.2.0.1

查看已有pdb的tempfile文件

SQL> select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/TEMPFILE/temp.276.947842435

查看已有pdb的datafile文件

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/system.274.947842433
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/sysaux.275.947842433
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/undotbs1.273.947842433
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/users.278.947842449
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/undotbs2.277.947878603

  

創建新的pdb

SQL> create pluggable database abce from o12c1pdb file_name_convert=(
  2  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/datafile/system.274.947842433‘,‘+data/o12c/abce/datafile/system01.dbf‘,
  3  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/datafile/sysaux.275.947842433‘,‘+data/o12c/abce/datafile/sysaux01.dbf‘,
  4  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/datafile/undotbs1.273.947842433‘,‘+data/o12c/abce/datafile/undotbs101.dbf‘,
  5  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/datafile/undotbs2.277.947878603‘,‘+data/o12c/abce/datafile/undotbs201.dbf‘,
  6  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/datafile/users.278.947842449‘,‘+data/o12c/abce/datafile/users01.dbf‘,
  7  ‘+data/o12c/25fc2d397af41d70e0524a0f0a0aaeda/tempfile/temp.276.947842435‘,‘+data/o12c/abce/tempfile/temp01.dbf‘);
create pluggable database abce from o12c1pdb file_name_convert=(
*
ERROR at line 1:
ORA-65005: missing or invalid file name pattern for file -
+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/system.274.947842433


SQL>

創建失敗,報錯。查了一下MOS,沒有發現類似的問題。

在老蓋的網站發了一篇文章,不過與本人遇到的問題還是有差別。這裏鏈接一下,也許對大家有用:Oracle 12c:多租戶數據庫克隆 ORA-01276 錯誤處理一例

當然,也有人是因為沒有加上temp文件導致的,但是與本人遇到的問題還是不符合。

最終懷疑是不是大小的問題,於是把上面從v$tempfile、v$datafile中查看到的name結果直接拷貝在create語句中(保持大小寫格式不變),同時要創建的pdb的文件路徑也以類似的方式(路徑以大寫的格式),再次執行。居然創建成功了!!!

SQL> create pluggable database abce from o12c1pdb file_name_convert=(
  2      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/system.274.947842433‘,‘+DATA/O12C/ABCE/DATAFILE/system01.dbf‘,
  3      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/sysaux.275.947842433‘,‘+DATA/O12C/ABCE/DATAFILE/sysaux01.dbf‘,
  4      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/undotbs1.273.947842433‘,‘+DATA/O12C/ABCE/DATAFILE/undotbs101.dbf‘,
  5      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/undotbs2.277.947878603‘,‘+DATA/O12C/ABCE/DATAFILE/undotbs201.dbf‘,
  6      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/DATAFILE/users.278.947842449‘,‘+DATA/O12C/ABCE/DATAFILE/users01.dbf‘,
  7      ‘+DATA/O12C/25FC2D397AF41D70E0524A0F0A0AAEDA/TEMPFILE/temp.276.947842435‘,‘+DATA/O12C/ABCE/TEMPFILE/temp01.dbf‘);

Pluggable database created.

SQL> 

  

12C -- ORA-65005: missing or invalid file name pattern for file