ORA-3106: from Pro* C executable

Hi Guys,
We're developing an utility in PRO *C.
In it,we've connected to database using some syntax like-
EXEC SQL connect :g_uid identified by :g_pass
Now this function works all right in the initial part of execution.
Then we restart the instance. Now this hell- blazer ORA-3106: fatal two-task communication protocol error comes up.
We've got throgh some links in metalink et. all where it says that memory leak can be a cause for it, which may happen in our case due to a no. of connections/disconnections.
Our DB version- 8.1.7.0 and platform Windows 2003 server R2.
We also came to know that "TWO_TASK" is a Unix environment variable that can be set to a default TNS
connect string. So we set it as the corresponding alias in TNSNAMES.ora.
But that didn't solve.
Moreover- a no. of times we saw from Windows Task Manager that two oracle.exe are being generated.
Regards,
Hulk

Your basic problem is you run an unsupported configuration. This can result in unpredictable behaviour. ORA-03106 is often seen, when components are incompatible. The first supported database for Windows 2003 is 9i Release 2.
Werner

Similar Messages

  • While calling plsql  package from Pro*c getting  ORA-1426 error

    Hi Friends
    I am calling a package from Pro*c and getting numberic overflow error ORA-1426 but when i introduce a debug message such as printf or calling standard oracle utility to write in a log file no error comes. So how just introduction of debug messages is resolving the error.Can any one throw some light on it, whether it is some kind of synchronization issue or something else
    Regards
    Abhijeet

    Pretty hard to guess here since you're not providing any sample code.
    However:
    "Internally, PL/SQL assigns the values of the bounds to temporary PLS_INTEGER variables, and, if necessary, rounds the values to the nearest integer. The magnitude range of a PLS_INTEGER is -2147483648 to 2147483647, represented in 32 bits. If a bound evaluates to a number outside that range, you get a numeric overflow error when PL/SQL attempts the assignment. "
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/loop_statement.htm#sthref2852

  • Passing variable of size greater than 32767 from Pro*C to PL/SQL procedure

    Hi,
    I am trying to pass a variable os size greater than 32767 from Pro*C to an SQL procedure.I tried assigning the host variable directly to a CLOB in the SQL section but nothing happens.In the below code the size of l_var1 is 33000.PROC_DATA is a procedure that takes CLOB as input and gives the other three(Data,Err_Code,Err_Msg) as output.These variables are declared globally.
    Process_Data(char* l_var1)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    l_clob := :l_var1
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    I also tried using DBMS_LOB.This was the code that i used.
    Process_Data(char* l_var1)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(l_clob,TRUE);
    DBMS_LOB.OPEN(l_clob,dbms_lob.lob_readwrite);
    DBMS_LOB.WRITE (l_clob, LENGTH (:l_var1), 1,:l_var1);
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    Here since DBMS_LOB packages allow a maximum of 32767,the value of l_var1 is not being assigned to l_clob.
    I am able to do the above process provided i split l_var1 into two variables and then append to l_clob using WRITEAPPEND.i.e l_var1 is 32000 in length and l_var2 contains the rest.
    Process_Data(char* l_var1,char* l_var2)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    dbms_lob.createtemporary(l_clob,TRUE);
    dbms_lob.OPEN(l_clob,dbms_lob.lob_readwrite);
    DBMS_LOB.WRITE (l_clob, LENGTH (:l_var1), 1,:l_var1);
    DBMS_LOB.WRITEAPPEND (l_clob, LENGTH(:l_var2), :l_var2);
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    But the above code requires dynamic memory allocation in Pro*C which i would like to avoid.Could you let me know if there is any other way to perform the above?

    Hi,
    The Long Datatype has been deprecated use Clob or Blob. This will solve lot of problems inherent with the datatype.
    Regards,
    Ganesh R

  • ORA-24338: statement handle not executed

    Hi,
    My front end programming platform is .NET. Oracle DataBase is 10g.
    I have written this package:
    CREATE OR REPLACE package body USER_NAME.PACKAGE_TEST1 as
    procedure getname(id1 number,tb_cursor out md_cursor)
    as
    begin
    open tb_cursor for select name from testtable1 where id1=id;
    close tb_cursor;
    end getname;
    end package_test1;In the front end i am using DataReader to fetch data.
    But while Executing reader an error occurs that is "ORA-24338: statement handle not executed".
    But when i remove "close tb_cursor" programm runs successfully.
    What is the reason for that error ?

    user12222356 wrote:
    Tubby wrote:
    A ref cursor is nothing more than a pointer to a statement (query).
    So no, you do not want to make 1000 procedure calls. You want your ref cursor to be opened for a query that contains 1000 rows. The client calls your procedure ONE TIME and processes the entirety of the ref cursor (1000 rows), then closes the cursor that your procedure so graciously opened for them.But according to .NET(my front end platform) documentation DataReader fetches data from database row by row .each row at a time.That means when the procedure was first called REF CURSOR was opened and was open till all data are fetched.Means at the begining itself query was executed and all data was fetched and stored temporarily in the database, and then DataReader fetched those data row by row..i.e., after first call to procedure only fetching of data is done. NO opening,NO closing ,NO select query execution (that was referenced by REf CURSOR). And when all rows are fetched that open cursor is closed . Is my concept right here ?YOU opened the cursor (in your procedure).
    The select query execution IS the ref cursor being processed by your DataReader.
    The data is not temporarily stored in the database ... it persists there (unless someone deletes it) ... so that statement wasn't really correct. DataReader would just be reading the rows from the database (via the ref cursor)
    I would assume DataReader will close the cursor for you, but i really don't know ... you'd have to ask a .not person about that.

  • Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed

    Hi,
    I am facing a problem while adding a new parameter n my JSP Report JDBC query based on a ref-cursor from a stored procedure define in a package in database.
    No problem at database level, I have added the new parameter in package specification and Package body for that procedure and compile my package, it complies without any error and warning.
    but when I open the report and add parameter in the report JDBC query window, then it is generating a error message,
    "Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed "
    and I am unable to add the new parameter in report.
    e.g.
    Actual which was working is:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7)
    I want to do this:
    My-package.My-procedure(:P1,:P2,:P3 ,:P4,:P5,:P6,:P7,:P8)
    but unable to do due to this error message:
    ("Err 62007: SQL Error: 99999 ORA-24338: Statement Handle not Executed ")
    Reports Builder 10g:
    Database 10g:
    Operating system windows XP:
    using JDBC Query base on ref-cursor coming from the stored procedure define in the Package.
    Regards,
    Khan

    and compile my package, it complies without any error and warning.That doesn't mean anything in this case. You are getting a runtime error, not a compilation error. The error is coming when you execute your procedure.
    Did you test your modified procedure in sqlplus or SQL Developer?

  • ORA-24338: statement handle not executed   -- error in returning refcursor

    My packaged procedure has Ref cursor as out variable.
    Calling the packaged procedure from Cognos 8. while trying to access the packaged procedure , getting the below error.
    ORA-24338: statement handle not executed
    Please provide a solution...

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    Confirm that the procedure works properly when called from sql*plus.
    For example here is some code that tests a package procedure I have in the SCOTT schema
    SET SERVEROUTPUT ON SIZE 1000000
    DECLARE
      l_cursor  test_refcursor_pkg.my_ref_cursor;
      l_ename   emp.ename%TYPE;
      l_empno   emp.empno%TYPE;
    BEGIN
      test_refcursor_pkg.test_proc (l_cursor);
      LOOP
        FETCH l_cursor
        INTO  l_empno, l_ename;
        EXIT WHEN l_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(l_ename || ' | ' || l_empno);
      END LOOP;
      CLOSE l_cursor;
    END;
    /

  • Materialized view problem ORA-00904: "from$_subquery$_ error

    Hello everyone,
    I've created data warehouse star schema and I'm trying to set up materialized view. DBMS_MVIEW.EXPLAIN_MVIEW passes and also the select query passes and is executed with no problems but when I try to CREATE MATERIALIZED VIEW... then error ORA-00904: "from$_subquery$_003"."SERVICE_ID_2_2": invalid identifier pops-up. How does Oracle 9i (9.2.0.1.0) managed to do this ? How to make it to work ?
    This is the query, and the schema:
    CREATE MATERIALIZED VIEW analiza_profitabilnosti
    BUILD IMMEDIATE
    REFRESH FAST
    ON COMMIT
    AS
    select
    GROUPING_ID(t.y,t.q,t.m,t.w,t.d,s.service_type,s.service_id,c.customer_category) as g_id,
    t.y, t.q, t.m, t.w, t.d,
    s.service_type , s.service_id ,
    c.customer_category ,
    COUNT(*) as c_star,
    SUM(cost) cost, COUNT(cost) c_cost,
    SUM(number_of_units) number_of_units, COUNT(number_of_units) as c_number_of_units
    from fact f
    inner join timeline t on f.datum = t.datum
    inner join service s on f.service_id = s.service_id
    inner join customer_category c on f.customer_category=c.customer_category
    group by
    ROLLUP(t.y, t.q, t.m, t.w, t.d),
    ROLLUP(s.service_type, s.service_id),
    ROLLUP (c.customer_category)
    and the schema:
    FACT (
    DATUM DATE,
    HOST_ID NUMBER,
    SERVICE_ID NUMBER (5),
    CALLED_PREFIX_ID NUMBER (10),
    CUSTOMER_CATEGORY NUMBER,
    TRAFIC_PERIOD_ID NUMBER (5),
    CALL_DURATION NUMBER,
    COST NUMBER,
    NUMBER_OF_UNITS NUMBER,
    NUMBER_OF_CALLS NUMBER)
    TIMELINE (
    Y VARCHAR2 (5),
    Q VARCHAR2 (5),
    M VARCHAR2 (5),
    W VARCHAR2 (5),
    D VARCHAR2 (5),
    DATUM DATE NOT NULL)
    SERVICE (
    SERVICE_ID NUMBER (5) NOT NULL,
    SERVICE_CODE VARCHAR2 (15) NOT NULL,
    SERVICE_NAME VARCHAR2 (63),
    SERVICE_TYPE NUMBER (5),
    SERVICE_TYPE_CODE VARCHAR2 (4) NOT NULL,
    S_ID NUMBER (5))
    CUSTOMER_CATEGORY (
    CUSTOMER_CATEGORY_NAME VARCHAR2 (65) NOT NULL,
    CUSTOMER_CATEGORY NUMBER NOT NULL)
    Thanks,
    Igor

    Yes, thank you. I suspected that version is problem, and patch 9.2.0.6 helped. It works under 9.2.0.6

  • How to call stored procedure from Pro*C

    How to call stored procedure from Pro*C ?
    my system spec is SuSE Linux 9.1, gcc version : 3.3.3, oracle : 10g
    my Pro*C code is the following..
    EXEC SQL EXECUTE
    begin
    test_procedure();
    end;
    END-EXEC;
    the test_procedure() has a simple update statement. and it works well in SQL Plus consol. but in Pro*C, there is a precompile error.
    will anybody help me what is the problem ??

    I'm in the process of moving C files (with embedded SQL, .PC files) from Unix to Linux. One program I was trying to compile had this piece of code that called an Oracle function (a standalone), which compiled on Unix, but gives errors on Linux:
    EXEC SQL EXECUTE
    BEGIN
    :r_stat := TESTSPEC.WEATHER_CHECK();
    END;
    END-EXEC;
    A call similar to this is in another .PC file which compiled on Linux with no problem. Here is what the ".lis" file had:
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Error at line 193, column 5 in file weather_check.pc
    193 BEGIN
    193 ....1
    193 PCC-S-02346, PL/SQL found semantic errors
    Error at line 194, column 8 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .......1
    194 PLS-S-00000, Statement ignored
    Error at line 194, column 18 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .................1
    194 PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /oracle_client/product/v10r2/precomp/ad
    min/pcscfg.cfg
    Error at line 194, column 18 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .................1
    PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Error at line 194, column 8 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .......1
    PLS-S-00000, Statement ignored
    Semantic error at line 193, column 5, file weather_check.pc:
    BEGIN
    ....1
    PCC-S-02346, PL/SQL found semantic errors

  • Urgent: ORA-24338: statement handle not executed

    Hello,
    /*===================================================*/
    PL/SQL code:
    SQL> create or replace package p3 is
    2 type t_c is ref cursor;
    3 procedure p(p_c out t_c);
    4 end p3;
    5 /
    Package created.
    SQL> show errors;
    No errors.
    SQL>
    SQL>
    SQL> create or replace package body p3 is
    2
    3 procedure p(p_c out t_c)
    4 is
    5 v_c t_c;
    6 begin
    7 open v_c for
    8 select job_number
    9 from rep_adhoc_invoices
    10 where rownum<5;
    11 end p;
    12 end p3;
    13 /
    Package body created.
    SQL> show errors;
    No errors.
    /*===================================================*/
    C# code:
    OracleConnection dbConnection = null; /* see finalize{} */
    OracleCommand dbCommand = null;
    OracleDataAdapter dbAdapter = null;
    try
         dbConnection = new OracleConnection(GetConnectionString());
         dbConnection.Open();
         dbCommand = new OracleCommand();
         dbCommand.Connection = dbConnection;
         dbCommand.CommandText = "p3.p";                    dbCommand.CommandType = CommandType.StoredProcedure;
         dbCommand.Parameters.Add("p_c", OracleDbType.RefCursor, DBNull.Value, ParameterDirection.Output);
         dbAdapter = new OracleDataAdapter(dbCommand);
         System.Data.DataSet ds = new DataSet();
         dbAdapter.Fill(ds);
         return(ds);
    catch (Exception e)
         Console.WriteLine(e.Message);
    /*===================================================*/
    Problem:
    When code executes:
    dbAdapter.Fill(ds);
    I constantly get the ORA-24338.
    The same result if I try from console with "set autoprint on" (v_c is defined beforehand):
    SQL> execute p3.p(:v_c)
    PL/SQL procedure successfully completed.
    ERROR:
    ORA-24338: statement handle not executed
    It seems to me, that the problem is on the server.
    Does anyone know, WHAT is the problem?
    Thanks a lot beforehand!
    Edgar.

    In your procedure implementation (below), you forgot to assign the local variable v_c to the out parameter p_c before exiting the rountine. This means that the ref cursor parameter is never opened.
    The error you got occurs because when ODP.NET gets back the ref cursor it tries to fetch from it without checking whether it's open or not. If you look up the ORA-24338 error code in the documentation, it'll tell you as much. Typcially, when I get an error I don't understand, I head straight for the docs. They not only tell me what it means, but often suggest a solution.
    This behaviour of ODP must be for performance reasons, since doing the check everytime would be wasted most of the time. Still, it would have been nice if they'd emulated MSDAORA, which DOES check.
    3 procedure p(p_c out t_c)
    4 is
    5 v_c t_c;
    6 begin
    7 open v_c for
    8 select job_number
    9 from rep_adhoc_invoices
    10 where rownum<5;
    11 end p;
    12 end p3;
    13
    Frankly, I'm surprised you didn't get ORA-3113: end of communication channel. This is what happened to me when I exited a function without assigning the ref cursor. To solve it, I'd changed the declaration of the PL/SQL function and OracleCommand parameters to IN OUT instead of just OUT. THEN, I got ORA-24338. Anyway, watch out for these things as you progress.
    Happy coding.
    Clarence

  • ORA-27369: job of type EXECUTABLE failed with exit code: Not owner

    Hi
    I created a backup RAC database job using DBMS_SCHEDULER under RMANTEST schema (a DBA account) and I got the error as subject.
    begin
    dbms_scheduler.create_job(
    job_name => 'scheduler_backup',
    job_type => 'EXECUTABLE',
    number_of_arguments => 2,
    job_action => '/opt/oracle/admin/bin/rman_fullbackup_RAC_TEST_test.sh',
    comments => 'backup via scheduler'
    dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 1, 'TEST');
    dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 2, 'TEST2');
    dbms_scheduler.enable('scheduler_backup');
    end;
    Thanks,
    Kevin

    Hi Ravi
    Thanks for your input.
    "ORA-27369: job of type EXECUTABLE failed with exit code: Not owner" is what I copied from ADDITIONAL_INFO of USER_SCHEDULER_JOB_RUB_DETAILS.
    One thing I don't understand of your words is that
    "On 10gR1 and 10gR2 you can redirect the stdout/stderr within your script and take a look at those log files."
    In my script, I have log files but I cannot see it. I guess the job fails directly without hitting the redirection line in the script. Do you mean I shall write something like this
    dbms_scheduler.create_job (
    job_action => '/opt/oracle/admin/bin/backup.sh > backup.log'
    Another one is
    "make sure that the user that external jobs run as must be able to run your script"
    But OS user and database user are two different accounts at different level.
    I am using 10.2.0.2 RAC. The Unix script runs successfully every night. I just want to take advantage of DBMS_SCHEDULER to avoid host dependency.
    Thanks,
    Kevin

  • ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired

    Hi
    I defined the following Job on Linux Redhat 5.4 & Oracle DB 10.2.0.4:
    BEGIN
      dbms_scheduler.create_job(job_name        => 'expjob',
                                job_type        => 'executable',
                                job_action      => '/EXPORT/scott_cmd',
                                enabled         => TRUE,
                                auto_drop       => FALSE);
    END;
    drwxrwxrwx   2 oracle oinstall  4096 Jul 10 19:19 EXPORTwhere:
    /home/oracle>cat /EXPORT/scott_cmd
    #!/bin/sh
    exp parfile=./scott.par
    /home/oracle>cat /EXPORT/scott.par
    FILE=scott.dmp
    USERID=STRMADMIN/STRMADMIN
    OWNER=SCOTT
    LOG=scott.log
    /home/oracle>ls -l /EXPORT/scott_cmd
    -rwxr-xr-x 1 oracle oinstall 34 Jul 10 19:16 /EXPORT/scott_cmd
    /home/oracle>ls -l /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
    -rw-r--r-- 1 root oinstall 1575 Jul 10 18:42 /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
    (run_user = nobody
    run_group = nobody)
    /home/oracle>ls -l  /u01/app/oracle/OraHome_1/bin/extjob
    -rwsr-x--- 1 root oinstall 64842 Jul  8 14:21 /u01/app/oracle/OraHome_1/bin/extjob
    /home/oracle>ls -l  /u01/app/oracle/OraHome_1/bin/extjobo
    -rwxr-xr-x 1 oracle oinstall 64842 Jul  8 14:21 /u01/app/oracle/OraHome_1/bin/extjoboWhen I executed as user STRMADMIN ( has DBA & CREATE JOB Privileg) the Job, I got always the error:
    /EXPORT>sqlplus STRMADMIN/STRMADMIN
    SQL*Plus: Release 10.2.0.4.0 - Production on Sun Jul 10 19:40:24 2011
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exec dbms_scheduler.run_job('expjob');
    BEGIN dbms_scheduler.run_job('expjob'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1
    SQL>Please, help
    regards
    hqt200475
    Edited by: hqt200475 on Jul 10, 2011 10:04 AM
    Edited by: hqt200475 on Jul 10, 2011 10:05 AM

    Hi Ronald,
    I need the external Job in the 10.2.0.4-Environment because of the Online-Upgrade of a 10.2.0.4-Database to 11.2.0.2 with STREAMS. I want to start the old export from a PL/SQL-Procedure.
    Now returning to my problem:
    First: Change the run user to oracle:oinstall $ORACLE_HOME/rdbms/admin/externaljob.ora
    # This configuration file is used by dbms_scheduler when executing external
    # (operating system) jobs. It contains the user and group to run external
    # jobs as. It must only be writable by the owner and must be owned by root.
    # If extjob is not setuid then the only allowable run_user
    # is the user Oracle runs as and the only allowable run_group is the group
    # Oracle runs as.
    #run_user = nobody
    #run_group = nobody
    run_user = oracle
    run_group = oinstallsecond:
    /EXPORT>cat scott_cmd
    #!/bin/sh
    ORACLE_SID=STB;export ORACLE_SID
    ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
    /u01/app/oracle/OraHome_1/bin/exp parfile=/EXPORT/scott.parand:
    BEGIN
      dbms_scheduler.create_job(job_name        => 'expjob_r',
                                job_type        => 'executable',
                                job_action      => '/EXPORT/scott_cmd',
                                enabled         => TRUE,
                                auto_drop       => FALSE);
    END;
    /The manual execution of export as user oracle/oinstall was unproblematic, But I still got the error when running the following procedure :
    SQL> exec dbms_scheduler.run_job('expjob_r');
    BEGIN dbms_scheduler.run_job('expjob_r'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not
    permitted
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1regards
    hqt200475

  • ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function

    Hello,
    I am calling a windows bat file using dbms_scheduler and getting the following error. I have searched the forum and the internet and tried different switches and options. None of them solved my problem.
    Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    OracleJobScheduler is running as a service
    Error starting at line 1 in command:
    execute GET_RESULTS();
    Error report:
    ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    ORA-06512: at "SYS.DBMS_ISCHED", line 185
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
    ORA-06512: at "PS.GET_RESULTS", line 67
    ORA-06512: at line 1
    27369. 00000 - "job of type EXECUTABLE failed with exit code: %s"
    *Cause:    A problem was encountered while running a job of type EXECUTABLE.
    The cause of the actual problem is identified by the exit code.
    *Action:   Correct the cause of the exit code and reschedule the job.
    Here is the code for scheduler
          dbms_output.put_line(os_commandline || utlPath || fileSeparator || 'get.bat >nul')
          dbms_scheduler.create_job
          (   job_name          =>'PS_GET_RESULTS'
                , job_action        => os_commandline || utlPath || fileSeparator || 'get.bat >nul'
                , job_type          =>'executable'
                , enabled           =>false
                , auto_drop         =>false
                , start_date        =>systimestamp
          dbms_scheduler.run_job(job_name =>'PS_GET_RESULTS');The dbs_output prints a line which shows that the parameters os_commandline, utlPath and fileSeparator are set correctly.
         C:\windows\system32\cmd.exe /q /c E:\UTLDir\get.bat >nulThe windows file (get.bat) is:
         "C:\Program Files (x86)\WinSCP\Winscp.exe" /script=e:\utldir\get_resultsThis batch file passes a script file to the executable winscp.exe to get files from another server.
    The script file (get_results) is:
         option batch abort
         option confirm off
         open sftp://username:password@ipnumber:port -hostkey="ssh-rsa 1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
         cd /usr/dropbox/
         option transfer binary
         get *.results E:\UTLDir\Results\
         close
         exitI tested the batch file directly and works fine and "gets" the files from the server. But, invoking from Oracle dbms_scheduler fails with ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
    Appreciate your help and time in suggesting additional guidelines or pointers.
    Thanks,
    Rose

    Here is an update, if somebody else is having a similar problem.
    The ftp command "cd" to change the directories should be an absolute path. I was given a path "/usr/dropbox/", but on the server it actually corresponds to "/usr/local/apps/dropbox/". After updating the directory path, the scheduler worked fine in invoking the batch file for transferring the files.
    Thanks,
    Rose

  • ORA-27369:job of type EXECUTABLE failed with exit code + rman???

    Hi all,
    I was trying to execute job from 10G (10.2.01) Enterprise Manager Database Control, and got error below
    ORA-27369:job of type EXECUTABLE failed with exit code: Network is down STANDARD_ERROR="/home/oracle/scripts/backup/backupset_full:rman: command not found"
    Here is the file contents of backupset_full
    #!usr/bin/bash
    rman <<EOF
    connect catalog rman/rman@catrcv
    connect target sys/sys@test
    run{
    EXECUTE SCRIPT global_backup_full;
    quit
    EOF
    Here is the file content of global_backup_full script
    CREATE SCRIPT global_backup_full
    shutdown immediate;
    startup mount;
    allocate channel d1 device type DISK;
    backup as compressed backupset database;
    release channel d1;
    NOTE: I am running on bash shell environment.
    THANK YOU VERY MUCH in advance.
    Rich,

    You need to set ORACLE_HOME inside backupset_full script and possibly change rman to $ORACLE_HOME/bin/rman
    #!usr/bin/bash
    export ORACLE_HOME=<your_oracle_home _directory>
    $ORACLE_HOME/bin/rman <<EOF
    connect catalog rman/rman@catrcv
    connect target sys/sys@test
    run{
    EXECUTE SCRIPT global_backup_full;
    quit
    EOF
    Here is the file content of global_backup_full script
    CREATE SCRIPT global_backup_full
    shutdown immediate;
    startup mount;
    allocate channel d1 device type DISK;
    backup as compressed backupset database;
    release channel d1;
    }

  • ORA-27369: job of type EXECUTABLE failed with exit code:Operation notpermit

    I am getting this error
    ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted.
    We have been using this for such a long time without any problems.this is the plsql scheduler :
    Please help
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'PROD_LOAD_SL_FILES'
    ,start_date => TO_TIMESTAMP_TZ('2005/12/02 17:05:00.000000 -05:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
    ,repeat_interval => NULL
    ,end_date => NULL
    ,job_class => 'DEFAULT_JOB_CLASS'
    ,job_type => 'EXECUTABLE'
    ,job_action => '/home/oracle/actual/payment_files/slc_prod/load_sl_files.sh'
    ,comments => 'Loads SL files, uploads logs to database and sends email to Disbursement and DBA teams'
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'RESTARTABLE'
    ,value => FALSE);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'LOGGING_LEVEL'
    ,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'MAX_FAILURES');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'MAX_RUNS');
    BEGIN
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'STOP_ON_WINDOW_CLOSE'
    ,value => FALSE);
    EXCEPTION
    -- could fail if program is of type EXECUTABLE...
    WHEN OTHERS THEN
    NULL;
    END;
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'JOB_PRIORITY'
    ,value => 1);
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'SCHEDULE_LIMIT');
    SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
    ( name => 'PROD_LOAD_SL_FILES'
    ,attribute => 'AUTO_DROP'
    ,value => FALSE);
    END;
    and this is part of the unix script get executed:
    [oracle@USAC-S009 slc_prod]$ cat load_sl_files.sh
    #!/bin/sh
    # FILEME: /home/oracle/actual/paytment_files/load_sl_files.sh
    # PURPOSE: Load SL files, email .log files
    # INSTRUCTIONS/COMMENTS/ASSUMPTIONS: Two SL files will be pulled down
    # MAINTENANCE LOG
    # REV# DATE AUTHOR QA-ed BY CHANGE DESCRIPTION KEY
    DATE=`/bin/date +%d%b%y_%H%M`
    HOME=/home/oracle
    export HOME
    ORACLE_HOME=/u01/app/oracle/product/10.2
    export ORACLE_HOME
    ORACLE_SID=em
    export ORACLE_SID
    PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/etc:/usr/local/bin:/u01/app/oracle/product/10.2/bin:/bin:/sbin:/usr/bin:/usr/sbin; export PATH
    SL_HOME=/home/oracle/actual/payment_files/slc_prod
    FILE_HOME=/opt/u02/home/usair
    # Call slc.sh to load files
    ssh usac09.usacad.loc > /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
    /u01/app/oracle/slc.sh 2>&1
    sleep 120
    EOT
    # Move logs from usac09 to usac-s009
    #ssh usac09.usacad.loc >> /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
    # /u01/app/oracle/move_logs.sh 2>&1
    # sleep 15
    #EOT
    .............

    Hi!
    I have shell scripts with number of mandatory parameters.
    How can I write it in sql procedure in order to create exact command line that shuold be executed in Linux?
    the procedure looks like :
    CREATE OR REPLACE procedure CRM.run_tts (p_tts_name in varchar2 )
    is
    v_tts_name varchar2(2000);
    v_job_name varchar2(2000);
    v_source varchar2(200);
    v_target varchar2(200);
    Begin
    v_tts_name := upper(p_tts_name);
    --if p_instance_type='P' then
    v_source := 'psdwh';
    v_target := 'pudwh';
    --end if;
    if v_tts_name is not null then
    v_job_name := 'run_tts_'||v_tts_name;
    v_source := '/-ssid/'||v_source;
    v_target := '/-tsid/'||v_target;
    v_tts_name := '/-tbsname/'||v_tts_name;
    DBMS_SCHEDULER.create_job (
    job_name => v_job_name,
    job_type => 'EXECUTABLE',
    job_action => '/tmp/trans_asm',
    start_date => SYSTIMESTAMP,
    number_of_arguments => 3,
    enabled => false,
    auto_drop => false);
    --dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm.sh'||' '||c_rec.id||' '||'"'||c_rec.view_name||'"'||' '||v_setnum||' '||'"'||V_MACHINE_TYPE||'"'||' '||'"'||p_mode||'"');
    dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>v_source);
    dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>2,argument_value=>v_target);
    dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>3,argument_value=>v_tts_name);
    -- dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm_ps.sh');
    --dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/tmp/test.sh');
    -- trans_asm -ssid tsdwh -tsid tudwh -tbsname DW_BILLING_TTS
    dbms_scheduler.enable(name=>v_job_name);
    end if;
    end;
    the command looks like :
    trans_asm -ssid psdwh -tsid pudwh -tbsname YOAV_TTS
    Thank you !
    Valerie

  • ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error

    Hello DBAs,
    I am trying to schedule a shell script through dbms_scheduler.CREATE_JOB
    My database version is 10.2.0.3.0.
    I can successfully schedule the job, but while running, it throwing ORA-27369 with out exit code.
    Given below are the actions performed -
    -- Created shel scripts-
    $ cat shell01.sh
    ./test.sh >> test.log
    $
    $ cat test.sh
    sqlplus -s "/ as sysdba" <<EOF
    SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
    FROM v\$instance;
    disconnect;
    exit;
    EOF
    -- Granting privileges - (eventhough I have tried from 'SYS' schema)
    GRANT create Job, create external job, execute any class, execute any program , manage scheduler to sys;
    -- Drop job with name RUN_SHELL01
    BEGIN
    dbms_scheduler.drop_job('RUN_SHELL01');
    END;
    -- Schedule job with name RUN_SHELL01
    BEGIN
    dbms_scheduler.CREATE_JOB
         (job_name           => 'RUN_SHELL01',
         job_type           => 'EXECUTABLE',
         job_action           => '/home/ora1023/shell01.sh',
    start_date           => '18-AUG-09 05:37:00 AM',
         end_date          => NULL,
         repeat_interval      => 'FREQ=MINUTELY',
         enabled           => false,
         comments           => 'Run shell-script');
    END;
    --Enable job
    BEGIN
    dbms_scheduler.enable('RUN_SHELL01');
    END;
    -- Checking status
    SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
    select JOB_NAME,STATUS,ERROR# from dba_scheduler_job_run_details where job_name='RUN_SHELL01';
    -- Executing the job
    SQL> exec dbms_scheduler.run_job('RUN_SHELL01');
    BEGIN dbms_scheduler.run_job('RUN_SHELL01'); END;
    ERROR at line 1:
    ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
    ORA-06512: at "SYS.DBMS_ISCHED", line 150
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
    ORA-06512: at line 1
    Anybody please suggest a solutions for this -

    My shell script will work as below -
    user01@test01:/home/user01 : cat shell01.sh
    ./test.sh >> test.log
    user01@test01:/home/user01 :
    user01@test01:/home/user01 :
    user01@test01:/home/user01 : cat test.sh
    sqlplus -s "/ as sysdba" <<EOF
    SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
    FROM v\$instance;
    disconnect;
    exit;
    EOF
    user01@test01:/home/user01 : ./shell01.sh
    user01@test01:/home/user01 : ls -ltr
    -rw-r--r-- 1 ora1023 dba 155 Aug 26 05:28 test.log
    user01@test01:/home/user01 : cat test.log
    HOST_NAME INSTANCE_NAME STATUS STARTUP_TIME
    test01 oft1 OPEN 18-08-09 08:22:45
    user01@test01:/home/user01 :
    ** I think this shell script is working fine! ..its only for testing..
    and while we are querying dba_scheduler_job_run_details for additional info-
    SQL> select s.STATUS ,s.ADDITIONAL_INFO from dba_scheduler_job_run_details s where s.job_name='RUN_SHELL01';
    STATUS
    ADDITIONAL_INFO
    STANDARD_ERROR="execve: Exec format error"
    FAILED
    ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
    STANDARD_ERROR="execve: Exec format error"
    I think Metalink Doc ID: 555160.1 (Schedular Job of Type 'EXECUTABLE' Fails with ORA-27369 "exit code: 255" STANDARD_ERROR="execve: Exec format error"). Will help me to solve this issue Since i am using ksh -
    # echo $SHELL
    /bin/ksh
    Edited by: Rajesh Menon on Aug 25, 2009 9:21 PM

Maybe you are looking for

  • Enterprise Manager 9i download links are broken

    Hi OTN, Could you fix the links to download Oracle Enterprise Manager 9i? I'm getting a 404 page not found error, and the suggestions for alternative search areas all take me back to the page with the broken links. Thank you. Lynne Ray

  • Problems Undeploying on Application Server

    I am having problems with the "asant undeploy" command because after I try to re-deploy a .war file, I get the error message below in the servers log. I'm guessing the original undeploy was not completed successfully despite what it says at the comma

  • Reasons for a slow web link??

    Dear friends, I have a jsp file. I move to that jsp file when I click on a link in a html page. But i get that jsp page after a long time, sometimes even 3-4 minutes. One reason that I can think of it is the amount of processing that takes place in t

  • DVD aus Premiere Pro 1.5 brennen

    Ich habe folgendes Problem: Ich möchte gern möglichst schnell aus Premiere Pro 1.5 einen 60-Minuten-Film auf eine DVD bekommen. Ich benutze eine Matrox RT.X100-Karte. Wenn ich nun mit Hilfe der Matrox-Karte gleich in *.m2v digitalisiere, müsste doch

  • Refreshing the playlist on my shuffle

    My shuffle holds a subset of my songs. How can I easily refresh the playlist with a new batch of songs from my collection? Update: Answer found here: https://discussions.apple.com/message/9911819#9911819