ORA-29283 invalid file operation

NLSRTL      10.2.0.5.0     Production
Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
PL/SQL      10.2.0.5.0     Production
TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
I am trying to get the content of a trace file generated for me.
Because I don't have privileges to log on the server and copy the trace file for me directly with some os user, I am doing the following:
1. I alter my session trace identifier to easier identify the trace file
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'Func01';2. I invoke DBMS_MONITOR
3. I run the procedure I want to monitor.
4. I disable the monitoring by calling DBMS_MONITOR
5. At this point I run the following query to identify my trace file:
select u_dump.value || '/' || instance.value || '_ora_' || v$process.spid || nvl2(v$process.traceid, '_' || v$process.traceid, null ) || '.trc'"Trace File"
from V$PARAMETER u_dump
cross join V$PARAMETER instance
cross join V$PROCESS
join V$SESSION on v$process.addr = V$SESSION.paddr
where 1=1
   and u_dump.name = 'user_dump_dest'
   and instance.name = 'instance_name'
   and V$SESSION.audsid=sys_context('userenv','sessionid');It gives me: /ORACLE/MYDB/trace/MYDB_ora_3616822_Func01.trc
I have created directory in advanced on the path where the traces are stored:
CREATE OR REPLACE DIRECTORY trace_dir AS '/ORACLE/MYDB/trace/';
SELECT * FROM dba_directories WHERE directory_name = 'TRACE_DIR';
Output:
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS     TRACE_DIR      /ORACLE/MYDB/trace/I don't have rights to grant read, write on TRACE_DIR to my user, as I am not logged with SYS.
I created a table to store in it the lines from the trace file:
CREATE TABLE tmp_traces_tab
  callnum NUMBER,
  line NUMBER,
  fileline CLOB
);Then I run the following PL/SQL block to retrieve the content of the trace and store it in the table T:
DECLARE
  l_file            UTL_FILE.file_type;
  l_location     VARCHAR2 (100) := 'TRACE_DIR';
  l_filename    VARCHAR2 (255) := 'MYDB_ora_3616822_Func01.trc';
  l_text           VARCHAR2 (32767);
  l_line           NUMBER := 1;
  l_call           NUMBER := 1;
BEGIN
  -- Open file.
  l_file := UTL_FILE.fopen (l_location, l_filename, 'r', 32767);
  -- Read and output first line.
  UTL_FILE.get_line (l_file, l_text, 32767);
  INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
  l_line := l_line + 1;
  BEGIN
    LOOP
      UTL_FILE.get_line (l_file, l_text, 32767);
       INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
       l_line := l_line + 1;
    END LOOP;
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      NULL;
  END;
  INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
  l_line := l_line + 1;
  UTL_FILE.fclose (l_file);
END;
/And when I run the code I get the error: ORA-29283 invalid file operation.
Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
My user currently has these roles:
select * from dba_role_privs where grantee = USER;
Output:
U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
U1     RESOURCE     NO     YES
U1     CONNECT     NO     YES
U1     DBA     NO     YES
U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
That other user with which I have NO issues has these roles:
select * from dba_role_privs where grantee = USER;
Output:
U2    DBA    NO    YES
U2    EXEC_SYS_PACKAGES_ROLE    NO    YES
U2    EXECUTE_CATALOG_ROLE    NO    YES
U2    CONNECT    NO    YES

Verdi wrote:
NLSRTL      10.2.0.5.0     Production
Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
PL/SQL      10.2.0.5.0     Production
TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
And when I run the code I get the error: ORA-29283 invalid file operation.
Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
My user currently has these roles:
select * from dba_role_privs where grantee = USER;
Output:
U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
U1     RESOURCE     NO     YES
U1     CONNECT     NO     YES
U1     DBA     NO     YES
U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
Thanks for posting version alongwith other details.
TO my knowledge, No you cannot.
Privileges acquired via a Role are not valid in PL/SQL. You need to have explicit privileges.

Similar Messages

  • Error: ORA-00920: invalid relational operator (WWV-16016)

    Hi,
    When I try to query in the form, I'm getting the following error
    An unexpected error occurred: ORA-00920: invalid relational operator (WWV-16016).
    The form has a field of type varchar2 with lov attached to it. This error is happening only if I enter characters more than 40 or select a value which has more than 40 characters from the lov.
    Anbody had this problem?..Is there a solution for this?..Help would be appreciated.
    Thanks
    PJ

    I figured out the problem and it seems like if the value has any 'IN' or 'BETWEEN' and try to query this error is happening and it's not because of character length. I think Portal assumes that relational operator is entered and tries to query based on those words. Is it a bug in the Portal?..
    Thanks
    PJ

  • CREATE_CASH : ORA-29282: invalid file ID

    While running the AR_RECEIPT_API_PUB.create_and_apply to create and apply a receipt in R12, i get the error:
    Message 1. CREATE_CASH : ORA-29282: invalid file ID
    Message 2. ORA-29282: invalid file ID in Package AR_RECEIPT_API_PUB Procedure Create_cash
    DECLARE
    l_return_status VARCHAR2(1);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(240);
    l_cash_receipt_id NUMBER;
    p_count number := 0;
    BEGIN
    -- 1) Set the applications context
    mo_global.init('AR');
    mo_global.set_policy_context('S','83');
    fnd_global.apps_initialize(1303, 50695, 222,0);
    AR_RECEIPT_API_PUB.create_and_apply
    ( p_api_version => 1.0,
    p_init_msg_list => FND_API.G_TRUE,
    p_commit => FND_API.G_TRUE,
    p_validation_level => FND_API.G_VALID_LEVEL_FULL,
    x_return_status => l_return_status,
    x_msg_count => l_msg_count,
    x_msg_data => l_msg_data,
    p_amount => 1309.6,
    p_receipt_number => 'TIENDA-api2',
    p_receipt_date => '22-JUL-2012',
    p_gl_date => '22-JUL-2012',
    p_customer_number => 1007,
    p_receipt_method_id => 1000,
    p_trx_number => '145996',
    p_cr_id => l_cash_receipt_id );
    -- 3) Review the API output
    dbms_output.put_line('Status ' || l_return_status);
    dbms_output.put_line('Message count ' || l_msg_count);
    dbms_output.put_line('Cash Receipt ID ' || l_cash_receipt_id );
    if l_msg_count = 1 Then
    dbms_output.put_line('l_msg_data '|| l_msg_data);
    elsif l_msg_count > 1 Then
    loop
    p_count := p_count + 1;
    l_msg_data := FND_MSG_PUB.Get(FND_MSG_PUB.G_NEXT,FND_API.G_FALSE);
    if l_msg_data is NULL Then
    exit;
    end if;
    dbms_output.put_line('Message ' || p_count ||'. '||l_msg_data);
    end loop;
    end if;
    END;

    Please see these docs.
    Oracle Receivables Reference Guide Release 12 [ID 1077107.1]
    Oracle Receivables: Receipts API Known Issues and Patches [ID 1362066.1]
    Oracle Receivables: Receipts API Overview, Setup, Sample Scripts and Troubleshooting [ID 1361075.1]
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=AR_RECEIPT_API_PUB&c_owner=APPS&c_type=PACKAGE
    https://forums.oracle.com/forums/search.jspa?threadID=&q=AR_RECEIPT_API_PUB.create_and_apply&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Case with where clause - ORA-00920: Invalid relational operator

    Hi All, when I try to run the query below, I get the following error...
    ORA-00920: invalid relational operator
    00920. 00000 -  "invalid relational operator"
    *Cause:   
    *Action:
    Error at Line: 16 Column: 5
    Does anyone know what's wrong with my query? thanks in advance.
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END as "MonthNo"
    ORDER BY CONCAT (year,"MonthNo") DESC

    The problem is the as "MonthNo" - you can't give an "AS" alias to an expression in a where clause.
    You have not actually given any condition, just a set of translations from period into a number.
    You also haven't said what you're trying to do.
    Perhaps you want:
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE something
    ORDER BY CONCAT (year, CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END  ) DESC

  • ORA-30511: invalid DDL operation in system triggers

    Hi,
    I am calling a procedure in a Trigger.
    In that Procedure EXECUTE IMMEDIATE is used to CREATE a table.
    But when The Trigger is firing its giving Error as :ORA-30511: invalid DDL operation in system triggers
    Kindly any help will be needful for me

    user598986 wrote:
    Hi,
    I am calling a procedure in a Trigger.
    In that Procedure EXECUTE IMMEDIATE is used to CREATE a table.
    But when The Trigger is firing its giving Error as :ORA-30511: invalid DDL operation in system triggers[I thought I already explained it|http://forums.oracle.com/forums/message.jspa?messageID=3379456#3379683]. And again, granting privileges dynamically in a logon trigger is a very bad design. If you want to stick to it, you could schedule a job in trigger, as Timur suggested, however keep in mind, job runs asynchronously, so trigger will have to wait for the job to finish. Otherwise there might be a gap where session would not have privs granted yet.
    SY.

  • Requesting help-On a report Getting ora-00920 invalid relational operator.

    Hi everyone,
    I am having a report region with the following query:
    select CASE
    WHEN ISITRECENTADDENDUM(meckey_fk,code)
    THEN
    '<a href="javascript:popUp2('''
                   || 'f?p=&APP_ID.:61:&SESSION.::NO::P61_MECKEY_FK:'
                   || &P60_MECKEY.
                   || ''', 700, 700);">'
    || '<img src="#IMAGE_PREFIX#gobut.gif">'
    || '</a>'
    ELSE NULL
    END EditAddendum,
    '<a href="javascript:popURL('''
                   ||'&REPORTS_URL.keynewmec&P_1=&P60_MECNUM.'
                   || ''', 700, 700);">'
    || '<img src="#WORKSPACE_IMAGES#printer.jpg">'
    || '</a>'
    PrintMEC,
    "CODE",
    "MECKEY_FK",
    "ADDENDUM",
    "WHO_CREATED",
    "WHEN_CREATED"
    from "C_ADDENDUMS"
    where "MECKEY_FK" = v('P60_MECKEY')
    And my function returning boolean is as follows:
    create or replace FUNCTION "ISITRECENTADDENDUM"
    (meckeyi in number,
    codei in varchar2)
    return Boolean
    is
    x varchar2(1);
    begin
    select max(code) into x from c_addendums where meckey_fk = meckeyi;
    if x = codei then
    return true;
    else
    return false;
    end if;
    exception
    when others then
    return FALSE;
    end;
    But I am getting ORA-00920 invalid relational operator. Can anyone please help me out? I am not knowing where the error is. When I run the function by itself I am getting "False" returned as expected. Appreciate any advice on this.
    Rgds,
    Suma.

    Suma,
    It looks like what you are trying to do is display a link for the record with the highest value in the Code column, and nothing for the other records.
    If that is the case, you can eliminate the function and just use a SQL query like this:
    (not tested)
    select CASE
              WHEN code = Max(code) over (partition by meckey_fk)
                 THEN
                   '<a href="#">'
                   || ' '
                   || '< img class="TargetAlertIcon" src="chrome://targetalert/content/skin/internal.png"></a>'
              ELSE NULL
           END EditAddendum,
           '<a href="#">'
           || ' '
           || '< img class="TargetAlertIcon" src="chrome://targetalert/content/skin/internal.png"></a>' PrintMEC,
           "CODE", "MECKEY_FK", "ADDENDUM", "WHO_CREATED", "WHEN_CREATED"
      from "C_ADDENDUMS"
    where "MECKEY_FK" = :P60_MECKEYIs that what you're trying to do?
    Doug

  • Invalid file operation

    i get this error when i try coping from a source directory which exist to a directory which does not exist.
    instead of this stopping the loop i want to control it and log the source directory which does not exist in the destination
    and continue the loop
    how do i do this
    this is my code below
    UTL_FILE.fcopy ('Source ',
    file_source_image,
    'Destination',
    file_source_image
    invalid file operation

    Hi,
    Wrap the statement in its own BEGIN block, with its own EXCEPTION section:
    LOOP
         BEGIN
              UTL_FILE.fcopy ( 'Source ',
                                file_source_image,
                          'Destination',
                          file_source_image
         EXCEPTION
              WHEN ...
              -- Log error here
         END;
         -- Code here gets executed whether the fcopy worked or not
    END LOOP;

  • Still has ORA-20100 Invalid File Path

    I did
    SQL> CREATE DIRECTORY sqllog as 'c:\sqllog';
    SQL> grant write on directory sqllog to public;
    Then on c:\sqllog
    i have a file called sqllog.txt
    but still gives the same error

    Here is your answer. You have to set your initialization parameter 'UTL_FILE_DIR' to 'C:\SQLLOG\'. You have to bounce the database to do that. You cannot use an 'alter system' command.
    Drop and recreate your directory.
    For example,
    CREATE DIRECTORY log_dir AS 'C:\SQLLOG\'.
    /* I am really vary about this privilege. You are better off limiting the privilege to a select few.*/
    GRANT READ, WRITE ON DIRECTORY log_dir TO PUBLIC;
    Make the first parameter to the procedure 'UTIL_FILE.FOPEN' to be 'C:\SQLLOG\'.
    It should work and add the word 'NICK' to the file.

  • ORA-29283 when writing file to server

    I am trying to setup procedure that writes the result of a query to a file on the database server. I am currently testing the writing of file using some generic code.
    The database is on Red Hat Linux. The directory was created on the server as the mfts_user account and the oracle user granted read/write access. This was verified by logging into the server as oracle and creating a file via "touch test.txt".
    The following 2 procedures/functions were created to test utl_file:
    create or replace FUNCTION dump_csv ( p_query IN VARCHAR2
    , p_separator IN VARCHAR2 DEFAULT ','
    , p_dir IN VARCHAR2
    , p_filename IN VARCHAR2)
    RETURN NUMBER
    AS
    l_output utl_file.file_type;
    l_thecursor INTEGER DEFAULT dbms_sql.open_cursor;
    l_columnvalue VARCHAR2(2000);
    l_status INTEGER;
    l_colcnt NUMBER DEFAULT 0;
    l_separator VARCHAR2(10) DEFAULT '';
    l_cnt NUMBER DEFAULT 0;
    BEGIN
    l_output := utl_file.fopen(p_dir, p_filename, 'w');
    dbms_sql.parse(l_thecursor, p_query, dbms_sql.native);
    FOR i IN 1 .. 255
    LOOP
    BEGIN
    dbms_sql.define_column(l_thecursor, i, l_columnvalue, 2000);
    l_colcnt := i;
    EXCEPTION
    WHEN others
    THEN
    IF(SQLCODE = -1007) THEN
    EXIT;
    ELSE
    RAISE;
    END IF;
    END;
    END LOOP;
    dbms_sql.define_column(l_thecursor, 1, l_columnvalue, 2000);
    l_status := dbms_sql.EXECUTE(l_thecursor);
    LOOP
    EXIT WHEN(dbms_sql.fetch_rows(l_thecursor) <= 0);
    l_separator := '';
    FOR i IN 1 .. l_colcnt
    LOOP
    dbms_sql.column_value(l_thecursor, i, l_columnvalue);
    utl_file.put(l_output, l_separator || l_columnvalue);
    l_separator := p_separator;
    END LOOP;
    utl_file.new_line(l_output);
    l_cnt := l_cnt + 1;
    END LOOP;
    dbms_sql.close_cursor(l_thecursor);
    utl_file.fclose(l_output);
    RETURN l_cnt;
    END dump_csv;
    create or replace PROCEDURE TEST_DUMP_CSV
    AS
    l_count NUMBER;
    l_fn VARCHAR2(30);
    BEGIN
    SELECT TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS') INTO l_fn FROM DUAL;
    l_count := dump_csv( p_query => 'select * from coreq',
    p_separator => ',',
    p_dir => 'OUTBOUND_NEW_DIR',
    p_filename => 'dump_csv' || l_fn || '.csv' );
    dbms_output.put_line( to_char(l_count) || ' rows extracted to file dump_csv' || l_fn || '.csv.' );
    END TEST_DUMP_CSV;
    To test utl_file, I execute as the MAXIMO user:
    CREATE OR REPLACE DIRECTORY outbound_new_dir AS '/home/mfts_user/Maximo/outbound_new';
    select dump_csv('select * from coreq', ',', 'OUTBOUND_NEW_DIR', 'dump_csv.csv' ) from dual;
    Here is the error I get:
    ORA-29283: invalid file operation
    ORA-06515: at "SYS.UTL_FILE", line 449
    ORA-29283: invalid file operation
    ORA-06512: at "MAXIMO.DUMP_CSV", line 15
    ORA-06512: at line 1
    This same setup works on Windows XP when logged in as an Admin user, which tells me that the syntax and logic is correct.
    What could be wrong with the Linux setup?

    Yes. I read that read/write is automatically granted to the user that creates the DIRECTORY object.
    The result of the query you gave was 2 records:
    GRANTOR GRANTEE TABLE_SCHEMA TABLE_NAME PRIVILEGE GRANTABLE HIERARCHY
    SYS     MAXIMO     SYS     OUTBOUND_NEW_DIR     READ     YES     NO
    SYS     MAXIMO     SYS     OUTBOUND_NEW_DIR     WRITE     YES     NO

  • Errors ORA-39002,ORA-39070, ORA-29283, ORA-06512, ORA-29283 during import

    Hi all,
    I am getting errors during import to 10g database using impdp command.
    D:\>impdp nisa_lt/abc123@objtel1 directory=dtpump dumpfile=20120208_expobj.dmp full=y logfile=dbblog.log
    Import: Release 10.2.0.1.0 - Production on Monday, 13 February, 2012 17:16:05
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 488
    ORA-29283: invalid file operation
    dmpfile history:
    Starting "NISA_LT"."SYS_EXPORT_SCHEMA_01": nisa_lt/********@OBJ schemas=nisa_lt directory=dtpump dumpfile=20120208_expobj.dmp logfile=20120208_expobj.log
    Master table "NISA_LT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for NISA_LT.SYS_EXPORT_SCHEMA_01 is:
    /oradb/OBJ/oraarch/20120208_expobj.dmp
    Job "NISA_LT"."SYS_EXPORT_SCHEMA_01" successfully completed at 15:04:36
    and the dump file was done ftp with bin mode set.
    It'll be really helpful if some one can guide me on this.

    Hi all,
    I was trying to import into a database which i have only the details, but i have no access to db machine, which i think was the problem.
    dmp file easily got imported to database present in the systems which i had access.
    Following are my conclusions based on the experiments, correct me if I'm wrong:
    1. Basically these are errors when db system cant read/write/access the directory structure pointed by directory in database.
    2. This can be achieved by mounting the directory in which dmp is present to the system where database is present.
    2. We cannot import using impdp just by having tns details of the db, we need to have access to db system.
    Thanks
    Avi :)

  • Error handler for ORA-29283 - not working

    I am running Oracle 9.2.0.4 on HP-UX.
    I have a stored procedure which reads a text file. I have set up an execption for error code ORA-29283 (invalid file operation). When I test my procedure (by not having the file to read) my exception handler is bypassed for a general exception error and my procedure terminates.
    here's parts of my code:
    Declare
    file_not_found EXCEPTION;
    PRAGMA EXCEPTION_INIT (file_not_found, -29283);
    BEGIN
    nochourly_file := UTIL_FILE.fopen('/mydirectory','myfile.txt','R');
    Loop
    begin
    UTL_FILE.get_line(nochourly_file, sbuffer);
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    GOTO end_of_file;
    WHEN file_not_found
    THEN
    DBMS_OUTPUT.put_line ('Invalid File Operation - file not found');
    skip_last_hour_processed;
    GOTO end_of_file;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := SUBSTR (SQLERRM, 1, 100);
    DBMS_OUTPUT.put_line ('Error ' || TO_CHAR (err_num));
    DBMS_OUTPUT.put_line (err_msg);
    DBMS_OUTPUT.put_line (sbuffer);
    RAISE;
    EXIT;
    END;
    ===============
    When this fails I expect to see the message
    "Invalid file operation - file not found"
    which indicates my exception handler was processed.
    Instead I see:
    SQL> @$HOME/newhourly_dly
    Begin processing at 20060627154321
    nlasthourprocessed:20060627100000
    Last Hour Processed is 20060627100000
    BEGIN noc_hourly_daily_load; END;
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 449
    ORA-29283: invalid file operation
    ORA-06512: at "HNS.NOC_HOURLY_DAILY_LOAD", line 374
    ORA-06512: at line 1
    Elapsed: 00:00:00.05
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    Can you explain:
    1) what generated the error message since
    a. it wasn't my exception handler and
    b. it wasn't the "WHEN OTHERS"
    2) Why isn't my error handler working?
    Please advise.
    Thank you

    Hello
    Not sure why your exception is being ignored but usually, to be able to handle the UTL_FILE exceptions, you need to explicitly code for each exception declared in the UTL_FILE package i.e.
    EXCEPTION
          WHEN utl_file.invalid_path THEN
                 --Do something
          WHEN utl_file.invalid_mode THEN
                 --Do something
          WHEN utl_file.invalid_filehandle THEN
                 --Do something
          WHEN utl_file.invalid_operation THEN
                 --Do something
          WHEN utl_file.read_error THEN
                 --Do something
          WHEN utl_file.write_error THEN
                 --Do something
          WHEN utl_file.internal_error THEN
                 --Do something
    END;HTH
    David

  • Error after a DB clone - SQLERRM: ORA-29283 SYSMAN.MGMT_EMREP_METRICS

    I clone a db and now receiving this message in the alert logs:
    Wed Feb 08 01:00:00 2012
    Errors in file /u01/app/oracle/admin/AUDT/diag/rdbms/audt/AUDT/trace/AUDT_j001_23301.trc:
    ORA-12012: error on auto execute of job 7
    ORA-20000: SQLERRM: ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 536
    ORA-29283: invalid file operation SQLCODE: -29283
    ORA-06512: at "SYSMAN.MGMT_EMREP_METRICS", line 165
    ORA-06512: at line 1
    It's an auto job from SYSMAN that starts at 1am. The box I clone from is not having this error.

    greddy09sc wrote:
    I clone a db and now receiving this message in the alert logs:
    Wed Feb 08 01:00:00 2012
    Errors in file /u01/app/oracle/admin/AUDT/diag/rdbms/audt/AUDT/trace/AUDT_j001_23301.trc:
    ORA-12012: error on auto execute of job 7
    ORA-20000: SQLERRM: ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 536
    ORA-29283: invalid file operation SQLCODE: -29283
    ORA-06512: at "SYSMAN.MGMT_EMREP_METRICS", line 165
    ORA-06512: at line 1
    It's an auto job from SYSMAN that starts at 1am. The box I clone from is not having this error.I suspect that some OS/filesystem directory is missing or has wrong permissions.

  • Reg ORA-29283

    Hi,
    I'm using forms6i.
    I have a form which allows users to store their files, either
    (1) to the filesystem or
    (2) in the db as blob.
    In the 2nd case, when user tries to view the file, i recreate the file from the stored blob, with the same filename(gets from the table itself)
    and then open the file for the user using HOST command.
    But my issue is , once they tries to view the file, a file is created in the specified dir, and opened.
    But when second time they try to open it, it throws error ORA-29283, invalid file operation.
    The reason i think is, the file already exists, so when it tries to again create the same file, error occurs.(because every time i manually go and delete the already existing file, it works).
    So once they close the file after viewing , i should delete the file.
    But When i should issue delete? How i know they have closed the file?
    Please help
    Thanks

    Thanks christian,
    I changed my code like this
         Host( 'cmd /c dir /B "\\192.168.0.12\testdir\'||:fum_filename||'"',no_screen);  -- Checking the existance of the file
         IF  form_success THEN
              Host( 'cmd /c  attrib +rw "\\192.168.0.12\testdir\'||:fum_filename||'"',NO_SCREEN ) ;
         End if;
         retrieve_blob(:fum_filename,:fum_ref,stat,stat_msg);  -- This procedure recreates the file from the blob.
         Host( 'cmd /c  attrib +r "\\192.168.0.12\testdir\'||:fum_filename||'"',NO_SCREEN ) ;
         Host( 'cmd /c "\\192.168.0.12\testdir\'||:fum_filename||'"',NO_SCREEN ) ;But still of no help! Am i doing right??

  • Using regexp_instr in a where clause - invalid relational operator

    Whey I try to run this query in TOAD I get an ORA-00920: invalid relational operator error. It's part of a 10g stored procedure. When I highlight it and run it it prompts me for the missing values and then the error pops up. The AND in line 4 is highlighted.
    select CRIME_CLASSIFICATION_ID, crime_type, nvl(count(CRIME_CLASSIFICATION_ID),0) as CRIMECNT
    From vaps.vw_offenses
        where  regexp_instr(valoc,to_char(location_id))
            AND ( fromdate is null or
             offense_date between to_date(fromdate, 'mm/dd/yyyy')  AND to_date(todate,'mm/dd/yyyy')
    group by crime_classification_id, crime_type

    Hi,
    Review what REGEXP_INSTR does: it returns a NUMBER.
    Your WHERE clause couldn't make any sense if you used any other kind of NUMBER expression in that place, e.g. a NUMBER literal such as 12:
    select CRIME_CLASSIFICATION_ID, crime_type, nvl(count(CRIME_CLASSIFICATION_ID),0) as CRIMECNT
    From vaps.vw_offenses
        where  12     -- This is obviously wrong
            AND ( fromdate is null or
             offense_date between to_date(fromdate, 'mm/dd/yyyy')  AND to_date(todate,'mm/dd/yyyy')
    group by crime_classification_id, crime_type
    It's not going to work any better with a function (like REGEXP_INSTR) that returns a NUMBER.
    How can you fix it?  That depends on what you want to do.  Why are you calling REGEXP_INSTR?  What is that condition checking?
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Invalid relational operator

    Hi,
    if I :
    create table t (a number, b number, c number);
    and then run the following query:
    delete from t where a='1' and (b, c) in (
    select b, c from t
    where a='1'
    group by b, c
    having count(*) > 1);
    -- nothing to see here
    I get the following error:
    ORA-00920: invalid relational operator
    If I remove the "-- nothing to see here" comment, the query runs fine.
    If I remove the quotes around the 1s it also runs fine, with or without the trailing comment.
    I had a look through the forum and couldn't see this listed anywhere, though I presume others have come across similar problems?
    I presume there is a simpler test case; I tried to reduce it a bit, but most of what is there seems to be needed to reproduce the error.
    Note that it doesn't have to be a comment following the query; any text at all will cause the same error.
    regards,
    William

    Having just played around a bit, if you change the subquery to just return a single column, say "b" rather than "b" and "c":
    delete from t where a='1' and b in (
    select b from t
    where a='1'
    group by b
    having count(*) > 1);
    -- nothing to see here
    Then I get error "ORA-00911: invalid character" instead.
    If I run the buffer as a script (F5) I get:
    SQL ERROR:ORA-00911: invalid character
    delete from t where a='1' and b in (
    select b from t
    where a='1'
    group by b
    having count(*) > 1);
    -- nothing to see here
    ORA-00911: invalid character
    In case that helps you locate it at all.
    Note: if I move the "group by" clause onto the where line then it runs correctly.
    regards,
    William
    Message was edited by:
    user454290

Maybe you are looking for

  • How to turn off the Stretch Alignment feature?

    Hi, I am just learning how to use the text formatting options and have been experimenting but for some reason  any new text box I create now and type something, the Stretch Alignment is on and stretching everything I type.  How do I turn that off? Th

  • Sender File Channel Cluster Node issue in CC monitoring

    Hi, I have a issue in Sender File CC. The channel is active and polling every 1 min. The issue is in the CC monitoring it is just showing one single line i.e "Polling interval started.Length: 60.0 seconds" the other two lines Processing started and P

  • Lumia denim for Lumia 525

    I don't have a WiFi so I want to know the download size of denim update for Lumia 525 so that I can download it on mobile data

  • Alerts in Satelite System configured in Solman sometimes will get inactive

    I want to setup some alerts for a satellite system into solution monitoring, after the activation of some alerts, we have some problems . For example I have activated  into alerts server--> Setup Monitoring --> Cpu utilization When I want to check th

  • Antenna and CLDC 1.1

    Hi All, I've been using float points in my application (CLDC 1.1) and my application is preverified and runs fine on Eclipse, but I am having few problems when I am deploying it. I've used the antenna plug-in and I set in my build.xml file: <property