Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle jjobs and external procedures

Oracle jjobs and external procedures

From: <khusro_at_softech.com.pk>
Date: Thu, 25 Feb 1999 11:58:29 GMT
Message-ID: <7b3dt2$kc4$1@nnrp1.dejanews.com>


I am using oracle 8 for Windows NT. I am looking for a way to execute system commands (exe commands and DOS batch files) directly from oracle PL/SQL. The output of the command is to be returned to SQL for possible entry into a table. I am told that there are 4 ways of doing this, all of which are quite complicated. I am wondering if there is a more direct way of executing a command from SQL: A. Through jobs (see below) B. By writing a Pro C program which invokes the executable, and using a pipe C. By calling an external procedure (dll) which invokes the executable D. By opening a developer 2000 form which invokes the executable

  1. I am facing a problem in submitting a "Job" from Oracle Enterprise Manager and PL/SQL query. For this, I configured "Node Job" from Oracle Enterprise Manager. (I think I can submit these Jobs from PL/SQL query).

I assigned Task of Job to execute OS Command. I entered the command "C:\WINNT\NOTEPAD.EXE". I scheduled it to execute immediately.

However, on submitting the job, it always fails with the error description "Failed to authenticate user".

On Windows NT, I logged in as an Administrator and on Oracle Enterprise Manager as System. The preferred credentials of all the three types of jobs are configured to user name as System and its password.

I want to know the reason for the error and how can I avoid this. I also need the confirmation that can I submit and run these jobs from PL/SQL Query or not.

C. When trying to invoke a dll, I get the error ORA-28575. What is the cause of this error? Relevent sections of my listyener.ora and tnsnames.ora files are attached below. What is the calling convention to be used for DLLs. Can you include a brief sample of a Visual C++ or Visual Basic dll as an external procedure?



Listener.ora
added key (KEY= oracle.world)
	STARTUP_WAIT_TIME_LISTENER = 0
	CONNECT_TIMEOUT_LISTENER = 10
	TRACE_LEVEL_LISTENER = 0
	SID_LIST_LISTENER =
	  (SID_LIST =
	    (SID_DESC =
      	(GLOBAL_DBNAME = radius)

(SID_NAME = ORCL)
) (SID_DESC =
(SID_NAME = extproc)
(PROGRAM=extproc)
/*added key*/ (KEY= oracle.world) ) ) PASSWORDS_LISTENER = (oracle) ------------------------------------------------------------------------
tnsnames.ora
Replaced (KEY = extproc0) with (KEY = oracle.world)

        extproc_connection_data.world=(DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = oracle.world)) (CONNECT_DATA = (SID = extproc)))

Kindly email reply.
Regards,
Khushro

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Feb 25 1999 - 05:58:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US