SYS. Question UTL_FILE survey ORA-29283: invalid file operation

We have a cron to demand that gives the State of the database in our emails. Recently we have cloned the instance, and all by doing this, we bounced back the entire server.

After that we stopped getting emails of this instance. When I checked the crontab file and run the scripts manually. It showed the following error.

SQL > alter session SET smtp_out_server = "xxxx1:100";
declare
v_utl_filehandler UTL_FILE. TYPE_DE_FICHIER;
v_rawfile RAW (32767).
v_size NUMBER;
5 v_block NUMBER;
6 v_boolean BOOLEAN;
v_file_dir varchar2 (100);
7 8 v_transfer_location varchar2 (100): = "[email protected], [email protected], [email protected];
9 v_file_name varchar2 (100): = "mailattachment.doc";
10 starts
11 v_file_dir: = "MAIL_DIR";
12 v_utl_filehandler: = UTL_FILE. FOPEN (v_file_dir, v_file_name, "r");
13 UTL_FILE.fgetattr (v_file_dir, v_file_name, v_boolean, v_size, v_block);
14 UTL_FILE.get_raw (v_utl_filehandler, v_rawfile, v_size);
15 UTL_FILE. FCLOSE (v_utl_filehandler);
16
17 sys.utl_mail.send_attach_raw (sender = > '[email protected]')
18, recipients = > v_transfer_location
19, subject = > 'database of status of EBS UAT.
20, message = > "Dear Sir". CHR (13) | CHR (13) |
21 ' Please find attached file database state of EBS UAT. "| CHR (13) | CHR (13) |
22 'thank you ' | CHR (13) |
23 ' oracle@UATDB1'|| CHR (13) | CHR (13)
24, attachment = > v_rawfile
25, att_inline = > FALSE
26, att_filename = > v_file_name
(27);
28 end;
29.
declare
*
ERROR on line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS." UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at the level of line 12

It was working fine before the cloning.

Published by: Gerard may 24, 2012 11:52

I guess that the problem is caused by

v_utl_filehandler := UTL_FILE.FOPEN(v_file_dir, v_file_name, 'r');

Is the path to the directory "MAIL_DIR" exists in your database server?
The file 'mailattachment.doc' exists in this path?
You have read access to this path?

You can check the path of the directory with:

select * from all_directories where directory_name='MAIL_DIR';

When the directory does not exist in this table, you need to create (such as s/n):

CREATE DIRECTORY MAIL_DIR AS 'yourdirectory';

To grant read access to the DBA, you need:

GRANT READ ON DIRECTORY MAIL_DIR TO ; 

(Overall precondition is that the oracle user (operating system - the user running your oracle instance) can access the given directory).

Published by: hm on 23.05.2012 22:52

Tags: Database

Similar Questions

  • ORA-29283: invalid file operation, SP2-0103: nothing in the SQL buffer to run.

    Hi gurus of the Oracle,.

    Our version of oracle's 11 g RAC 2.

    We write records into a file using utl_file.

    According to the request, data should write to 160 files.

    After writing to 50 records, his mistake to launch. as

    BEGIN PROC_WRITE_TO_FILE; END;

    *

    ERROR on line 1:

    ORA-29283: invalid file operation

    ORA-06512: at "SYS." UTL_FILE", line 536

    ORA-29283: invalid file operation

    ORA-06512: at "TEST. PROC_WRITE_TO_FILE', line 130 '.

    ORA-06512: at line 1

    SQL > SP2-0103: nothing in the SQL buffer to run.

    My procedure is

    -DECLERATION

    BEGIN

    OPEN C2;

    LOOP

    EXTRACT THE C2 IN P_WRITE;

    WHEN THE EXIT C2% NOTFOUND;

    L_NAME: = "WRITE" | P_WRITE | » _. TXT';

    L_FILE: = UTL_FILE. FOPEN (L_DIR, L_NAME, 'W');

    OPEN C1 (P_WRITE);

    LOOP

    FETCH C1 INTO P_OD_PLACE, P_OD_USER, P_ED_PERF, P_GM_LST, P_GM_FIRST, P_GM_MOD, P_GM_SUFF, P_BD_NUM, P_BD_FRET, P_BD_UNIT, P_BD_GOLE, P_BD_GEP, P_DAT_BOD, P_DAT_EFF, P_ED_RACE, P_ED_GENDER, P_LAND_DIST, P_LAND_LOT, P_ED_STAT_REASON ,P_OD_PRECINCT,P_OD_JANI_PREC,P_NB_PIST_CNG,P_NB_PIST_SEN,P_NB_PIST_VASER,P_NB_PIST_JUD,P_NB_PIST_COMMI,P_NB_PIST_SCHOL,P_NB_PIST_WD,P_NB_PIST_JANIB,P_NB_PIST_JANIC,P_NB_PIST_FIRE,P_NB_PIST_SCHOB,P_NB_PIST_SUPCM,P_NB_PIST_WATBD,P_NB_PIST_GOLEL P_GM_NAME, P_ED_JANI_CODE, P_DAT_ACCEPT, P_DAT_CHANGED, P_OD_COMBO, P_TX_DESC, P_DAT_LST_CTT, P_BD_NUM2, P_BD_FRET1, P_BD_UNIT2, P_BD_GOLE2, P_BD_ST, P_BD_GEP5, P_BD_GEP4, P_BD_FRET2, P_BD_FRET3, P_BD_COUNTRY;

    WHEN EXIT C1% NOTFOUND;

    UTL_FILE. PUT_LINE (L_FILE, P_OD_PLACE: ' |) ' || P_OD_USER |' | ' || P_ED_PERF |' | ' || P_GM_LST |' | ' || P_GM_FIRST |' | ' || P_GM_MOD |' | ' || P_GM_SUFF |' | ' || P_BD_NUM |' | ' || P_BD_FRET |' | ' || P_BD_UNIT |' | ' || P_BD_GOLE |' | ' || P_BD_GEP |' | ' || P_DAT_BOD |' | ' || P_DAT_EFF |' | ' || P_ED_RACE |' | ' || P_ED_GENDER |' | ' || P_LAND_DIST |' | ' || P_LAND_LOT |' | ' || P_ED_STAT_REASON |' | ' || P_OD_PRECINCT |' | ' || P_OD_JANI_PREC |' | ' || P_NB_PIST_CNG |' | ' || P_NB_PIST_SEN |' | ' || P_NB_PIST_VASER |' | ' || P_NB_PIST_JUD |' | ' || P_NB_PIST_COMMI |' | ' || P_NB_PIST_SCHOL |' | ' || P_NB_PIST_WD |' | ' || P_NB_PIST_JANIB |' | ' || P_NB_PIST_JANIC |' | ' || P_NB_PIST_FIRE |' | ' || P_NB_PIST_SCHOB |' | ' || P_NB_PIST_SUPCM |' | ' || P_NB_PIST_WATBD |' | ' || P_NB_PIST_GOLEL |' | ' || P_GM_NAME |' | ' || P_ED_JANI_CODE |' | ' || P_DAT_ACCEPT |' | ' || P_DAT_CHANGED |' | ' || P_OD_COMBO |' | ' || P_TX_DESC |' | ' || P_DAT_LST_CTT |' | ' || P_BD_NUM2 |' | ' || P_BD_FRET1 |' | ' || P_BD_UNIT2 |' | ' || P_BD_GOLE2 |' | ' || P_BD_ST |' | ' || P_BD_GEP5 |' | ' || P_BD_GEP4 |' | ' || P_BD_FRET2 |' | ' || P_BD_FRET3 |' | ' || P_BD_COUNTRY);

    UTL_FILE. FFLUSH (L_FILE);

    END LOOP;

    CLOSE C1;

    END LOOP;

    CLOSE C2;

    UTL_FILE. FCLOSE (L_FILE);

    END;

    /

    Appreciate your suggestions.

    Thank you and best regards,

    REDA

    You understand, but you can't do it?  What?  Move a single line in the right place?

    * sigh * I wish I was your code monkey...

    -DECLERATION

    BEGIN

    OPEN C2;

    LOOP

    EXTRACT THE C2 IN P_WRITE;

    WHEN THE EXIT C2% NOTFOUND;

    L_NAME: = "WRITE" | P_WRITE | » _. TXT';

    L_FILE: = UTL_FILE. FOPEN (L_DIR, L_NAME, 'W');

    OPEN C1 (P_WRITE);

    LOOP

    FETCH C1 INTO P_OD_PLACE, P_OD_USER, P_ED_PERF, P_GM_LST, P_GM_FIRST, P_GM_MOD, P_GM_SUFF, P_BD_NUM, P_BD_FRET, P_BD_UNIT, P_BD_GOLE, P_BD_GEP, P_DAT_BOD, P_DAT_EFF, P_ED_RACE, P_ED_GENDER, P_LAND_DIST, P_LAND_LOT, P_ED_STAT_REASON ,P_OD_PRECINCT,P_OD_JANI_PREC,P_NB_PIST_CNG,P_NB_PIST_SEN,P_NB_PIST_VASER,P_NB_PIST_JUD,P_NB_PIST_COMMI,P_NB_PIST_SCHOL,P_NB_PIST_WD,P_NB_PIST_JANIB,P_NB_PIST_JANIC,P_NB_PIST_FIRE,P_NB_PIST_SCHOB,P_NB_PIST_SUPCM,P_NB_PIST_WATBD,P_NB_PIST_GOLEL P_GM_NAME, P_ED_JANI_CODE, P_DAT_ACCEPT, P_DAT_CHANGED, P_OD_COMBO, P_TX_DESC, P_DAT_LST_CTT, P_BD_NUM2, P_BD_FRET1, P_BD_UNIT2, P_BD_GOLE2, P_BD_ST, P_BD_GEP5, P_BD_GEP4, P_BD_FRET2, P_BD_FRET3, P_BD_COUNTRY;

    WHEN EXIT C1% NOTFOUND;

    UTL_FILE. PUT_LINE (L_FILE, P_OD_PLACE: ' |) ' || P_OD_USER |' | ' || P_ED_PERF |' | ' || P_GM_LST |' | ' || P_GM_FIRST |' | ' || P_GM_MOD |' | ' || P_GM_SUFF |' | ' || P_BD_NUM |' | ' || P_BD_FRET |' | ' || P_BD_UNIT |' | ' || P_BD_GOLE |' | ' || P_BD_GEP |' | ' || P_DAT_BOD |' | ' || P_DAT_EFF |' | ' || P_ED_RACE |' | ' || P_ED_GENDER |' | ' || P_LAND_DIST |' | ' || P_LAND_LOT |' | ' || P_ED_STAT_REASON |' | ' || P_OD_PRECINCT |' | ' || P_OD_JANI_PREC |' | ' || P_NB_PIST_CNG |' | ' || P_NB_PIST_SEN |' | ' || P_NB_PIST_VASER |' | ' || P_NB_PIST_JUD |' | ' || P_NB_PIST_COMMI |' | ' || P_NB_PIST_SCHOL |' | ' || P_NB_PIST_WD |' | ' || P_NB_PIST_JANIB |' | ' || P_NB_PIST_JANIC |' | ' || P_NB_PIST_FIRE |' | ' || P_NB_PIST_SCHOB |' | ' || P_NB_PIST_SUPCM |' | ' || P_NB_PIST_WATBD |' | ' || P_NB_PIST_GOLEL |' | ' || P_GM_NAME |' | ' || P_ED_JANI_CODE |' | ' || P_DAT_ACCEPT |' | ' || P_DAT_CHANGED |' | ' || P_OD_COMBO |' | ' || P_TX_DESC |' | ' || P_DAT_LST_CTT |' | ' || P_BD_NUM2 |' | ' || P_BD_FRET1 |' | ' || P_BD_UNIT2 |' | ' || P_BD_GOLE2 |' | ' || P_BD_ST |' | ' || P_BD_GEP5 |' | ' || P_BD_GEP4 |' | ' || P_BD_FRET2 |' | ' || P_BD_FRET3 |' | ' || P_BD_COUNTRY);

    UTL_FILE. FFLUSH (L_FILE);

    END LOOP;

    CLOSE C1;

    UTL_FILE. FCLOSE (L_FILE);

    END LOOP;

    CLOSE C2;

    END;

    /

  • ORA-29283: invalid file operation

    Hi friends,
    I m getting ORA-29283: invalid file operation. I tried to use create directory option as well. I have to wriite the file to a specific location determined by the system setting
    even I tried to write by specifying the path setting and direct read/write permision he throw the error.any even input will be highly appreciated.
    Thank you
    Create or replace procedure (table_csv)
    in_succ_fail IN kcc_case_trans_fin_audit.success_or_fail%type by default NULL
    in_team_id IN kcc_case_trans_fin_audit.ounit_identifier_kt%type by default NULL,
    in_run_reference IN kcc_case_trans_fin_audit.run_reference%type by default NULL,
    )
    IS

    v_file_path varchar2 (100) default Null;-to contain the path
    v_file_name varchar2 (100) default Null; - to hold the name of the file
    v_file_name_component varchar2 (20) default Null; - to contain the part of file name
    v_string varchar2 (4000) default Null;
    v_actual_start_date PROVISIONS.actual_start_date%type;
    v_actual_end_date PROVISIONS.actual_end_date%type;
    v_provid_identifier PROVISIONS.provid_identifier%type;
    v_citem_identifier PROVISIONS.citem_identifier%type;
    v_start_date COST_COMMITMENTS.start_date%type;
    v_end_date COST_COMMITMENTS.end_date%type;
    v_ccentr_identifier COST_COMMITMENTS.ccentr_identifier%type;
    v_ccreas_identifier COST_COMMITMENTS.ccreas_identifier%type;
    v_meaning coded_cost_reasons.meaning%type;
    v_cost_centre_code cost_centres.cost_centre_code%type;
    v_sch_start_date schedules.start_date%type;
    v_sch_end_date schedules.end_date%type;
    v_schedule_type schedules.schedule_type%type;
    v_she_ccentr_identifier schedules.ccentr_identifier%type;
    v_she_cost_centre_code cost_centres.cost_centre_code%type;
    v_success_or_fail kcc_case_trans_fin_audit.success_or_fail%type;
    v_file_audit UTL_FILE. TYPE_DE_FICHIER; -File pointer variable
    File_Exception Exception; -User-defined exceptions

    Cursor cur_kctfaudit is
    Select ID, krestr_identifier, person_identifier,.
    ounit_identifier_kt, new_ccentr_identifier
    provis_identifier, ccommi_identifier, schedu_identifier
    success_or_fail, error_message, run_reference
    of kcc_case_trans_fin_audit
    where success_or_fail = in_succ_fail
    or ounit_identifier_kt = in_team_id
    or run_reference = in_run_reference;
    Begin
    -To get the location of the directory, and then to make the name of the file.
    v_file_path: = Adf_Getparam ('END', 'RFDR');
    Select to_char (sysdate, 'ddmmyyhhmi') in the double v_file_name_component;
    v_file_name: = 'kcc_restr_fin_audit_ ' | v_file_name_component |'. CSV';
    If v_file_path is null then
    Raise FILE_Exception;
    End if;
    -If the system "END/RFDR" parameter is not set then do not pass further and get out
    If v_file_path is not null then
    v_file_path: = v_file_path | » \';
    v_file_audit: = UTL_FILE. FOPEN (v_file_path, v_file_name, 'W');
    -v_file_audit: = UTL_FILE. FOPEN ("C: \ KCCTEST', v_file_name, 'W'");
    -If the file to write has been opened successfully
    IF utl_file.is_open (v_file_audit) THEN
    -loops through each line of the file
    I'm IN cur_kctfaudit LOOP
    -The value null if the provis_identifier on the case_tran_fin_audit is null.

    -a code here...

    -to build the string with all the information to write to the file

    v_string: = i.identifier | ','
    || baf_name_list (i.person_identifier, 'P'). ','
    || baf_name_list (i.ounit_identifier_kt, 'P'). ','
    || i.new_ccentr_identifier | ','
    || v_sch_start_date | ','
    || v_sch_end_date | ','
    || v_schedule_type | ','
    || v_she_cost_centre_code | ','
    ||     v_success_or_fail | ','
    || i.ERROR_MESSAGE | ','
    || i.krestr_identifier;
    UTL_FILE. Put_line (v_file_audit, v_string, autoflush = > true);
    END LOOP;

    DBMS_OUTPUT. Put_line (' file Created: ' | v_file_name);
    UTL_FILE. FCLOSE (v_file_audit);
    END IF;

    END IF;
    EXCEPTION
    WHEN utl_file.invalid_mode THEN
    RAISE_APPLICATION_ERROR (-20051, 'invalid parameter Mode');
    WHEN utl_file.invalid_path THEN
    RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
    WHEN utl_file.invalid_filehandle THEN
    RAISE_APPLICATION_ERROR (-20053, 'no valid Filehandle');
    -WHEN utl_file.invalid_operation CAN
    -RAISE_APPLICATION_ERROR (-20054, "Invalid File opération");
    WHEN utl_file.internal_error THEN
    RAISE_APPLICATION_ERROR (-20057, 'internal error');
    WHEN utl_file.charsetmismatch THEN
    RAISE_APPLICATION_ERROR (-20058, 'Open with FOPEN_NCHAR but later IO inconsistent');
    WHEN utl_file.file_open THEN
    RAISE_APPLICATION_ERROR (-20059, "file already open");
    WHEN utl_file.invalid_maxlinesize THEN
    RAISE_APPLICATION_ERROR (-20060, 'Row size exceeds 32 K');
    WHEN utl_file.invalid_filename THEN
    RAISE_APPLICATION_ERROR (-20061, "Invalid File Name");
    WHEN utl_file.access_denied THEN
    RAISE_APPLICATION_ERROR (-20062, "file access denied by ');
    When FILE_Exception then
    RAISE_APPLICATION_ERROR (-20002,' system END/RFDR parameter is not defined.) Set the system and try again! ');
    dbms_output.put_line (' system END/RFDR parameter is not defined.) Set the system and try again! ');
    WHILE others THEN
    -dbms_output.put_line (sqlerrm);
    RAISE_APPLICATION_ERROR (-20099, "UTL_FILE Unknown Error");

    END table_csv;
    29283, 00000, "invalid file operation"
    // *Cause:  An attempt was made to read from a file or directory that does
    //          not exist, or file or directory access was denied by the
    //          operating system.
    // *Action: Verify file and directory access privileges on the file system,
    //          and if reading, verify that the file exists.
    

    I have confidence in Oracle reports reality of the more acurrately, you.
    View simplified code that produces the error and after CUT PASTE & showing evidence why Oracle is bad.

  • Error: ORA-29283: invalid file so that registerdatabase operation

    We get the error during the registration of the agent to the server
    AGENT_HOME/bin/schagent - registerdatabase port > < host > <
    Error:
    Oracle Scheduler Agent registration
    The agent registration failed!
    Error: ORA-29283: invalid file operation
    ORA-06512: at "SYS." UTL_FILE", line 536
    ORA-29283: invalid file operation

    Database version: 11.1.0.7.0

    Someone at - he seen these errors?

    Published by: Gaham on August 10, 2009 12:03 AM

    Published by: Gaham on August 10, 2009 12:04 AM

    Hello

    This can happen if you have recently changed ORACLE_HOME for the database. We're currently tracking this as a bug.

    To work around this problem, you can do

    delete the PLANNER directory $ _WALLET_DIR;

    -replace ORACLE_HOME with the full path to your new oracle home
    - and use-instead of / for Windows
    Create directory PLANNER$ _WALLET_DIR as "ORACLE_HOME/Planner/portfolio";

    Hope this helps,
    Ravi.

  • Invalid file operation

    Hello world

    I need to recover a file from the operating system using an Oracle procedure. To do this. All I need is to try to use a different file name and capture that in a table of newspaper (to test the object).

    Currently, when I run my procedure by incorrect filename it throws an error "invalid file Operation.

    Is it possible, where my procedure will not throw this error and instead it will run the procedure and the paper in the table of my error is "bad file name" or something like that.

    in any case I found it. I used this:

    INVALID_FILE_OPERATION EXCEPTION;

    PRAGMA EXCEPTION_INIT (INVALID_FILE_OPERATION,-29283);

    Thank you

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

    Hi all, when I try to run the following query, I get the following error...

    ORA-00920: invalid relational operator

    00920 00000 - "invalid relational operator.

    * Cause:

    * Action:

    Error on line: column 16: 5

    Anyone know what the problem with my request? Thanks in advance.

    SELECT concat (year, period)

    OF DD_ACTUALS_FACT

    CASE WHERE period

    WHEN 'JAN' THEN '01'

    WHEN 'FEB' THEN '02'

    WHEN 'MAR' THEN ' 03 "

    WHEN "APR" THEN ' 04 "

    WHEN 'CAN' THEN ' 05 "

    WHEN "JUN" THEN '06'

    WHEN 'JUL' THEN '07'

    WHEN 'AUG' THEN '08'

    WHEN 'MS' THEN '09'

    WHEN 'OCT' THEN '10'

    WHEN 'NOV' THEN '11'

    WHEN 'DEC' THEN '12'

    END as number 'months '.

    ORDER OF CONCAT (year, number 'months') / / DESC

    The problem is the number 'month' - you cannot give an "ACE" alias for an expression in a where clause clause.

    You have not really given any condition, that a set of translations of period in a number.

    Also, you didn't say what you're trying to do.

    Maybe you want to:

    SELECT concat (year, period)

    OF DD_ACTUALS_FACT

    WHERE something

    ORDER OF CONCAT (year, period of the CASE

    WHEN 'JAN' THEN '01'

    WHEN 'FEB' THEN '02'

    WHEN 'MAR' THEN ' 03 "

    WHEN "APR" THEN ' 04 "

    WHEN 'CAN' THEN ' 05 "

    WHEN "JUN" THEN '06'

    WHEN 'JUL' THEN '07'

    WHEN 'AUG' THEN '08'

    WHEN 'MS' THEN '09'

    WHEN 'OCT' THEN '10'

    WHEN 'NOV' THEN '11'

    WHEN 'DEC' THEN '12'

    END DESC)

    /

  • ORA-00920: invalid relational operator

    SELECT PATIENT_FILE_NO,PATIENT_NAME,START_DATE,END_DATE,AGE,GENDER,ATTENDANCE_TYPE,PATIENT_CATEGORY,EPISODE_NO,VISIT_ID,ORGANIZATION_NO FROM (SELECT PM.PATIENT_FILE_NO,
                                   PE.EPISODE_NO,
                                   DECODE(CURRENT_LANG_P_S,'P', PATIENT_NAME_P  ||' '||PATIENT_NAME_2_P||' '||
                                                                                     PATIENT_NAME_3_P||' '||PATIENT_NAME_F_P,
                                                                                     PATIENT_NAME_S  ||' '||PATIENT_NAME_2_S||' '||
                                                                                     PATIENT_NAME_3_S||' '||PATIENT_NAME_F_S ) PATIENT_NAME ,                                                              
                                   EXSYS.GET_AGE(PM.DATE_OF_BIRTH,SYSDATE) AGE ,
                                   CODES_PKG.GET_DESCRIPTION(PM.GENDER,103) GENDER,
                                   CODES_PKG.GET_DESCRIPTION(PM.PATIENT_CATEGORY,110) PATIENT_CATEGORY,                               
                                   PE.ATTENDANCE_TYPE  ,
                                   PE.START_DATE       ,
                                   NVL(PE.END_DATE,PA.CLINICAL_DISCHARGE_DATE)END_DATE , 
                                   PE.ORGANIZATION_NO,
                                   MR.VISIT_ID 
                            FROM   RC_PATIENTS             PM,
                                   RC_PATIENT_EPISODES     PE,
                                   AD_PATIENT_ADMISSIONS   PA    ,
                                   MR_PATIENT_VISITS             MR                    
                            WHERE  PM.PATIENT_FILE_NO              =PE.PATIENT_FILE_NO                        
                            AND    PE.ADMISSION_NO                 =PA.ADMISSION_NO
                            AND      PM.PATIENT_FILE_NO                          =MR.PATIENT_FILE_NO
                            AND    PE.STATUS                      != 'C'
                            AND    PM.PATIENT_FILE_NO              =NVL('',PM.PATIENT_FILE_NO)              
                            AND    PA.CLINICAL_DISCHARGE_DATE IS NOT NULL
                            AND    TRUNC(PA.CLINICAL_DISCHARGE_DATE)     BETWEEN '25-05-14' AND '25-05-14'                        
                            AND    PE.PRIMARY_ELIGIBILITY          ='Y'
                            AND    PE.ATTENDANCE_TYPE         M    in ('I','D')                        
                            and    '12226' IN  (SELECT RCST1.STAFF_ID
                                                                    FROM   RC_CLINICAL_TEAMS            RCTE,                              
                                                                           RC_CLINICAL_TEAM_STAFF       RCST,
                                                                           RC_CLINICAL_TEAM_STAFF       RCST1 
                                                                   WHERE   RCTE.CLINICAL_TEAM_ID =RCST.CLINICAL_TEAM_ID
                                                                     AND   RCTE.CLINICAL_TEAM_ID =RCST1.CLINICAL_TEAM_ID                                                                 
                                                                     AND   RCTE.WARD_ALLOCATION  ='Y'
                                                                     AND   RCST.STAFF_ID         =PE.DOCTOR_ID                                         
                                                                     AND   trunc(PE.start_date)   BETWEEN RCTE.APPLIES_START AND nvl(RCTE.APPLIES_END,trunc(PE.start_date))
                                                                     AND   trunc(PE.start_date)   BETWEEN RCST.APPLIES_START AND nvl(RCST.APPLIES_END,trunc(PE.start_date))))
                                                                     AND      PE.DOCTOR_ID IN ('1' ,'11906' ,'13074' ,'12767' ,'11903' ,'11904' ,'12495' ,'11905' ,'11939'))  order by PATIENT_NAME
    

    When I run this code, I am facing this error?

    where the operator that he speaks?

    Thank you, I had.

    There is the letter "M" next to the "attendance_type column.

    Thank you

  • ERROR at line 1: ORA-00920: invalid relational operator

    Hello;

    I get this error with this code:
    EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || in_table_name || ' WHERE '     
         || in_column1 || ' like (''%'|| in_value1 ||'%'') AND '|| in_column2 || 'like (''%'|| in_value2 ||'%'') AND '
         || in_column3 || ' like (''%' || in_value3 ||'%'') AND ROWNUM = 1' INTO ln_test;
    Help me please, cordially

    you are missing a space in this part:

    in_column2 || 'like (''%'||
    

    should be

    in_column2 || ' like (''%'||
    
  • dmp Impdp file error: ORA-29283: operation invalid file ORA-06512: at "SYS." UTL_FILE", line 536

    Hi all.

    Sorry to ask this error again, I read a lot of topic in this forum on this subject, but I can't fix it.

    So I create this topic.

    My computer is running oracle database 11 g 2 express edition on ubuntu LTS 14.04.

    I'm trying to import the database of dmp file. That's what I do:


    > sqplus

    opening session with sys as sysdba, then run:

    Hoangnv CREATE USER IDENTIFIED BY hoangnv;

    GRANT CONNECT TO hoangnv;

    GRANT RESOURCE, s/n hoangnv;

    CREATE OR REPLACE DIRECTORY dmpdir AS ' / home/hoangnv/downloads/db ";

    GRANT read, write the DIRECTORY ON dmpdir TO hoangnv;


    my_project.dmp file is stored on /home/hoangnv/Downloads/db folder.

    Finally, I ran the command below in terminal:

    impdp hoangnv/hoangnv@xe directory = dmpdir dumpfile = my_project.dmp logfile = my_project.log


    That's what see the Terminal:

    ORA-39002: invalid operation

    ORA-39070: unable to open the log file.

    ORA-29283: invalid file operation

    ORA-06512: at "SYS." UTL_FILE", line 536

    ORA-29283: invalid file operation

    Any ideas? I run these commands on window and import the database successfully.

    Hello

    Please try the suggestions below:

    1. make sure that the roles granted to the user are 'default' for him.

    SQL > change the user hoangnv the role by default all;

    then try to re-import.

    Note: the DBA role contains the IMP_FULL_DATABASE with it.

    2. try import with the use of the 'System' this time, which is the result then? don't forget to give the system read, write on directory dmpdir.

    3. is the permission to/home/hoangnv/Downloads/db fine OS?

  • ORA-39002: invalid operation

    I am using expdp, replacing the scripts of the exp.
    I get these error lines:
    ORA-39002: invalid operation
    ORA-39070: unable to open the log file.
    ORA-29283: invalid file operation

    My expdp order:
    Directory of dumpfile = test.dmp for = export_meta content = metadata_only expdp system

    Yes.CREATE DIRECTORY does not create the directory export_meta to you on disk.

  • ORA-02236: invalid filename when creating redo eve

    I'm getting ora-02236 creating again Eve... Why is it so?

    SQL > select * from v version $;

    BANNER

    ----------------------------------------------------------------

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    PL/SQL Release 10.2.0.1.0 - Production

    CORE 10.2.0.1.0 Production

    AMT for Linux: Version 10.2.0.1.0 - Production

    NLSRTL Version 10.2.0.1.0 - Production

    SQL > 300 fixed lines;

    SQL > set 300 pages;

    SQL > /.

    GROUP # STATUS TYPE MEMBER IS_

    ---------- ------- ------- ------------------------------ ---

    / U01/oracle/oradata/HITHA/redo No. 3 online

    03 journal

    / U01/oracle/oradata/HITHA/redo No. 2 online

    02.Markus newspaper

    1/u01/oracle/oradata/HITHA/redo STALE in LINE No.

    01.intro newspaper

    SQL > select bytes of the log v$.

    BYTES

    ----------

    52428800

    52428800

    52428800

    SQL > ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50 M;

    ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50 M

    *

    ERROR on line 1:

    ORA-02236: invalid file name

    SQL > ALTER DATABASE ADD STANDBY LOGFILE SIZE 50 M;

    ALTER DATABASE ADD STANDBY LOGFILE SIZE 50 M

    *

    ERROR on line 1:

    ORA-02236: invalid file name

    Hi all

    I just tried to give the path and he managed...

    SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE redo04.log "size m 50;

    Database altered.

    SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE

    Database altered.

    SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE

    Database altered.

    SQL > select * from v$ logfile;

    GROUP # STATUS TYPE MEMBER IS_

    ---------- ------- ------- ------------------------------ ---

    / U01/oracle/oradata/HITHA/redo No. 3 online

    03 journal

    / U01/oracle/oradata/HITHA/redo No. 2 online

    02.Markus newspaper

    1/u01/oracle/oradata/HITHA/redo STALE in LINE No.

    01.intro newspaper

    4/u01/oracle/oradata/HITHA/redo of EVE No.

    04.the newspaper

    5/u01/oracle/oradata/HITHA/redo of EVE No.

    05.Marco newspaper

    6/u01/oracle/oradata/HITHA/redo of EVE No.

    06.the newspaper

    6 selected lines.

  • The DDL extract fail with ORA-30511: invalid operation of DDL TRIGGER system

    Hello

    When I tried to do all DDL operation I can see the following trace in ggs_ddl_trace.log with the trace level 2.
    It does not insert record in the GGS_DDL_HIST table.
    everything seems only when ddl_status.sql has been run...
    DDL replication is not the case.
    Help, please.

    SESS 30445-2012-04-12 11:16:09: DDL: start YVERT found [1147628]
    SESS 30445-2012-04-12 11:16:09: DDL: object ID is [74635]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: before: point in execution = [4]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: inString =]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1:
    [SESS 30445-2012-04-12 11:16:09: DDLTRACE1:], type = target [0] = [1]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: optype marker = [0], current_fragment = [0]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: added the fragment part * 1 *]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2:
    [[SESS 30445-2012-04-12 11:16:09: DDLTRACE2:], new current fragment [], new length of it]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: itemHeader: MD_TAB_DDLSTATEMENT (key1 = key2 [] = []) = [change the 'GGUSER' table. ["' Adds YASEEN" (column2 VARCHAR2 (30))], itemMode = [0]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: escape_string: retVal = ['alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ']
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: itemHeader: retVal = [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: inString =]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1:, G1 =' alter table 'GGUSER '. "" YASEEN ' add\ (column2 VARCHAR2\ (30\)------) ',
    [SESS 30445-2012-04-12 11:16:09: DDLTRACE1:], type = target [4] = [1]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: optype marker = [4], current_fragment = [0]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: added the fragment part * 2 *]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE2:, G1 =' alter table 'GGUSER '. "" YASEEN ' add\ (column2 VARCHAR2\ (30\)------) ',
    [SESS 30445-2012-04-12 11:16:09: DDLTRACE2:], new ongoing fragment [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',], new length of it [66]
    [SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: total_fragments =]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: total_fragments (in a loop) = [1]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: fragment # = [1] fragment = [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',]
    SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: insertion in the history, objid [74635]
    SESS 30445-2012-04-12 11:16:09: DDL: insertToMarker: ORA-30511: invalid DDL operation in the system triggers
    SESS 30445-2012-04-12 11:16:09: DDL: getTableInfo: ORA-30511: invalid DDL operation in the system triggers
    * SESS 30445-2012-04-12 11:16:09: DDL: trigger sys. GGS_DDL_TRIGGER_BEFORE: processing error DDL operation [change the 'GGUSER' table. ["' Adds to the YASEEN" (VARCHAR2 (30)) Column2], error ORA-30511: invalid DDL operation in the system triggers, stack error: ORA-06512: at 'GGUSER '. DDLREPLICATION', line 2486 *.
    ORA-06512: at line 833 level

    SESS 30445-2012-04-12 11:16:09: DDL: cleaning sequence marker [17]
    SESS 30445-2012-04-12 11:16:09: DDL: cleaned [2] marker table rows
    SESS 30445-2012-04-12 11:16:09: DDL: cleaning sequence DDL [17]
    SESS 30445-2012-04-12 11:16:09: DDL: cleaned [0] lines of the DDL table

    Hello

    The recyclebin database is empty. Otherwise please purge the recyclebin and then try to make the changes.

    Thank you
    Kamal.

  • Invalid relational operator error.

    Hello

    What is the problem with this query? I'm getting ORA-00920: invalid relational operator error.

    SELECT *.

    TEMP

    WHERE FLAG_Y = 1 AND (FLAG_N IS NOT NULL

    OR FLAG_K NOT NULL)

    Thank you

    you just forgot the IS before the second NOT NULL...

    HTH

  • ORA-29280: invalid directory path

    do face a problem,

    My requirement is I have to brought from a schema for a remote database my current schema some procedure, packages, functions scripts and compile them here in my current schema.
    Basically, straight word what I have to do is, all functions, procedures, are there packages in the remote schema (that I can access by a datbase link) must be created in my current schema.
    so I got what I was trying to make is just source codes to access all_sources and creating files in a code here directory.giving.

    First, what I've done is created an Oracle Directory.

    First I created a directory called "PROC_PKG_FUNC" in drive D, then I ran the following command.

    SQL > create directory 'PROC_PKG_FUNC' as 'D:\'PROC_PKG_FUNC ';
    Created directory.

    CREATE or REPLACE PROCEDURE Get_Db_Ddl_Scripts as
    v_file Utl_File.FILE_TYPE;
    v_file_dir VARCHAR2 (50);
    i_first_line NUMBER: = 1;
    BEGIN

    v_file_dir: = 'PROC_PKG_FUNC ';

    FOR REC_OBJ IN
    (SELECT a DISTINCT NAME, TYPE, DECODE (TYPE, 'FUNCTION', 'FUNCTIONS', 'PACKAGE', "PACKAGES", "PACKAGE BODY ', 'PACKAGES_BODY'," PROCEDURE", 'PROCEDURES', 'TYPE', 'TYPE', 'TYPE BODY', 'TYPES_BODY') v_file_dir)
    FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER = 'FRISKDEVI41B. '
    AND TYPE IN ('FUNCTION, PROCEDURE, 'PACKAGE', 'PACKAGE BODY', 'TYPE'))
    LOOP
    v_file: = Utl_File.FOPEN (card = > REC_OBJ.v_file_dir,)
    filename = > REC_OBJ.NAME | ".sql",.
    OPEN_MODE = > 'w ',.
    max_linesize = > 32767);
    i_first_line: = 1;
    FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_OBJ.NAME AND TYPE = REC_OBJ. TYPE AND OWNER = 'FRISKDEVI41B' ORDER BY LINE)
    LOOP
    IF i_first_line = 1 THEN
    Utl_File.put_line (v_file, "CREATE or REPLACE" |) REPLACE (REC. TEXT, CHR (10), NULL));
    ELSE Utl_File.PUT_LINE (v_file, REPLACE (REC. TEXT, CHR (10), NULL));
    END IF;
    i_first_line: = i_first_line + 1;
    END LOOP;
    Utl_File.FCLOSE (v_file);

    END LOOP;

    END;
    /


    but when I try to run this am getting error,
    ORA-29280: invalid directory path
    ORA-06512: at "SYS." UTL_FILE", line 33
    ORA-06512: at "SYS." UTL_FILE", line 436
    ORA-06512: at "SYS." GET_DB_DDL_SCRIPTS', line 15
    ORA-06512: at line 2

    I know probbaly get this error because I am trying to create different directories, just like functions packages etc. under the external using this loop recording repertoire, but how would it be possible, please help.

    Kind regards
    Manuella

    In oracle when you say that CREATE or REPLACE the DIRECTORY you do not create a directory in the operating system, you simply create a reference to the directory in the operating system.

    So I don't know what you're asking.

  • ORA-01839: invalid date for the specified month

    Hello

    I don't know if this is the right place for posting this... but I got the following errors in my alert log file (10.2.0.1)

    Errors in the fichier.../bdump/xxx_j000_23928.trc
    ORA-12012: error on auto work 8888
    ORA-01839: invalid date for the specified month

    in the trace file:
    NAME OF THE ACTION: (AUTO_SPACE_ADVISORY_JOB) 2009-03-30 22:00:02.313
    NAME OF THE MODULE: (DBMS_SCHEDULER) 2009-03-30 22:00:02.313
    SERVICE NAME: (SYS$ USERS) 2009-03-30 22:00:02.313
    ID OF THE SESSION: (194,87) 2009-03-30 22:00:02.313
    2009-03-30 22:00:02.313
    ORA-12012: error on auto work 8888
    ORA-01839: invalid date for the specified month

    The problem is the date is not valid for the specified month, my question is how do I solve this problem. This is a newly created database.

    I have only 2 jobs (some from dba_jobs) and there is no 8888.

    2 jobs I have are:

    THE WORK INTERVAL WHICH
    1 + 1/240 sysdate unlock;
    trunc (sysdate) 2 + 7 + 3/24 dbms_stats.gather_schema_stats ('db_name');


    Please help. Thank you.

    Published by: user10427867 on March 31, 2009 12:00

    The work is probably assigned a group of windows, probably MAINTENANCE_WINDOW_GROUP. The task will run in this window. Try these queries.

    select schedule_name
    from dba_scheduler_jobs
    where job_name = 'AUTO_SPACE_ADVISOR_JOB';
    
    select next_start_date
    from dba_scheduler_window_groups
    where window_group_name = 'MAINTENANCE_WINDOW_GROUP';  -- or the value returned by the first query if different
    

    Since it is a work of Oracle supplied, I recommend you contact Oracle support. The trace file contains other useful information?

Maybe you are looking for