User wants to run this code to write exports to a oracle external directory TEST_ORAFILE
test_file := UTL_FILE.FOPEN('TEST_ORAFILE','test9002.txt','w');
test_log := UTL_FILE.FOPEN('TEST_ORAFILE','test.log','w');
SQL>CREATE OR REPLACE DIRECTORY TEST_ORAFILE AS '/u01/home/testdba/orafile';
SQL>GRANT READ, WRITE ON DIRECTORY SYS.RIMS_ORAFILE TO TEST
when user run the code, in the alert log, there is this error
ORA-15180: could not open dynamic library ASM Library in the alert.log
there is a metalink note on this issue.
ORA-15180: Could Not Open Dynamic Library ASM Library (libasm.so Open err: open) [ID 1314022.1]
https://support.oracle.com/CSP/ui/flash.html#tab=KBHome(page=KBHome&id=()),(page=KBNavigator&id=(bmDocDsrc=KB&bmDocID=1314022.1&viewingMode=1143&bmDocType=PROBLEM&from=BOOKMARK&bmDocTitle=ORA-15180:%20Could%20Not%20Open%20Dynamic%20Library%20ASM%20Library%20(libasm.so%20Open%20err:%20open)))
The solution is
1) /opt/oracle/ directory does not have permissions for read and execute for the "others" OS group:
[root@1 1]# ls -ld /opt/
drwxr-xr-x 4 root root 4096 Mar 30 16:14 /opt/
[root@1 1]# ls -l /opt/
total 8
drwxr-x--- 4 root oinstall 4096 Mar 30 16:14 oracle <(=== here
drwxr-xr-x 3 root root 4096 Mar 30 16:14 ORCLfmap
[root@1 1]# ls -l /opt/oracle/
total 8
drwxr-x--- 2 root oinstall 4096 Mar 30 16:14 bin
drwxr-xr-x 3 root root 4096 Mar 29 11:08 extapi
[root@1 1]# ls -l /opt/oracle/extapi/
total 4
drwxr-xr-x 3 root root 4096 Mar 29 11:08 64
[root@1 1]# ls -l /opt/oracle/extapi/64/
total 4
drwxr-xr-x 3 root root 4096 Mar 29 11:08 asm
[root@1 1]# ls -l /opt/oracle/extapi/64/asm/
total 4
drwxr-xr-x 3 root root 4096 Mar 29 11:08 orcl
[root@1 1]# ls -l /opt/oracle/extapi/64/asm/orcl/
total 4
drwxr-xr-x 2 root root 4096 Mar 29 11:08 1
[root@1 1]# ls -l /opt/oracle/extapi/64/asm/orcl/1
total 20
-rwxr-xr-x 1 root root 18176 Mar 18 2009 libasm.so
[root@1 1]# ls -l /opt/oracle/extapi/64/asm/orcl/1/libasm.so
-rwxr-xr-x 1 root root 18176 Mar 18 2009 /opt/oracle/extapi/64/asm/orcl/1/libasm.so
2) Since the libasm.so is located at /opt/oracle/extapi/64/asm/orcl/1/ directory, then it cannot be read due to the read and execution permissions for the "others" OS group is closed.
Solution
Please set the in the /opt/oracle/ directory the next read and execution permissions for the "others" OS group like this:
$> ls -ld /opt/
drwxr-xr-x 4 root root 4096 Mar 30 16:14 /opt/
$> ls -l /opt/
total 8
drwxr-xr-x 4 root oinstall 4096 Mar 30 16:14 oracle <(=== here
set the /opt/oracle directory read and executeable for others OS group
After setting this readable,
user get another invalid operation error.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
This is because the os folder for this external directory was not writable by oracle
chmod 777 /u01/home/testdba/
fixed it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment