Monday, July 31, 2023

DB_UNKNOWN directory was created when using asmcmd pwcopy

DB_UNKNOWN directory was created when using asmcmd pwcopy:

'DB_UNKNOWN' directory was created when using asmcmd pwcopy (Doc ID 2329386.1)

1. Able to connect to primary RAC (RAC12C1 & RAC12C2) database as a sysdba user using scan name which indicates password file is working

[oracle@node1 ~]$ sqlplus sys/Mallik123@RAC12C as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:11:11 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Thu Jun 22 2023 21:52:47 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

2. Able to connect to primary RAC (RAC12C1 & RAC12C2) instance 1 as a sysdba user using scan name which indicates password file is working

[oracle@node1 ~]$ sqlplus sys/Mallik123@RAC12C1 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:11:17 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Mon Jul 03 2023 12:11:12 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

3. Able to connect to primary RAC (RAC12C1 & RAC12C2) instance 2 as a sysdba user using scan name which indicates password file is working

[oracle@node1 ~]$ sqlplus sys/Mallik123@RAC12C2 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:11:25 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Mon Jul 03 2023 12:11:18 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

4. Unable to connect to Standby RAC (RACSB1 & RACSB2) database as a sysdba user using scan name which indicates password file is not working

[oracle@node1 ~]$ sqlplus sys/Mallik123@RACSB as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:11:33 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied
ORA-17503: ksfdopn:2 Failed to open file +DATA/RACSB/PASSWORD/orapwracsb
ORA-15173: entry 'orapwracsb' does not exist in directory 'PASSWORD'
ORA-06512: at line 4
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 679
ORA-06512: at line 2
Enter user-name:

5. Unable to connect to Standby RAC (RACSB1 & RACSB2) instance 1 as a sysdba user using scan name which indicates password file is not working

[oracle@oraclenode1 script]$ sqlplus sys/Mallik123@RACSB1 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:12:24 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied
ORA-17503: ksfdopn:2 Failed to open file +DATA/RACSB/PASSWORD/orapwracsb
ORA-15173: entry 'orapwracsb' does not exist in directory 'PASSWORD'
ORA-06512: at line 4
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 679
ORA-06512: at line 2
Enter user-name: 

6. Unable to connect to Standby RAC (RACSB1 & RACSB2) instance 2 as a sysdba user using scan name which indicates password file is not working

[oracle@oraclenode1 script]$ sqlplus sys/Mallik123@RACSB2 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:12:32 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied
ORA-17503: ksfdopn:2 Failed to open file +DATA/RACSB/PASSWORD/orapwracsb
ORA-15173: entry 'orapwracsb' does not exist in directory 'PASSWORD'
ORA-06512: at line 4
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 679
ORA-06512: at line 2
Enter user-name: 

7. Verify the password file location 

[oracle@oraclenode1 script]$ srvctl config database -d RACSB
Database unique name: RACSB
Database name: RACSB
Oracle home: /u01/app/oracle/product/12.2.0.1/dbhome_1
Oracle user: oracle
Spfile: +DATA/RACSB/PARAMETERFILE/spfileRACSB.ora
Password file: +DATA/RACSB/PASSWORD/orapwRACSB >>>> Password file location
Domain:
Start options: open
Stop options: immediate
Database role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,RECO
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: RACSB1,RACSB2
Configured nodes: oraclenode1,oraclenode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@oraclenode1 script]$

8. We has password file copied from Primary to standby on local file system. We need to copy that to ASM disk group using pwcopy command.

[oracle@oraclenode1 dbs]$ asmcmd -p
ASMCMD [+] > pwcopy '/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapwRACSB1' '+DATA/RACSB/PASSWORD/orapwRACSB'
copying /u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapwRACSB1 -> +DATA/RACSB/PASSWORD/orapwRACSB

ASMCMD [+] > ls -l +DATA/RACSB/PASSWORD/orapwRACSB
Type      Redund  Striped  Time             Sys  Name
PASSWORD  UNPROT  COARSE   JUL 03 12:00:00  N    orapwRACSB => +DATA/DB_UNKNOWN/PASSWORD/pwddb_unknown.305.1141215603
ASMCMD [+] >

Note that if we don't us dbuniquename along with pwcopy then directory will created as DB_UNKNOWN
ASMCMD [+DATA] > rm -rf DB_UNKNOWN/

Note that below command failed due to environmental variable are pointing to GI home.
ASMCMD [+DATA] > pwcopy --dbuniquename RACSB '/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapwRACSB1' '+DATA/RACSB/PASSWORD/orapwRACSB'
PRCD-1229 : An attempt to access configuration of database RACSB was rejected because its version 12.2.0.1.0 differs from the program version 19.0.0.0.0. Instead run the program from /u01/app/oracle/product/12.2.0.1/dbhome_1.
copying /u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapwRACSB1 -> +DATA/RACSB/PASSWORD/orapwRACSB
ASMCMD-9453: failed to register password file as a CRS resource
ASMCMD [+DATA] > 

[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [+ASM1] ? RACSB1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 dbs]$ asmcmd -p
ASMCMD [+] > pwcopy --dbuniquename RACSB '/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/orapwRACSB1' '+DATA/RACSB/PASSWORD/orapwRACSB'
ASMCMD [+] > exit
[oracle@oraclenode1 dbs]$


[oracle@oraclenode1 dbs]$ sqlplus sys/Mallik123@RACSB as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:24:58 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@oraclenode1 dbs]$ sqlplus sys/Mallik123@RACSB1 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:25:09 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Thu Jun 22 2023 21:52:47 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@oraclenode1 dbs]$ sqlplus sys/Mallik123@RACSB2 as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jul 3 12:25:16 2023

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Mon Jul 03 2023 12:25:09 +05:30

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@oraclenode1 dbs]$

Regards,
Mallik

No comments:

Post a Comment

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...