dynamically creating directories [message #370010] |
Wed, 29 November 2000 08:49 |
mahesh kumar
Messages: 4 Registered: November 2000
|
Junior Member |
|
|
i have written the below mentioned code(found from this site itself), i had no problems creating the library or function but when running the pl/sql block which calls the function iam getting an error which i have pasted at the end. pls help me on this
create or replace library clib as 'c:\winnt\system32\crtdll.dll';
/
CREATE OR REPLACE FUNCTION plsql_system(cmd in varchar2)
RETURN BINARY_INTEGER
AS LANGUAGE C LIBRARY clib
NAME "system";
/
set serveroutput on
DECLARE
cmd VARCHAR2(2000);
retval NUMBER;
BEGIN
-- create the directory test_dir on drive d:
cmd := 'md d:\test_dir';
retval := plsql_system( cmd );
dbms_output.put_line( retval );
end;
ERROR at line 1:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-12154: TNS:could not resolve service name
ORA-06512: at "SCOTT.PLSQL_SYSTEM", line 0
ORA-06512: at line 7
|
|
|