Home » SQL & PL/SQL » SQL & PL/SQL » Execute SQL*Loader from Stored Proc
Execute SQL*Loader from Stored Proc [message #41014] Mon, 18 November 2002 02:24 Go to next message
jlz
Messages: 1
Registered: November 2002
Junior Member
Hi,

I try execute SQL*Loader from a stored proc :

->

connect sys/change_on_install

grant create any library to scott;

connect scott/tiger

create or replace library clib as 'c:winntsystem32crtdll.dll';/

CREATE OR REPLACE FUNCTION plsql_system(cmd in varchar2)
RETURN BINARY_INTEGER AS EXTERNAL LIBRARY clibNAME "system";/

show errors

set serveroutput on

DECLARE cmd VARCHAR2(2000);
retval NUMBER;

BEGIN
cmd := 'sqlldr80.exe userid=test/test@hmg control=d:temploaderdata.ctl log=d:temploaderdata.log errors=100';
retval := plsql_system( cmd );
dbms_output.put_line( retval );
END;/
-------------------------------------------------

but this error occur :

ERROR at line 1:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "SCOTT.PLSQL_SYSTEM", line 0
ORA-06512: at line 6

Why ?
What can I do to run SQL Loader by StoredProc ??

Thanks

jl
Re: Execute SQL*Loader from Stored Proc [message #41015 is a reply to message #41014] Mon, 18 November 2002 04:10 Go to previous messageGo to next message
Depa
Messages: 30
Registered: June 2002
Member
do you have the following entry in the tnsnames.ora file

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
Re: Execute SQL*Loader from Stored Proc [message #41024 is a reply to message #41014] Mon, 18 November 2002 20:56 Go to previous message
Barbara Boehmer
Messages: 9091
Registered: November 2002
Location: California, USA
Senior Member
Click on the link below for information on matching entries in the tnsnames.ora, listener.ora, and sqlnet.ora needed to avoid the error message:

Previous Topic: how to convert "110000" into "one hundred ten thousand"
Next Topic: to display first 5 highest paid employee
Goto Forum:
  


Current Time: Mon Apr 29 06:37:21 CDT 2024