oracle升級後資料檔案路徑變為大寫

to_be_Dba發表於2020-06-23

進行資料檔案維護時,發現資料檔案的名稱存在大小寫差異。

在某個時間點以後建立的資料檔案,名稱中的db_name和“datafile”都是大寫,而以前都是小寫。


查詢官方文件 Directory for Datafiles and Controlfiles Become Uppercase in 18.3 DBCA. (Doc ID 2542927.1)

在18.3.0.0版本開始,內部設計上的變化導致了此問題。

同時還指向一個internal的文件,無許可權瀏覽:

BUG:29294715  - 18.3 DBCA UPPERCASING DB_UNIQUE_NAME FOR DIRECTORY OF DATA FILES AND CONTROL FILES.

進一步分析發現,我們將資料庫升級到19c,並將compatible由11.2.0.4改為19.3.0.0後,資料檔案路徑就改為大寫了。

使用檔案系統作為儲存介質的資料庫未出現此問題。




Directory for Datafiles and Controlfiles Become Uppercase in 18.3 DBCA. (Doc ID 2542927.1)


APPLIES TO:

Oracle Database Configuration Assistant - Version 18.3.0.0.0 and later
Information in this document applies to any platform.

SYMPTOMS

When you specified lowercase "DB_UNIQUE_NAME" variable(for example:orcl) in DB:18.3 DBCA to create DB instance
after the instance be created, you will find the directory of data files and control files contains uppercase DB_UNIQUE_NAME which you specified.
-----------------------------
/u01/app/oracle/oradata/ORCL
-----------------------------
This result is different from the previous version(DB:12.2/DB:12.1).

If we save the DBCA scripts which can be generated by DBCA, we could see that even if you specified lowercase DB_UNIQUE_NAME in DBCA, 
the script is to create uppercase DB_UNIQUE_NAME in the directory path of data files and control files.

$ pwd
../..oracle/admin/orcl/scripts
 scripts]$ grep "ORCL" *.sql
cloneDBCreation.sql:LOGFILE GROUP 1
('...oradata/ORCL/redo01.log') SIZE 200M,
cloneDBCreation.sql:GROUP 2 ('..oradata/ORCL/redo02.log') SIZE
200M,
cloneDBCreation.sql:GROUP 3 ('../oradata/ORCL/redo03.log') SIZE
200M RESETLOGS;
cloneDBCreation.sql:LOGFILE GROUP 1
('..oradata/ORCL/redo01.log') SIZE 200M,
cloneDBCreation.sql:GROUP 2 ('..oradata/ORCL/redo02.log') SIZE
200M,
...
plug_PDBSeed.sql:host mkdir -p .../oradata/ORCL/pdbseed;
plug_PDBSeed.sql:host mkdir -p .../oracle/oradata/ORCL/pdbseed;
...
rmanRestoreDatafiles.sql:set newname for datafile 4 to  
'..oradata/ORCL/undotbs01.dbf' ;
rmanRestoreDatafiles.sql:set newname for datafile 7 to  
'...oradata/ORCL/users01.dbf' ;

CHANGES

Using DB:18.3 DBCA to create database instance and specified lowercase "DB_UNIQUE_NAME" variable.

CAUSE

It is a limitation according to current design.

SOLUTION

The following method can avoid this issue.

STEP 1: Generate the DBCA Scripts.
STEP 2: Change the uppercase DB_UNIQUE_NAME to lowercase DB_UNIQUE_NAME manually.
STEP 3: Execute these scripts to create DB instance.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26451536/viewspace-2700069/,如需轉載,請註明出處,否則將追究法律責任。

相關文章