无法创建ASM密码文件
OPW-00010: Could not create the password file. This resource has a Password File.
一、现象
[grid@server01 ~]$ orapwd file='+data/ASM/PASSWORD/orapwasm' asm=y entries=5
Enter password for SYS:
OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.
[grid@server01 ~]$ orapwd file='+data/ASM/PASSWORD/orapwasm' asm=y entries=5 format=12
Enter password for SYS:
OPW-00010: Could not create the password file. This resource has a Password File.
二、检查密码文件
[grid@server01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.2.0.1.0 Production on Fri Aug 12 09:41:11 2022
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> select * from v$passwordfile_info;
no rows selected
[grid@server01 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwasm
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.1112375403
ASM diskgroup discovery string: /dev/sd*
[grid@server01 ~]$ asmcmd
ASMCMD> cd data
ASMCMD> ls
ASM/
ora12c/
三、解决方法
1.修改配置,设置密码文件为空
[grid@server01 ~]$ srvctl modify asm -pwfile
[grid@server01 ~]$ srvctl config asm
ASM home: <CRS home>
Password file:
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.1112375403
ASM diskgroup discovery string: /dev/sd*
2.重新创建密码文件
[grid@server01 ~]$ orapwd file='+data/ASM/PASSWORD/orapwasm' password=oracle entries=5
OPW-00013: Specify either dbuniquename or asm to create password file in Automatic Storage Management disk groups
[grid@server01 ~]$ orapwd file='+data/ASM/PASSWORD/orapwasm' password=oracle asm=y entries=5
OPW-00029: Password complexity failed for SYS user : Password must contain at least 8 characters.
[grid@server01 ~]$ orapwd file='+data/ASM/PASSWORD/orapwasm' password=oracle asm=y entries=5 format=12
3.确认密码文件创建成功
[grid@server01 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/ASM/PASSWORD/orapwasm
Backup of Password file:
ASM listener: LISTENER
Spfile: +DATA/ASM/ASMPARAMETERFILE/registry.253.1112375403
ASM diskgroup discovery string: /dev/sd*
SQL> col file_name for a30
SQL> select * from v$passwordfile_info;
FILE_NAME FORMAT IS_AS CON_ID
------------------------------ ------ ----- ----------
+DATA/ASM/PASSWORD/orapwasm 12 TRUE 0