ORA-27475: "DBREPORT.GATEKEEPER_JOB" must be a job

Hi All,
When ever i am calling the below from a procedure i am getting the error,ORA-27475: "DBREPORT.GATEKEEPER_JOB" must be a job.
I am getting this error in first drop box it self in(DBMS_SCHEDULER.DROP_JOB ).
Please help.
DBMS_SCHEDULER.DROP_JOB
                               job_name   => 'Gatekeeper_Job',
                               force  => TRUE,
                               commit_semantics   => 'STOP_ON_FIRST_ERROR'
                         DBMS_SCHEDULER.create_job (
                          job_name              => 'Gatekeeper_Job',
                          job_type              => 'EXECUTABLE',
                          job_action            => '/home/cobr_sftp/var/controllingload/download/transfer_gatekeeper.sh',
                           number_of_arguments   => 4, 
                         -- auto_drop             => true,
                           enabled               => FALSE,
                          comments              => 'CREATE_PROGRAM test using a schell script'
                       DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                        job_name                => 'Gatekeeper_Job',
                        argument_position           => 1,
                        argument_value          => ip_d_filename              );
                        DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                        job_name                => 'Gatekeeper_Job',
                        argument_position           => 2,
                        argument_value          => v_ftype                          );                      
                        DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                        job_name                => 'Gatekeeper_Job',
                        argument_position           => 3,
                        argument_value          => v_d_db_name          );
                        DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                        job_name                => 'Gatekeeper_Job',
                        argument_position           => 4,
                        argument_value          => v_sendoraddress      );
                        DBMS_SCHEDULER.enable ('Gatekeeper_Job');Edited by: user11942774 on Oct 21, 2012 6:30 PM

Then you could be hitting this bug. See the end of this thread
Unable to drop the dbms_scheduler job using "dbms_scheduler.drop_job"

