[20170512]No ADR base is set.txt
--//生产系统一台机器,使用adrci包如下提示No ADR base is set.虽然我可以
$ rlwrap adrci
ADRCI: Release 11.2.0.4.0 - Production on Fri May 12 10:50:50 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
No ADR base is set
--//虽然我设置base能正常使用,
adrci> set base /u01/app/oracle
adrci> show homes
ADR Homes:
diag/clients/user_oracle/host_3910336104_80
diag/tnslsnr/xxxxx/listener
diag/rdbms/xxxxx/xxxxx
$ strace -f -o /tmp/adrci.txt adrci
ADRCI: Release 11.2.0.4.0 - Production on Fri May 12 10:54:47 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
No ADR base is set
adrci> quit
$ grep open /tmp/adrci.txt
....
11620 open("init.adi", O_RDONLY) = -1 ENOENT (No such file or directory)
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/mesg/diaus.msb", O_RDONLY) = 4
11620 open("/proc/self/fd/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 5
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/mesg/diaus.msb", O_RDONLY) = 6
11620 open("/home/oracle/diag", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/adrci_dir.mif", O_RDONLY) = 7
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/log/diag", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 8
11620 open("/etc/localtime", O_RDONLY) = 9
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/rdbms", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 9
11620 open("/u01/app/oracle/product/11.2.0/dbhome_1/oracore/mesg/lrmus.msb", O_RDONLY) = 3
--//开始以为init.adi不存在的问题,但是我查询我正常工作的机器这个文件也不存在.
$ hexdump -C -v /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/adrci_dir.mif
00000000 2f 75 30 31 2f 61 70 70 2f 6f 72 61 63 6c 65 2f |/u01/app/oracle/|
00000010 70 72 6f 64 75 63 74 2f 31 31 2e 32 2e 30 2f 64 |product/11.2.0/d|
00000020 62 68 6f 6d 65 5f 31 2f 6c 6f 67 00 |bhome_1/log.|
0000002c
--//而我看了我的能正常工作的机器,保存的内容如下:
$ hexdump -C -v $(locate adrci_dir.mif)
00000000 2f 75 30 31 2f 61 70 70 2f 6f 72 61 63 6c 65 00 |/u01/app/oracle.|
00000010
--//我看了几台能正常访问的机器都是保存"/u01/app/oracle",注意后面有asci(0).猜测问题在这里.
$ cd /u01/app/oracle/product/11.2.0/dbhome_1/log/diag
$ cp adrci_dir.mif adrci_dir.mif_bak
--//然后从别的机器拷贝过来,在测试ok.
$ rlwrap adrci
ADRCI: Release 11.2.0.4.0 - Production on Fri May 12 11:13:46 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle"
--//什么会产生这个错误,真是不得而之.