Problem
When running adrci, "No ADR base is set" message is displayed
$ adrci
ADRCI: Release 19.0.0.0.0 - Production on Thu Sep 16 16:35:41 2021
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
No ADR base is set
adrci>
ADRCI: Release 19.0.0.0.0 - Production on Thu Sep 16 16:35:41 2021
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
No ADR base is set
adrci>
Solution
Most probably adrci_dir.mif file is missing or corrupted.
To confirm the root cause and identify the location of adrci_dir.mif (different versions had different locations), run the below command:
$ strace adrci exec="exit;" 2>&1 | grep adrci_dir.mif
lstat("/u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif", 0x7ffe815ff520) = -1 ENOENT (No such file or directory)
stat("/u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif", 0x7ffe815ff5d0) = -1 ENOENT (No such file or directory)
$ ls -l /u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif
ls: cannot access /u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif: No such file or directory
ls: cannot access /u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif: No such file or directory
To fix the issue:
1. Identify the ADR Base:
SQL> select value from v$diag_info where name='ADR Base';
VALUE
------------------
/u01/app/oracle
VALUE
------------------
/u01/app/oracle
2. Create adrci_dir.mif file with the ADR Base value identified above at the location found with the strace command output:
$ mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/
$ printf "%s\0" "/u01/app/oracle" > /u01/app/oracle/product/19.0.0.0/dbhome_1/log/diag/adrci_dir.mif
3. Verify adrci:
$ adrci
ADRCI: Release 19.0.0.0.0 - Production on Thu Sep 16 16:54:40 2021
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci>
ADRCI: Release 19.0.0.0.0 - Production on Thu Sep 16 16:54:40 2021
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
adrci>
No comments:
Post a Comment