Similar Messages

  • ORA-27475: "JOB" must be a job

    Hi All,
    When ever i am calling the below from a procedure i am getting the error,ORA-27475: "DBREPORT.GATEKEEPER_JOB" must be a job.
    I am getting this error in first drop box it self in(DBMS_SCHEDULER.DROP_JOB ).
    Please help.
                                 DBMS_SCHEDULER.DROP_JOB
                                   job_name   => 'Gatekeeper_Job',
                                   force  => TRUE,
                                   commit_semantics   => 'STOP_ON_FIRST_ERROR'
                             DBMS_SCHEDULER.create_job (
                              job_name              => 'Gatekeeper_Job',
                              job_type              => 'EXECUTABLE',
                              job_action            => '/home/cobr_sftp/var/controllingload/download/dbcobra_transfer_gatekeeper.sh',
                               number_of_arguments   => 4, 
                             -- auto_drop             => true,
                               enabled               => FALSE,
                              comments              => 'CREATE_PROGRAM test using a schell script'
                           DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                            job_name                => 'Gatekeeper_Job',
                            argument_position           => 1,
                            argument_value          => ip_d_filename              );
                            DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                            job_name                => 'Gatekeeper_Job',
                            argument_position           => 2,
                            argument_value          => v_ftype                          );                      
                            DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                            job_name                => 'Gatekeeper_Job',
                            argument_position           => 3,
                            argument_value          => v_d_db_name          );
                            DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
                            job_name                => 'Gatekeeper_Job',
                            argument_position           => 4,
                            argument_value          => v_sendoraddress      );
                            DBMS_SCHEDULER.enable ('Gatekeeper_Job');Edited by: user11942774 on Oct 22, 2012 11:21 PM

    Every job has an owner. YOu are probably logged as DBREPORT user.
    It is better to specify full job name in OWNER.JOBNAME
    See who is owner of job
    select * from dba_scheduler_jobs where job_name='GATEKEEPER_JOB';the use fully qualified job name in dbm_scheduler.drop_job procedure

  • Stop_on_close attribute ORA-27475 error

    I have a job that runs a chain. I have set the schedule name as a window. When I try to set the stop_on_window_close attribute, I get the error
    ORA-27475: "APP_TIBIA.LOAD_BILLS_INIT_CHAIN" must be a program. Does that attribute not work with a job_type of 'CHAIN'?
    DBMS_SCHEDULER.CREATE_SCHEDULE
    schedule_name => 'APP_TIBIA.WORK_DAYS_NO_EOFY_SCHD'
    ,start_date => '18-NOV-2009 5:00:00.000000 PM US/Central'
    ,repeat_interval =>'FREQ=MONTHLY;BYDAY=MON,TUE,WED,THU,FRI;EXCLUDE=HOL_FED_HOLIDAYS_SCHD,END_FISCAL_YEAR_SCHD'
    ,comments => 'Standard working days (excludes Federal Holidays)'
    END;
    DBMS_SCHEDULER.CREATE_WINDOW
    window_name => 'SYS.WORK_DAYS_NO_EOFY_WINDOW',
    resource_plan => null,
    schedule_name => 'APP_TIBIA.WORK_DAYS_NO_EOFY_SCHD',
    duration => INTERVAL '13' HOUR,
    window_priority => 'LOW',
    comments => 'Window for jobs that run everyday. If they are not started by 6 am the window closes'
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'APP_TIBIA.LOAD_BILLS_CHAIN_JOB',
    job_type => 'CHAIN',
    job_action => 'APP_TIBIA.LOAD_BILLS_INIT_CHAIN',
    schedule_name => 'SYS.WORK_DAYS_NO_EOFY_WINDOW',
    auto_drop => FALSE,
    enabled => TRUE,
    comments =>'Job that runs the load bills chain.'
    DBMS_SCHEDULER.SET_ATTRIBUTE('APP_TIBIA.LOAD_BILLS_CHAIN_JOB','STOP_ON_WINDOW_CLOSE',TRUE);
    thanks.

    Sorry,
    I'll try to word this more clearly.
    Here is my job definition
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'APP_TIBIA.LOAD_BILLS_CHAIN_JOB',
    job_type => 'CHAIN',
    job_action => 'APP_TIBIA.LOAD_BILLS_INIT_CHAIN',
    schedule_name => 'SYS.WORK_DAYS_NO_EOFY_WINDOW',
    auto_drop => FALSE,
    enabled => TRUE,
    comments =>'Job that runs the load bills chain.'
    When i run this...
    DBMS_SCHEDULER.SET_ATTRIBUTE('APP_TIBIA.LOAD_BILLS_CHAIN_JOB','STOP_ON_WINDOW_CLOSE',TRUE);
    I get the error--ORA-27475: "APP_TIBIA.LOAD_BILLS_INIT_CHAIN" must be a program.
    I have created other jobs that run in a window and set the stop_on_window_close attribute, however those jobs had a "job_type" ofr PL/SQL block or the job executed a program. Why would i be getting this error? Is it because the "job_type" of this job is a CHAIN? btw, I included above the schedule and window definitions for reference.
    thanks.

  • Regarding the error ORA-01841: (full) year must be between -4713 and +9999,

    The issue is the code is not inserting the good records into the MIE table. This is becasue of the error 'OtherError GFSTM_INS_SNURK_NEW_TABLES_PA.gfstm_ins_asn_journal_pr:ORA-01841: (full) year must be between -4713 and +9999, and not be 0' This error is throwing out because of space issue in dt_asn_shipped.
    My requirement is to log error if any if not get the next record in the loop and insert it in the table if it has no error. The issue is good records are not getting inserted. The snurk_cmms_crct018_asn_journl in the cursor is a synonym which uses dblionk to connect to the remote db. The dt_asn_shipped data type is char(6) and the format is YYMMDD.
    declare
    CURSOR cur_asn_journal IS
    SELECT NVL(TRIM(cd_asn_plant),' ') cd_asn_plant,
         NVL(TRIM(no_journal),0) no_journal,
    NVL(TRIM(cd_ship_from),' ') cd_ship_from,
         TRIM(no_asn) no_asn,
    DECODE(LENGTH(dt_asn_shipped),6, to_date(to_char(to_date(trim(dt_asn_shipped),'YYMMDD'),
    'DD-MON-YY'),'DD-MON-YY'), '') dt_asn_shipped,
    TRIM(dt_processed) dt_processed,
    TRIM(in_manual) in_manual,
         TRIM(ts_last_update) ts_last_update     
    FROM snurk_cmms_crct018_asn_journl;
    BEGIN
    FOR l_rec_asn_journal IN cur_asn_journal LOOP
    BEGIN
    INSERT INTO gfstmie_st_cmms_asn_journal
    gsdb_site_code ,
    journal_num,
    gsdb_site_from_code,
    adv_shipping_notice_cnum,
    adv_sn_shipping_date,
    processed_date,
    manual_in_code,
    cmms_last_update_cdate,
    create_userid,
    create_dts,
    update_userid,
    update_dts
    ) VALUES
    l_rec_asn_journal.cd_asn_plant,
    l_rec_asn_journal.no_journal,
    l_rec_asn_journal.cd_ship_from,
    l_rec_asn_journal.no_asn,
    l_rec_asn_journal.dt_asn_shipped,
    l_rec_asn_journal.dt_processed,
    l_rec_asn_journal.in_manual,
    l_rec_asn_journal.ts_last_update,
    g_con_user_id,
         l_dts_current_gmt,
    g_con_user_id,
    l_dts_current_gmt
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('l_num_exception_pt_7');
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_invalid_date;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END;
    END LOOP;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_12');
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_2 '||l_str_procg_mode_code);
    --Rollback uncommitted transactions
    ROLLBACK;
    --Assigning failure status
    o_num_status := g_con_status_failure;
    --Assigning procedure end time in GMT
    l_dts_end_time := GFSTU_DATETIME_UTILITIES_PA.gfstu_to_gmt_fn;
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_oracle;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    --Calling procedure to update the job status
    GFSTM_COMMON_UTL_PA.gfstm_update_job_status_pr(
    l_num_job_run_id,
    GFSTM_PARM_SPECIFICATION_PA.g_con_process_abort,
    l_dts_end_time,
    g_con_perf_metric_code,
    g_con_zero,
    g_con_n,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END ;
    Thanks,
    Vinodh

    Hi,
    Could you not have reduced your question to what is relevant?
    You seem to be saying that this is your problem:
    SELECT DECODE ( LENGTH (dt_asn_shipped),
              6,
              TO_DATE ( TO_CHAR ( TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD'), 'DD-MON-YY'), 'DD-MON-YY'),
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;As far as I can see, problem might be that you decode on UNTRIMMED length.
    Also, you could get rid of some the to_date(to_char(to_date), which is nothing more than simply to_date()
    Try something like
    SELECT CASE LENGTH (TRIM (dt_asn_shipped))
             WHEN 6 THEN TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD')
           END
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;Regards
    Peter

  • Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0

    Hi Experts,
    I seem to be getting the error "Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0" when my dates are in the year 2000. Here's my SQL:
    DROP TABLE PER_ALL_ASSIGNMENTS_M_XTERN;
    create table PER_ALL_ASSIGNMENTS_M_XTERN(
    PERSON_NUMBER                    VARCHAR2(30 CHAR),
    ASSIGNMENT_NUMBER VARCHAR2(30 CHAR),
    EFFECTIVE_START_DATE                DATE,
    EFFECTIVE_END_DATE           DATE,
    EFFECTIVE_SEQUENCE           NUMBER(4),
    ASS_ATTRIBUTE_CATEGORY           VARCHAR2(30 CHAR),
    ASS_ATTRIBUTE1 VARCHAR2(150 CHAR),
    ASS_ATTRIBUTE_NUMBER20 NUMBER,
    ASS_ATTRIBUTE_DATE1 DATE,
    ASS_ATTRIBUTE_DATE2 DATE,
    ASS_ATTRIBUTE_DATE3 DATE,
    ASS_ATTRIBUTE_DATE4 DATE,
    ASS_ATTRIBUTE_DATE5 DATE,
    ASS_ATTRIBUTE_DATE6 DATE,
    ASS_ATTRIBUTE_DATE7 DATE,
    ASS_ATTRIBUTE_DATE8 DATE,
    ASS_ATTRIBUTE_DATE9 DATE,
    ASS_ATTRIBUTE_DATE10 DATE,
    ASS_ATTRIBUTE_DATE11 DATE,
    ASS_ATTRIBUTE_DATE12 DATE,
    ASS_ATTRIBUTE_DATE13 DATE,
    ASS_ATTRIBUTE_DATE14 DATE,
    ASS_ATTRIBUTE_DATE15 DATE,
    ASG_INFORMATION_CATEGORY           VARCHAR2(30 CHAR),
    ASG_INFORMATION1 VARCHAR2(150 CHAR),
    ASG_INFORMATION_NUMBER20 NUMBER,
    ASG_INFORMATION_DATE1 DATE,
    ASG_INFORMATION_DATE2 DATE,
    ASG_INFORMATION_DATE3 DATE,
    ASG_INFORMATION_DATE4 DATE,
    ASG_INFORMATION_DATE5 DATE,
    ASG_INFORMATION_DATE6 DATE,
    ASG_INFORMATION_DATE7 DATE,
    ASG_INFORMATION_DATE8 DATE,
    ASG_INFORMATION_DATE9 DATE,
    ASG_INFORMATION_DATE10 DATE,
    ASG_INFORMATION_DATE11 DATE,
    ASG_INFORMATION_DATE12 DATE,
    ASG_INFORMATION_DATE13 DATE,
    ASG_INFORMATION_DATE14 DATE,
    ASG_INFORMATION_DATE15 DATE
    organization external
    ( default directory APPLCP_FILE_DIR
    access parameters
    ( records delimited by newline skip 1
         badfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.bad'
    logfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.log'
    fields terminated by ',' OPTIONALLY ENCLOSED BY '"'
    (PERSON_NUMBER,     
    ASSIGNMENT_NUMBER,
    EFFECTIVE_START_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_END_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_SEQUENCE,
    ASS_ATTRIBUTE_CATEGORY,
    ASS_ATTRIBUTE1,
    ASS_ATTRIBUTE_NUMBER20,
    ASS_ATTRIBUTE_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_CATEGORY,
    ASG_INFORMATION1,
    ASG_INFORMATION_NUMBER20,
    ASG_INFORMATION_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY"
    location ('PER_ALL_ASSIGNMENTS_M.csv')
    REJECT LIMIT UNLIMITED;
    ...and getting errors when data looks like the following:
    E040101,EE040101,*1-Aug-2000*,31-Dec-4712,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,1-Jan-2012,31-Dec-2012,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    ...error message:
    error processing column EFFECTIVE_START_DATE in row 19 for datafile /u05/dbadir/jmf/incident_logs/PER_ALL_ASSIGNMENTS_M.csv
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Thanks,
    Thai

    Here is a snippet of the bad file data:
    E040110,EE040110,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040110,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,27667.2,27667.2,27667.2,27667.2,27667.2,27667.2,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040100,EE040100,01-May-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040100,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040101,EE040101,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000916,EE000916,01-Oct-00,31-Dec-12,1,,NDVC,YES,NL,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000916,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,10,,,,,,,,,,,,34905.65,34905.65,34905.65,34905.65,34905.65,34905.65,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000807,EE000807,03-Jan-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,STIP Plan - Cross BU,,,,,,,E000807,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,,,,,,,,,,,,35448.56,35448.56,35448.56,35448.56,35448.56,35448.56,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000851,EE000851,25-Apr-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000851,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,,,,,,,,,,,,43283.76,43283.76,43283.76,43283.76,43283.76,43283.76,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    So, the successfully loaded data is being loaded where year=2003 in the CSV as year=0003. Even though the data is loaded fine the data is not correct. For some reason the external table is set to have the year truncated.

  • SOA-- Invoking OSB Service Getting Error :ORA-00084: global area must be PGA, SGA, or UGA

    Hello Friends,
    Really appreciate your help/inputs on the below Error Message encountered while running a Concurrent Program--using SOA:Same encountered in recently refreshed DEV instance, Can it be related to some Developement Instance Configuration related to SOA, as same working as expected in PROD.PLEASE ASSIST
    Need your inputs on the Error Message we are getting which Invoking OSB Service.
    "Error inside invoke_osb_service -> Error Code : -84Error Message :ORA-00084: global area must be PGA, SGA, or UGA "
    Can you please review and confirm if the same encountered before or assist on the same:
    XXFIN_AP_INVOICES_INT_IB_PKG.invoke_osb_service
    -- Define the SOAP request according the the definition of the web service being called
    l_soap_request := 
                '<?xml version = "1.0" encoding = "UTF-8"?>'
            || '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prox="http://OmnicareFinance/ProxyInput/">'
             ||   '<soapenv:Header/>'
             ||     '<soapenv:Body>'
             ||       '<prox:InboundProcess>'
             ||     '<Source_system>'||g_source_instance||'</Source_system>'
             ||     '<Run_mode>'||g_run_mode||'</Run_mode>'
             ||     '<Batch_key>'||g_batch_key||'</Batch_key>'
             ||     '<Request_id>'||g_request_id||'</Request_id>'
             ||     '<Invoice_Header_File_name>'||g_file_name||'</Invoice_Header_File_name>'
             ||     '<Invoice_Line_File_name>'||NULL||'</Invoice_Line_File_name>'
             ||     '<File_location>'||g_file_location||'</File_location>'
             ||       '</prox:InboundProcess>'
             ||     '</soapenv:Body>'
             ||   '</soapenv:Envelope>';
    Oracle Apps Log File
    -->Entering XXFIN_AP_INVOICES_INT_IB_PKG.invoke_osb_service
    -->   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    -->Response> status_code: "200"
    -->Response> reason_phrase: "OK"
    -->Response> http_version: "HTTP/1.1"
    -->Response From OSB: <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:prox="http://OmnicareFinance/ProxyInput/"/><soapenv:Body xmlns:prox="http://OmnicareFinance/ProxyInput/"><prox:InboundProcessResponse><status>E</status></prox:InboundProcessResponse></soapenv:Body></soapenv:Envelope>
    -->OSB Response: E
    -->Error inside invoke_osb_service -> Error Code : -84Error Message :ORA-00084: global area must be PGA, SGA, or UGA
    -->   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    -->Entering XXFIN_AP_INVOICES_INT_IB_PKG.capture_error_info
    THANKS
    ANKUR

    Hi..
    >
    # symptom: ORA-00381: cannot use both new and old parameters for buffer cache size specification
    # cause: Both db_block_buffers and db_cache_size parameters are defined in the init.ora (instance parameter file). The db_block_buffers parameter has been deprecated and has been maintained only for backward compatibility. The db_cache_size parameter is one of the size parameters which defines the size of the cache for buffers. These parameters cannot be combined. Setting this along with the Dynamic SGA parameters errors out.
    >
    For sga_target refer to [http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams193.htm#REFRN10256]
    which quotes
    >
    SGA_TARGET specifies the total size of all SGA components. If SGA_TARGET is specified, then the following memory pools are automatically sized:
    *Buffer cache (DB_CACHE_SIZE)
    * Shared pool (SHARED_POOL_SIZE)
    * Large pool (LARGE_POOL_SIZE)
    * Java pool (JAVA_POOL_SIZE)
    * Streams pool (STREAMS_POOL_SIZE)
    If these automatically tuned memory pools are set to non-zero values, then those values are used as minimum levels by Automatic Shared Memory Management. You would set minimum values if an application component needs a minimum amount of memory to function properly.
    >
    So, the what ever the value are set for the parameter will act as minimum value when sga_target is set.
    HTH
    Anand

  • ORA-02069: global_names parameter must be set to TRUE for this operation

    I have 10g database and a schema 'TMAPP'
    And I have two table in TMAPP as
    create table user_menu_privs
    company_code           varchar2(5),
    bu_code      varchar2(12),
    user_group      varchar2(30),
    user_group_type      varchar2(1),
    menu_option_code number(5),
    enabled varchar2(1),
    query_only varchar2(1),
    default_lang varchar2(3),
    created_by      varchar2(10),
    created_on      date,
    updated_by      varchar2(10),
    updated_on      date,
    constraint pk_user_menu_privs primary key (company_code,bu_code,user_group,user_group_type,menu_option_code),
    constraint fk_user_menu_privs foreign key (company_code,bu_code,user_group,user_group_type)
    references user_group(company_code,bu_code,user_group,user_group_type)
    create table user_dst
    company_code           varchar2(5),
    bu_code      varchar2(12),
    userid varchar2(10),
    user_group      varchar2(30) ,
    user_group_type      varchar2(1) ,
    font_size      number(2) ,
    font_name      varchar2(100) ,
    address_id number(10),
    created_by      varchar2(10),
    created_on      date,
    updated_by      varchar2(10),
    updated_on      date,
    constraint pk_user_dst primary key (company_code,bu_code,userid,user_group,user_group_type),
    constraint fk_user_dst foreign key (company_code,bu_code,user_group,user_group_type)
    references user_group(company_code,bu_code,user_group,user_group_type)
    I have another database 11g with a schema TMAPP.
    Here I have created a database link 'to_dev' is connecting to the 10g db
    using this I can connect and see the data from 10g TMAPP
    I have created two views
    create or replace view user_menu_privs as
    select *
    from user_menu_privs@to_dev
    where user_group in
    (select user_group from user_dst
    where user_group_type='F');
    create or replace view user_dst as
    select * from user_dst@to_dev;
    and I executed
    delete from user_menu_privs
    where menu_option_code=108;
    I am getting the error
    ORA-02069: global_names parameter must be set to TRUE for this operation
    after that I set the global_names in 11g as TRUE
    then I am getting another error as
    ORA-02085: database link TO_DEV connects to DEV.REGRESS.RDBMS.DEV.US.ORACLE.COM -- that means link is not wokring
    Please help
    Dennis
    Edited by: DJ on Mar 13, 2012 5:49 AM
    Edited by: DJ on Mar 13, 2012 5:51 AM
    Edited by: DJ on Mar 13, 2012 5:53 AM
    Edited by: DJ on Mar 13, 2012 5:55 AM
    Edited by: DJ on Mar 13, 2012 5:56 AM

    OP wrote
    >
    But you said
    create a database link in 11g database with 11g database global name and put 11g database global_name=true.
    and put 10g database golba_name=false;
    >
    That isn't what I said at all. Reread my first reply. The first part is a copy of what you had stated.
    >
    ORA-02069: global_names parameter must be set to TRUE for this operation
    after that I set the global_names in 11g as TRUE
    >
    And then I said
    >
    That is because when global_names is TRUE, the database link name MUST be same as the global db name of the database to which the link connects to.
    You need to drop the database link and recreate it using the global name of the database it connects to.
    'link name MUST be same as the global db name of the database to which the link connects to.' - I didn't say 11g.
    And I didn't say 'put 11g database global_name=true' because you had already done that! 'after that I set the global_names in 11g as TRUE.
    1. 11g - global_names MUST be TRUE
    2. 11g - database link name MUST be the same as the global db name of the database to which the link connects to - 10g global db name
    3. 10g - gloibal_names setting is irrelevant

  • ORA-12012: error on auto execute of job 754461 ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "RCPT TO:" unrecognized or missing ORA-06512: at "SYS.UTL_SMTP", line 20 ORA-06512: at "SYS.UTL_SMTP",

    Hi ,
    I am getting below error frequently in alert log of database.
    ORA-12012: error on auto execute of job 754461
    ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "RCPT TO:" unrecognized or missing
    ORA-06512: at "SYS.UTL_SMTP", line 20
    ORA-06512: at "SYS.UTL_SMTP", line 98
    ORA-06512: at "SYS.UTL_SMTP", line 240
    ORA-06512: at "APPS.EIS_UTIL_PKG", line 94
    ORA-06512: at "APPS.HKD_PO_ADDON_PKG", line 110
    ORA-06512: at line 1

    You have a job running in the database. Its job ID is 754461
    It looks as if that job runs APPS.HKD_PO_ADDON_PKG
    That job is attempting to send mail using UTL_SMTP and apparently passing some strange value to SMTP server for the RCPT TO: parameter.

  • OLAP DML Error : -35188 : ORA-35188: The word = must be followed by an expr

    Hi ,
    While doing OLAP DML I am getting following error
    -35188 : ORA-35188: The word = must be followed by an expression.When searched Error list I could not any helpful explanation for this error.
    Any clue about this error?
    Joseph

    Hi,
    I found the issue , a value for measure was pushed and that time this error was happening,Reason was
    the value passed was .01 , but since the Number format was ',' for a decimal point value passed was ,01
    Turning the Number format to '.' for decimal points resolved the issue.

  • Error ORA-01017 happened when dbms_scheduler run a job.

    Hi All,
    I got a problem when I use dbms_scheduler to run a job. I got Error code 1017 when the job is run by scheduler. Please find my steps below:
    Oracle version is : Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    1. Created a job successfully by using the code below:
    begin
    dbms_scheduler.create_job(
    job_name => 'monthly_refresh_elec_splits',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN TRADINGANALYSIS.PKG_IM_REPORTING_ERM.REFRESH_ELEC_SPLITS_TEST; commit; END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'freq=monthly;bymonthday=25;byhour=10;byminute=35;bysecond=0;',
    end_date => NULL,
    enabled => TRUE,
    comments => 'monthly_refresh_elec_splits.',
    auto_drop => FALSE
    end;
    2. Got the job run details from talbe user_scheduler_job_run_details after the job is finished:
    select * from user_scheduler_job_run_details where job_name = 'MONTHLY_REFRESH_ELEC_SPLITS' order by log_id desc;
    LOG_ID     LOG_DATE     OWNER     JOB_NAME     JOB_SUBNAME     STATUS     ERROR#     REQ_START_DATE     ACTUAL_START_DATE     RUN_DURATION     INSTANCE_ID     SESSION_ID     SLAVE_PID     CPU_USED     DESTINATION     ADDITIONAL_INFO
    2054804     25/06/2012 10:35:01.086000 AM +10:00     TRADINGANALYSIS     MONTHLY_REFRESH_ELEC_SPLITS          FAILED     1017     25/06/2012 10:35:00.300000 AM +10:00     25/06/2012 10:35:00.400000 AM +10:00     +00 00:00:01.000000     1     1025,37017     129396     +00 00:00:00.030000          ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from NETS
    ORA-06512: at "TRADINGANALYSIS.PKG_IM_REPORTING_ERM", line 574
    ORA-06512: at line 1
    3. If I run the job directly the job will be finished successfully.
    begin
    dbms_scheduler.run_job('monthly_refresh_elec_splits',TRUE);
    end;
    LOG_ID     LOG_DATE     OWNER     JOB_NAME     JOB_SUBNAME     STATUS     ERROR#     REQ_START_DATE     ACTUAL_START_DATE     RUN_DURATION     INSTANCE_ID     SESSION_ID     SLAVE_PID     CPU_USED     DESTINATION     ADDITIONAL_INFO
    2054835     25/06/2012 11:05:38.515000 AM +10:00     TRADINGANALYSIS     MONTHLY_REFRESH_ELEC_SPLITS          SUCCEEDED     0     25/06/2012 11:04:35.787000 AM +10:00     25/06/2012 11:04:35.787000 AM +10:00     +00 00:01:03.000000     1     1047,700          +00 00:00:00.030000
    Additional Info:
    PL/SQL Code in procedure
    PROCEDURE Refresh_Elec_Splits_Test IS
    BEGIN
    --Refresh im_fact_nets_genvol from v_im_facts_nets_genvol in NETS
    DELETE FROM IM_FACT_NETS_GENVOL;
    --the local NETS_GENVOL table has an additional column providing volume splits by generator and month.
    --INSERT INTO IM_FACT_NETS_GENVOL values ('test',sysdate,'test',1,2,3,4,5,6,7);
    INSERT INTO IM_FACT_NETS_GENVOL
    select ngv.*,
    ratio_to_report (net_mwh) OVER (PARTITION BY settlementmonth, state)
    gen_percent
    from [email protected] ngv;
    commit;
    END;
    Does anyone can advice where should I check and how can I solve the problem?
    Thanks in advance
    Edited by: user13244529 on 24/06/2012 18:33
    Edited by: user13244529 on 24/06/2012 18:43

    I apologize if you already solved this.. but see Metalink ID 790221.1
    +*<Moderator Edit - deleted contents of MOS Doc - pl do NOT post such content - it is a violation of your Support agreement>*+                                                                                                                                                                                                                                                                                                                                                                                                               

  • ORA-12592: TNS:bad packet While Executing Job

    Hi,
    I created a job to merge to tables from the same data store, I found that based on the volume is high then the job fails with the Error "ORA-12592:TNS:Bad Packet". Can anyone help me to sort this issue. Any Work around???

    Try this Note 534729 - Oracle errors due to network problems or check the"  SQLNET.INBOUND_CONNECT_TIMEOUT = 120 " statement

  • ORA-00990 trying to execute 'grant create job'

    SUN Solaris 2.9, ORACLE 9.2.0.4, HTML DB Version 1.4.2.00.21
    ins.sql gets an error "ORA-00990: missing or invalid privilege" while performing "grant create job to FLOWS_010402 with admin option;"
    It appears this command was recently added to coreins.sql (Rem jstraub 09/29/2003 - Added with admin option to create database link priv, added create job, library to privs granted (Bug 3159606)).
    Has anyone had any experience with this?

    we should probably have included a better comment/message in that file, but CREATE JOB is only a valid system priv in 10g...
    SQL> select banner from v$version;
    BANNER
    Oracle10i Enterprise Edition Release 10.1.0.1.0 - Beta
    PL/SQL Release 10.1.0.1.0 - Beta
    CORE 10.1.0.1.0 Beta
    TNS for Linux: Version 10.1.0.1.0 - Beta
    NLSRTL Version 10.1.0.1.0 - Beta
    SQL> grant create job to rmattama;
    Grant succeeded.
    SQL> connect system@captain
    Enter password:
    Connected.
    SQL> select banner from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.2.0 - Production
    PL/SQL Release 9.2.0.2.0 - Production
    CORE 9.2.0.2.0 Production
    TNS for Linux: Version 9.2.0.2.0 - Production
    NLSRTL Version 9.2.0.2.0 - Production
    SQL> grant create job to rmattama;
    grant create job to rmattama
    ERROR at line 1:
    ORA-00990: missing or invalid privilege
    SQL>
    ...i'll log the comment issue is a bit.
    regards,
    raj

  • ORA-01422: while trying to create a job

    Hi all,
    WE need a help from you, group of experts
    we are getting the following error
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "SYS.DBMS_ISCHED", while trying to create a job using the following code
    BEGIN
    DBMS_SCHEDULER.create_program
    (program_name => 'FAILURE_MONITOR_PRG',
    program_action => 'JOB_MGR.SPR_FAILURE_MONITOR',
    program_type => 'STORED_PROCEDURE',
    number_of_arguments => 1,
    enabled => FALSE
    DBMS_SCHEDULER.define_metadata_argument
    (program_name => 'FAILURE_MONITOR_PRG',
    argument_position => 1,
    metadata_attribute => 'EVENT_MESSAGE'
    DBMS_SCHEDULER.create_job
    (job_name => 'FAILURE_MONITOR_JOB',
    program_name => 'FAILURE_MONITOR_PRG',
    enabled => TRUE,
    auto_drop => FALSE,
    start_date => SYSDATE,
    event_condition => 'tab.user_data.event = ''FAILED''',
    queue_spec => 'event_queue'
    END;
    Oracle allows us to create the job if the parameter values for enabled is "false" in the DBMS_SCHEDULER.create_job call. But we got the same error
    when tried to enable the job using exec DBMS_SCHEDULER.ENABLE ('FAILURE_MONITOR_JOB');
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "SYS.DBMS_ISCHED", line 2751
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1794
    ORA-06512: at line 1
    Please help us to solve this issue
    Thanks,
    Reghu
    null

    Hi Ravi,
    Thank you for your kind support
    That issue has been solved. Problem was with the event queue and only for that particular job i mentioned in the first post (I was able to create other jobs with different Events using the same queue) . After recreating the event queue i am able to create the same job. I got the same error when I tired to drop the queue, and then I dropped the queue table itself. Do you have any idea about what might had caused the issue?
    Thanks
    Reghu

  • ORA-01841 - (full) year must be between -4713 and +9999, and not be 0

    Hi Comunnity,
    Let me explain the scenario:
    We want to replicate a number of Discoverer reports, adding more columns to the reports. Due to the internal structure of the views and materialized tables, we can not make the joins inside the Discoverer Administration Edition, so we have decided to replicate the original materialized table adding the columns in order to get what we want. So the new materialized table has built as follows:
    CREATE TABLE APPS.GUZMAN_STOCK_DEPRE_EXIST_MAT_X
    EMPRESA VARCHAR2(240 BYTE),
    COD_ORGANIZACION NUMBER,
    COD_SECCION VARCHAR2(40 BYTE),
    SECCION VARCHAR2(4000 BYTE),
    FAMILIA VARCHAR2(40 BYTE),
    NOMBRE_PRODUCTO VARCHAR2(240 BYTE),
    DESCRIPCION_ARTICULO VARCHAR2(240 BYTE),
    UNIDAD_EXISTENCIA_ACT NUMBER,
    PRECIO_MEDIO NUMBER,
    FECHA_ULT_VENTA DATE,
    FECHA_ULT_COMPRA DATE,
    FECHA_ULT_MOVIMIENTO DATE,
    PRECIO_ULT_COMPRA NUMBER,
    CLASE_UNIDAD VARCHAR2(40 BYTE),
    COD_ORG_INV NUMBER,
    ORG_INV_NAME VARCHAR2(240 BYTE),
    COD_ARTICULO NUMBER,
    AÑO VARCHAR2(2 BYTE),
    MES VARCHAR2(2 BYTE),
    ULTIMO_DIA_TRANS DATE,
    SEIS_MESES_ANTES DATE,
    DOCE_MESES_ANTES DATE,
    DIECIOCHO_MESES_ANTES DATE,
    SEIS_MESES NUMBER,
    SIETE_DOCE_MESES NUMBER,
    TRECE_DIECIOCHO_MESES NUMBER,
    FCOMVACIA NUMBER,
    TIPO_ARTICULO VARCHAR2(80 BYTE),
    TRANSACTION_ID NUMBER,
    FECHA_MOVIMIENTO DATE,
    TIPO_MOVIMIENTO VARCHAR2(80 BYTE)
    TABLESPACE APPLSYSD
    PCTUSED 40
    NOMONITORING;
    The bold fields are the new ones. So we added the materialized table as a new folder in our working business area and add the following new intems:
    Valor Compra = CASE WHEN Precio Ult Compra = 0 THEN Importe Stocks ELSE Unidad Existencia Act*Precio Ult Compra END
    Importe Stocks = Unidad Existencia Act*Precio Medio
    Depreciación = CASE WHEN Valor Compra < Importe Stocks THEN Importe Stocks-Valor Compra ELSE 0 END
    DiasMes = CASE WHEN ((((((Mes = '01' OR Mes = '03') OR Mes = '05') OR Mes = '07') OR Mes = '08') OR Mes = '10') OR Mes = '12') THEN 31 WHEN (((Mes = '04' OR Mes = '06') OR Mes = '09') OR Mes = '11') THEN 30 ELSE 28 END
    fecha_MES = TO_NUMBER(CONCAT(DiasMes,Mes))
    Nueva_Fecha = TO_DATE(CONCAT(fecha_MES,Ano))
    Dias = NVL(Nueva_Fecha-Fecha Ult Venta,0)
    PorcenDepre = CASE WHEN Dias = 0 AND DiasC < 181 THEN 0 WHEN Dias = 0 AND DiasC > 180 THEN 100 WHEN Dias < 181 THEN 0 WHEN Dias < 361 THEN 25 WHEN Dias < 540 THEN 50 WHEN Dias > 541 THEN 100 ELSE 0 END
    Valor Depr = Valor Compra*PorcenDepre/100
    DiasC = NVL(Nueva_Fecha-Fecha Ult Compra,0)
    PorcenDepreC = CASE WHEN DiasC = 0 THEN 100 WHEN DiasC < 181 THEN 0 WHEN DiasC < 361 THEN 25 WHEN DiasC < 540 THEN 50 WHEN DiasC > 541 THEN 100 ELSE 0 END
    Valor DepreC = Valor Compra*PorcenDepreC/100
    T6 = CASE WHEN Unidad Existencia Act >= SEISMESES THEN SEISMESES ELSE Unidad Existencia Act END
    T12 = CASE WHEN Unidad Existencia Act-T6 > DOCEMESES THEN DOCEMESES WHEN Unidad Existencia Act-T6 < DOCEMESES THEN Unidad Existencia Act-T6 WHEN Unidad Existencia Act-T6 = DOCEMESES THEN Unidad Existencia Act-T6 END
    T18 = CASE WHEN Unidad Existencia Act-( T6+T12 ) > DIECIOCHOMESES THEN DIECIOCHOMESES WHEN Unidad Existencia Act-( T6+T12 ) < DIECIOCHOMESES THEN Unidad Existencia Act-( T6+T12 ) WHEN Unidad Existencia Act-( T6+T12 ) = DIECIOCHOMESES THEN Unidad Existencia Act-( T6+T12 ) END
    TR = Unidad Existencia Act-( T6+T12+T18 )
    DT6 = T6*Precio Medio*0/100
    DT12 = ( T12*Precio Medio )*25/100
    DT18 = T18*Precio Medio*50/100
    DTR = TR*Precio Medio*100/100
    DTOTAL = DT6+DT12+DT18+DTRVCIA+DFCOMPVCIA
    SEISMESES = CASE WHEN NVL(Seis Meses,0) < 0 THEN 0 ELSE NVL(Seis Meses,0) END
    DOCEMESES = CASE WHEN NVL(Siete Doce Meses,0) < 0 THEN 0 ELSE NVL(Siete Doce Meses,0) END
    DIECIOCHOMESES = CASE WHEN NVL(Trece Dieciocho Meses,0) < 0 THEN 0 ELSE NVL(Trece Dieciocho Meses,0) END
    FCOMPVCIA = DECODE(Fecha Ult Compra,NULL,Unidad Existencia Act,0)
    TRVCIA = TR-FCOMPVCIA
    DTRVCIA = TRVCIA*Precio Medio*100/100
    DFCOMPVCIA = FCOMPVCIA*Precio Medio*100/100
    Due to Discoverer does not allow foreign characters (ñ), we have changed the name of Field Año to Ano (as you can check in the Nueva_Fecha calculated field).
    Now, when we select the fields (Empresa, Cod Sección, Nombre Producto, Unidad Existencia Act, Precio Medio, Fecha Ult Venta, Fecha Ult Compra, Fecha Ult Movimiento, Precio Ult Compra, Org Inv Name, Ano, Mes, Valor Compra, Importe Stocks, Depreciación, Dias, PorcenDepre, Valor Depr, DiasC, PorcenDepreC, ValorDepreC) in order to build a new report, Discoverer shows us the ORA-01841 Error.
    Can be produced the error by the way in which discoverer stores the Nueva_Fecha Field?, cause as we check the field in Adminostration Edition, it appears as TO_DATE(CONCAT(fecha_MES,'Ano')) (with the field Ano in simple quotes), or just by any other circumstance?
    Thanks a lot for your help.
    Luis.
    Update:*
    It seems that the problem comes with the item created in Discoverer Administration Edition "Nueva_Fecha":
    Nueva_Fecha = TO_DATE(CONCAT(fecha_MES,Ano))
    (Keep in mind that:
    fecha_MES = TO_NUMBER(CONCAT(DiasMes,Mes))
    DiasMes = CASE WHEN ((((((Mes = '01' OR Mes = '03') OR Mes = '05') OR Mes = '07') OR Mes = '08') OR Mes = '10') OR Mes = '12') THEN 31 WHEN (((Mes = '04' OR Mes = '06') OR Mes = '09') OR Mes = '11') THEN 30 ELSE 28 END
    ), so any created field that uses Nueva_Fecha or is derivated from Nueva_Fecha causes the error (e.g. --> Dias = NVL(Nueva_Fecha-Fecha Ult Venta,0))
    Then; How can we configure the field in order that discoverer deals with it as a date field?
    Regards,
    Luis.
    Edited by: GGOracle User on 27-may-2010 15:23

    Hi,
    I think you forgot the separator in the string you want to convert to date.
    Your problem lies in the format of the date you are trying to create.
    try
    Nueva_Fecha = TO_DATE(DiasMes||'-'||Mes||'-'||Ano ,'DD-MM-YYYY')
    BTW
    you can use || instead of CONCAT so that you can concatenate more than 2 values each time
    Tamir

  • ORA-01841 full year must be between .....error when order by

    Hi all
    i have this query with me ,when order by clause is included ,when it is removed ,i see the output with  so  many record counts
    SELECT   porh.segment1,
             CASE
                WHEN popr.action_code = 'APPROVE'
                AND prall.full_name <> 'Sudheer T. Paraputhra'
                AND grdpr.short_name < 'PS-10'
                   THEN prall.full_name
             END directman_pr,-----getting names of managers who perform PR approve action
             porh.description, porl.line_num,
             CASE
                WHEN popr.action_code = 'APPROVE'
                AND prall.full_name <> 'Sudheer T. Paraputhra'
                AND grdpr.short_name < 'PS-10'
                AND poph.action_code = 'SUBMIT'
                   THEN TO_NUMBER (  TO_CHAR (  TO_DATE ('1', 'J')
                                              + (  poph.action_date
                                                 - popr.action_date
                                              'J'
                                   - 1
             END days_pr,------------------------------(calculating days from PR approval by manager to PO submit by user)
             poha.segment1 po_num, prall.full_name pr_approved_by,
             popr.action_date pr_approved_date,
             CASE
                WHEN poall_apprv.full_name <> 'Sudheer T. Paraputhra'
                AND grdpo_apprv.short_name < 'PS-10'
                AND poph_apprv.action_code = 'APPROVE'
                AND poph.action_code = 'SUBMIT'
                   THEN TO_NUMBER (  TO_CHAR (  TO_DATE ('1', 'J')
                                              + (  poph_apprv.action_date
                                                 - poph.action_date
                                              'J'
                                   - 1
             END days_po,------calculating days  from PO submit action by user to PO approve action by managers
             popr.sequence_num pr_seq, popr.action_code pr_action,
             poall.full_name po_approved_by, poph.action_date po_approved_date,
             poph.sequence_num po_seq, poph.action_code po_action,
             poph_apprv.action_date po_approved_date_appr,
             poph_apprv.action_code apprv_action_code
        FROM po_requisition_headers_all porh,
             po_requisition_lines_all porl,
             po_req_distributions_all prda,
             po_distributions_all poda,
             po_headers_all poha,
             po_action_history popr,
             po_action_history poph,
             hr.per_all_people_f poall,
             hr.per_all_people_f prall,
             hr.per_all_assignments_f asgpo,
             hr.per_all_assignments_f asgpr,
             per_grades_vl grdpo,
             per_grades_vl grdpr,
             po_headers_all poha_apprv,
             po_distributions_all poda_apprv,
             po_action_history poph_apprv,
             hr.per_all_people_f poall_apprv,
             hr.per_all_assignments_f asgpo_apprv,
             per_grades_vl grdpo_apprv
       WHERE poph.employee_id = poall.person_id
         AND popr.employee_id = prall.person_id
         AND poall.person_id = asgpo.person_id
         AND prall.person_id = asgpr.person_id
         AND asgpr.grade_id = grdpr.grade_id(+)
         AND asgpo.grade_id = grdpo.grade_id(+)
         AND prda.distribution_id = poda.req_distribution_id
         AND poha.po_header_id = poda.po_header_id
         AND prda.requisition_line_id = porl.requisition_line_id
         AND porh.requisition_header_id = porl.requisition_header_id
         AND porh.requisition_header_id = popr.object_id
         AND poph.object_type_code = 'PO'
         AND poha.po_header_id = poph.object_id
         AND SYSDATE BETWEEN poall.effective_start_date AND poall.effective_end_date
         AND SYSDATE BETWEEN prall.effective_start_date AND prall.effective_end_date
         AND SYSDATE BETWEEN asgpo.effective_start_date AND asgpo.effective_end_date
         AND SYSDATE BETWEEN asgpr.effective_start_date AND asgpr.effective_end_date
         AND SYSDATE BETWEEN poall_apprv.effective_start_date
                         AND poall_apprv.effective_end_date
         AND SYSDATE BETWEEN asgpo_apprv.effective_start_date
                         AND asgpo_apprv.effective_end_date
         AND prda.distribution_id = poda_apprv.req_distribution_id
         AND poha_apprv.po_header_id = poda_apprv.po_header_id
         AND poph_apprv.employee_id = poall_apprv.person_id
         AND poall_apprv.person_id = asgpo_apprv.person_id
         AND asgpo_apprv.grade_id = grdpo_apprv.grade_id(+)
         AND poha_apprv.po_header_id = poph_apprv.object_id
         AND poph_apprv.object_type_code = 'PO'
         AND poph_apprv.action_code = 'APPROVE'
    ORDER BY 4, 10, 14the calcuation works fine except for when order by clause is inlcuded
    kindly help
    Edited by: makdutakdu on Jun 1, 2010 2:51 PM

    hi Alex,John
    even i am confused as to why its happening ,
    SELECT   porh.segment1,
             CASE
                WHEN popr.action_code = 'APPROVE'
                AND prall.full_name <> 'Sudheer T. Paraputhra'
                AND grdpr.short_name < 'PS-10'------------< 'PS-10'
                   THEN prall.full_name
             END directman_pr,
             porh.description, porl.line_num,
             CASE
                WHEN popr.action_code = 'APPROVE'
                AND prall.full_name <> 'Sudheer T. Paraputhra'
                AND grdpr.short_name < 'PS-10'
                AND poph.action_code = 'SUBMIT'
                   THEN TO_NUMBER (  TO_CHAR (  TO_DATE ('1', 'J')
                                              + (  poph.action_date
                                                 - popr.action_date
                                              'J'
                                   - 1
             END days_pr,
             poha.segment1 po_num, prall.full_name pr_approved_by,
             popr.action_date pr_approved_date,
             CASE
                WHEN poall_apprv.full_name <> 'Sudheer T. Paraputhra'
                AND grdpo_apprv.short_name < 'PS-10'
                AND poph_apprv.action_code = 'APPROVE'
                AND poph.action_code = 'SUBMIT'
                   THEN TO_NUMBER (  TO_CHAR (  TO_DATE ('1', 'J')
                                              + (  poph_apprv.action_date
                                                 - poph.action_date
                                              'J'
                                   - 1
             END days_po,
             popr.sequence_num pr_seq, popr.action_code pr_action,
             poall.full_name po_approved_by, poph.action_date po_approved_date,
             poph.sequence_num po_seq, poph.action_code po_action,
             poph_apprv.action_date po_approved_date_appr,
             poph_apprv.action_code apprv_action_code
        FROM po_requisition_headers_all porh,
             po_requisition_lines_all porl,
             po_req_distributions_all prda,
             po_distributions_all poda,
             po_headers_all poha,
             po_action_history popr,
             po_action_history poph,
             hr.per_all_people_f poall,
             hr.per_all_people_f prall,
             hr.per_all_assignments_f asgpo,
             hr.per_all_assignments_f asgpr,
             per_grades_vl grdpo,
             per_grades_vl grdpr,
             po_headers_all poha_apprv,
             po_distributions_all poda_apprv,
             po_action_history poph_apprv,
             hr.per_all_people_f poall_apprv,
             hr.per_all_assignments_f asgpo_apprv,
             per_grades_vl grdpo_apprv
       WHERE poph.employee_id = poall.person_id
         AND popr.employee_id = prall.person_id
         AND poall.person_id = asgpo.person_id
         AND prall.person_id = asgpr.person_id
         AND asgpr.grade_id = grdpr.grade_id(+)
         AND asgpo.grade_id = grdpo.grade_id(+)
         AND prda.distribution_id = poda.req_distribution_id
         AND poha.po_header_id = poda.po_header_id
         AND prda.requisition_line_id = porl.requisition_line_id
         AND porh.requisition_header_id = porl.requisition_header_id
         AND porh.requisition_header_id = popr.object_id
         AND poph.object_type_code = 'PO'
         AND poha.po_header_id = poph.object_id
         AND SYSDATE BETWEEN poall.effective_start_date AND poall.effective_end_date
         AND SYSDATE BETWEEN prall.effective_start_date AND prall.effective_end_date
         AND SYSDATE BETWEEN asgpo.effective_start_date AND asgpo.effective_end_date
         AND SYSDATE BETWEEN asgpr.effective_start_date AND asgpr.effective_end_date
         AND SYSDATE BETWEEN poall_apprv.effective_start_date
                         AND poall_apprv.effective_end_date
         AND SYSDATE BETWEEN asgpo_apprv.effective_start_date
                         AND asgpo_apprv.effective_end_date
         AND prda.distribution_id = poda_apprv.req_distribution_id
         AND poha_apprv.po_header_id = poda_apprv.po_header_id
         AND poph_apprv.employee_id = poall_apprv.person_id
         AND poall_apprv.person_id = asgpo_apprv.person_id
         AND asgpo_apprv.grade_id = grdpo_apprv.grade_id(+)
         AND poha_apprv.po_header_id = poph_apprv.object_id
         AND poph_apprv.object_type_code = 'PO'
    --AND PORH.SEGMENT1='6003' -------when i give a particular PR number it comes out correct even with the order by clause    
    AND poph_apprv.action_code = 'APPROVE'
    ORDER BY 4, 10, 14when the PORH.SEGMENT1 is commented in oorder to display days for all po/pr i get the error
    kindly help me
    or is there an alternate calculation to get the number of days
    my date is in the format of 4/29/2009 9:13:51 AM
    for my caluculation i ve just taken the dates as i require days only kindly help
    Edited by: makdutakdu on Jun 2, 2010 7:52 AM

Maybe you are looking for