I was trying to copy a password file from a file system to the ASM. Every time I tried to copy this file, I noticed that the directory named “DB_UNKNOWN” was created. This error usually happens when the database unique_name (resource) is not configured into the CRS and the output can be seen as below:
[oracle@techdaserver dbs]$ . oraenv ORACLE_SID = [TECHDB] ? +ASM1 The Oracle base remains unchanged with value /u01/app/oracle [oracle@techdaserver dbs]$ asmcmd ASMCMD> pwcopy '/u01/app/oracle/19.3.0/db/dbs/orapwTECHDB' '+DATA/TECHDB/PASSWORD/' copying /u01/app/oracle/19.3.0/db/dbs/orapwTECHDB -> +DATA/TECHDB/PASSWORD/ ASMCMD> ls -ltr +DATA/TECHDB/PASSWORD/ WARNING:option 'r' is deprecated for 'ls' please use 'reverse' Type Redund Striped Time Sys Name PASSWORD UNPROT COARSE AUG 19 12:00:00 N PASSWORD => +DATA/DB_UNKNOWN/PASSWORD/pwddb_unknown.282.1080996227
To fix this issue, you must use the “–dbuniquename” clause while copying a file from disk to the ASM:
[oracle@techdaserver dbs]$ . oraenv ORACLE_SID = [TECHDB] ? +ASM1 The Oracle base remains unchanged with value /u01/app/oracle [oracle@techdaserver dbs]$ asmcmd ASMCMD> pwcopy --dbuniquename TECHDB '/u01/app/oracle/19.3.0/db/dbs/orapwTECHDB' '+DATA/TECHDB/PASSWORD/' copying /u01/app/oracle/19.3.0/db/dbs/orapwTECHDB -> +DATA/TECHDB/PASSWORD/orapwTECHDB ASMCMD> ls -ltr +DATA/TECHDB/PASSWORD/ WARNING:option 'r' is deprecated for 'ls' please use 'reverse' Type Redund Striped Time Sys Name PASSWORD UNPROT COARSE AUG 19 12:00:00 N orapwTECHDB => +DATA/TECHDB/PASSWORD/pwdTECHDB.282.1080996329 PASSWORD UNPROT COARSE AUG 19 12:00:00 Y pwdTECHDB.282.1080996329
I hope that this post helps you!
Hi! I am Bruno, a Brazilian born and bred. Former Oracle ACE, Computer Scientist, MSc in Data Science, over ten years of experience in companies such as IBM, Epico Tech, and Playtech based in three different countries (Brazil, Hungary, and Sweden) and joined projects remotely in many others. I am super excited to show you my interest in Databases, Cloud, Data Science, Data Engineering, Bigdata, AI, Programming, Software Engineering, and data in general.
(Continue reading)