23ai, orapwd and the format value

Recently I was playing with 23ai at ExaCC and got a strange error reporting format mismatch for the password file for my standby. Digging over it I saw that the orapwd has a different default value than dbca.

First, check below my database created with dbca (the same process that I described in the previous post):

[oracle@exxc05db01 ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 23.0.0.0.0 - Production on Tue Jul 23 16:32:29 2024
Version 23.4.0.24.05
 
Copyright (c) 1982, 2024, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 23ai EE Extreme Perf Release 23.0.0.0.0 - Production
Version 23.4.0.24.05
 
SQL> col file_name format a80
SQL> set linesize 255
SQL> select * from V$PASSWORDFILE_INFO;
 
FILE_NAME                                                                        FORMAT IS_AS IS_EX     CON_ID
-------------------------------------------------------------------------------- ------ ----- ----- ----------
+DATAC5/ORCL23A/PASSWORD/pwdorcl23a.1071.1172152403                              12     TRUE  FALSE          0
 
SQL> exit
Disconnected from Oracle Database 23ai EE Extreme Perf Release 23.0.0.0.0 - Production
Version 23.4.0.24.05
[oracle@exxc05db01 ~]$

And you can see that if I try to describe this password file, the format is marked as 12:

[oracle@exxc05db01 ~]$ orapwd describe file=+DATAC5/ORCL23A/PASSWORD/pwdorcl23a.1071.1172152403
Password file Description : format=12
[oracle@exxc05db01 ~]$

Even if I copy the file with pwcopy and check it, it continues to have a format value equal to 12:

[grid@exxc05db01 ~]$ asmcmd
ASMCMD> pwcopy +DATAC5/ORCL23A/PASSWORD/pwdorcl23a.1071.1172152403  /tmp/pwdfile23ai
copying +DATAC5/ORCL23A/PASSWORD/pwdorcl23a.1071.1172152403 -> /tmp/pwdfile23ai
ASMCMD>
ASMCMD> exit
[grid@exxc05db01 ~]$
[grid@exxc05db01 ~]$ logout
[root@exxc05db01 ~]#
[root@exxc05db01 ~]# chown oracle:oinstall /tmp/pwdfile23ai
[root@exxc05db01 ~]#
[root@exxc05db01 ~]# su - oracle
Last login: Tue Jul 23 16:40:52 CEST 2024
[oracle@exxc05db01 ~]$ 
[oracle@exxc05db01 ~]$ orapwd describe file=/tmp/pwdfile23ai
Password file Description : format=12
[oracle@exxc05db01 ~]$

So, the dbca created the Oracle password with a format equal to 12. No problem with that.

Root cause

But, if I try to create a new password file, or copy one from the filesystem to ASM (as an example), the default value comes as 12.2:

[oracle@exxc05db01 ~]$ orapwd file=/tmp/pwdfile23ai-NEW
 
Enter password for SYS:
[oracle@exxc05db01 ~]$
[oracle@exxc05db01 ~]$ orapwd describe file=/tmp/pwdfile23ai-NEW
Password file Description : format=12.2
[oracle@exxc05db01 ~]$

When I copied my password file from primary to standby, and copied (using orapwd) from the filesystem to ASM, the orapwd changed the format from 12 to 12.2 and I got the error:

Errors in file /u01/app/oracle/diag/rdbms/orcl23a/orcl23a1/trace/orcl23a1_pr00_159324.trc:
ORA-46952: standby database format mismatch for password file '+DATA/orcl23a/orapwora23dgp'

So, be careful because with 23ai the orapwd default value for the format is 12.2, while everything else continues to create as format 12 (even dbca and the pwcopy from ASM). If orapwd creates, or copy it, the format values  will change to 12.2:

[oracle@exxc05db01 ~]$ orapwd help=yes
Usage 1: orapwd file=<fname> force={y|n} asm={y|n}
          dbuniquename=<dbname> format={12|12.2}
          delete={y|n} input_file=<input-fname>
          'sys={y | password | external(<sys-external-name>)
                | global(<sys-directory-DN>)}'
 
Usage 2: orapwd describe file=<fname>
 
  where
    file   - name of password file (required),
    password
           - password for SYS will be prompted
             if not specified at command line.
             Ignored, if input_file is specified,
    force  - whether to overwrite existing file, also clears
             CRS resource if it already has password file
             registered (optional),
    asm    - indicates that the ASM instance password file is to
             be stored in Automatic Storage Management (ASM)
             disk group (optional),
    dbuniquename
           - unique database name used to identify database
             password files residing in ASM diskgroup
             or Exascale Vault.
             Ignored when asm option is specified (optional),
    format - use format=12 for longer identifiers,
             SHA2 Verifiers etc.
             use format=12.2 for 12.2 features like enforcing user
             profile (password limits and password complexity) and
             account status for administrative users.
             If not specified, format=12.2 is default (optional),
    delete - drops a password file. Must specify 'asm',
             'dbuniquename' or 'file'. If 'file' is specified,
             the file must be located on an ASM diskgroup
             or Exascale Vault,
    input_file
          - name of input password file, from where old user
             entries will be migrated (optional),
    sys    - specifies if SYS user is password, externally or
             globally authenticated.
             For external SYS, also specifies external name.
             For global SYS, also specifies directory DN.
             SYS={y | password} specifies if SYS user password needs
             to be changed when used with input_file,
    describe
           - describes the properties of specified password file
             (required).
 
 
  There must be no spaces around the equal-to (=) character.
[oracle@exxc05db01 ~]$

Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies, or opinions. The information here was edited to be useful for general purposes, and specific data and identifications were removed to allow reach the generic audience and to be useful for the community. Post protected by copyright.

One thought on “23ai, orapwd and the format value

Leave a Reply

Your email address will not be published. Required fields are marked *