Symptoms
Non-cdb to pdb conversion on VMDB failing with ASM errors
Inside setASMEnvironment()…
=============================
Environment set
ORACLE_HOME : /u01/app/19.0.0.0/grid
ORACLE_SID : +ASM1
Executing ASM command: sh -c “/u01/app/19.0.0.0/grid/bin/asmcmd –privilege sysdba ls +DATA/DBATKI_TRGT”
Connected to an idle instance.
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
=============================
Inside unsetASMEnvironment()…
=============================
Environment set
ORACLE_HOME : /u01/app/oracle/product/12.1.0.2/dbhome_1
ORACLE_SID :
*******FATAL ERROR*******
PROGRAM : (/u01/app/oracle/product/12.1.0.2/dbhome_1/appsutil/bin/txkCreatePDB.pl)
TIME : Mon Oct 25 09:57:46 2021
FUNCTION: main::validateASMDataDir [ Level 1 ]
ERRORMSG: Data top directory +DATA/DBATKI_TRGT does not exists on ASM.
*******FATAL ERROR*******
PROGRAM : (/u01/app/oracle/product/12.1.0.2/dbhome_1/appsutil/bin/txkCreatePDB.pl)
TIME : Mon Oct 25 09:57:46 2021
FUNCTION: main::validateASMDataDir [ Level 1 ]
ERRORMSG: Data top directory +DATA/DBATKI_TRGT does not exists on ASM.
The EBS script “txkCreatePDB.pl” is failing with below errors:
========
Executing ASM command: sh -c “/u01/app/19.0.0.0/grid/bin/asmcmd –privilege sysdba ls +DATA/DBATKI_TRGT”
Connected to an idle instance.
ASMCMD-8102: no connection to Oracle ASM; command requires Oracle ASM to run <<<<<<<
–
–
FUNCTION: main::validateASMDataDir [ Level 1 ]
ERRORMSG: Data top directory +DATA/DBATKI_TRGT does not exists on ASM.============================================This shows that this DISk doesn’t exist so first check the ASM diskgroups.
We are able to connected to the asm instance and able to see the disk groups, but from the script it is not able to connect
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 8388608 5536604 0 5536604 0 Y DATA/
MOUNTED EXTERN N 512 512 4096 4194304 1679360 1669196 0 1669196 0 N RECO/
ASMCMD> exit
[grid@db-test ~]$ sqlplus ‘/as sysasm’
SQL*Plus: Release 19.0.0.0.0 – Production on Mon Oct 25 12:34:50 2021
Version 19.12.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 – Production
Version 19.12.0.0.0
SQL> select name, state from v$asm_diskgroup;
NAME STATE
—————————— ———–
DATA MOUNTED
RECO MOUNTED
SQL>
Solution:
oracle user was missing asmadmin group
so we added asmadmin group to oracle user
[grid@db-test ~]$ id
uid=102(grid) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1004(asmadmin),1005(asmoper),1006(asmdba)
[grid@db-test ~]$
[oracle@db-test bin]$ id
uid=101(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dbaoper),1003(dba),1006(asmdba)
[oracle@db-test bin]$
usermod -a -G asmadmin oracle