For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
// call: // void syslog(int priority, const char *format, ...); // library: // libc SQL> create or replace library libc as 2 '/lib/i386-linux-gnu/libc.so.6' 3 / Library created. SQL> SQL> create or replace procedure WriteSysLog( priority binary_integer, message varchar2 ) is 2 external 3 library libc 4 name "syslog" 5 language C 6 calling standard C 7 parameters( 8 priority int, 9 message string 10 ); 11 / Procedure created. SQL> SQL> declare 2 LOG_INFO constant binary_integer := 6; 3 begin 4 WriteSysLog( LOG_INFO, 'All your syslogs messages are belong to us.' ); 5 end; 6 / PL/SQL procedure successfully completed. SQL>
.. Feb 2 00:00:00 hostname extprocPLSExtProc: All your syslogs messages are belong to us. ..
Hi BillyVerreynne ,
I tested it out and it works, on 64-bit OEL5 I created the library as follows:
create or replace library libc as '/lib64/libc.so.6';
/
Also set SET EXTPROC_DLLS=ANY in $ORACLE_HOME/hs/admin/extproc.ora
[root@nlsupport03 admin]# tail -1 /var/log/messages
Jun 28 10:39:57 nlsupport03 extprocv1120: All your syslogs messages are belong to us.
Greetings,
Harm ten Napel