Skip to Main Content

SQL & PL/SQL

Announcement

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!

Problem with external procedure

datadotcomOct 26 2005 — edited Oct 27 2005
Please,
i'm doing some experiments in Microsoft Win2003 environment calling a c function as external procedures.

I've build a sample using Dev-C++ that make a DLL (i don't know c language) named sysDLL.dll
---
DllClass::DllClass(char *cmd)
{
int num;

num = system(cmd);
}
---

I need only to execute some OS command from PL/SQL (rdbms 10.2).
I've putted DLL in $ORACLE_HOME\bin.

Then I've created library with this statement :
Create Library scott.c_sysdll as 'C:\oracle\product\10.2.0\db_3\bin\sysdll.dll'

and at the end I've created the procedure :
create or replace procedure scott.shell(cmd IN varchar2)
as language C
library c_SysDll
name "DllClass"
parameters (cmd string);

But when I execute this procedure from sql*plus I've always get :

ORA-06521: PL/SQL: Error mapping function
ORA-06522: Unable to load symbol from DLL
ORA-06512: at "SCOTT.SHELL", line 1
ORA-06512: at line 1


Please help me, thanks !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2005
Added on Oct 26 2005
5 comments
1,636 views