PLS-00304: cannot compile < package > body without its specification

Hi all
When compiling the below pasted together, I got the following error msg.
PL/SQL: Compilation unit analysis terminated
PLS-00304: cannot compile body of 'EDR_RPT_CLASS_BY_TAWT_PACKAGE'
without its specification

PLS-00905: object HDOT.EDR_RPT_CLASS_BY_TAWT_PACKAGE is invalid
But me, which forfeit and ppackage specification of the body properly. Please could someone help me find the error

CREATE OR REPLACE PACKAGE edr_rpt_class_by_tawt_package AS


PROCEDURE edr_rpt_gen_class_by_tawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
);

PROCEDURE edr_rpt_gen_class_by_fawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
);

PROCEDURE edr_rpt_gen_class_by_sawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
);


PROCEDURE edr_rpt_gen_class_by_triawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
);

PROCEDURE edr_rpt_gen_class_by_qawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
);

FUNCTION  class_count
(
  in_lane_id                  edr_rpt_by_ranges_output.lane_id%TYPE,
  in_direction_id             edr_rpt_by_ranges_output.direction_id%TYPE,
  in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
  in_interval_end_date_time   edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
  in_axle_wt_min              edr_cls_by_tawt_report_data.group_weight%TYPE,
  iin_axle_wt_max             edr_cls_by_tawt_report_data.group_weight%TYPE,
  in_class_min                edr_cls_by_tawt_report_data.vehicle_class%TYPE,
  in_class_max                edr_cls_by_tawt_report_data.vehicle_class%TYPE
)
RETURN VARCHAR2;


END edr_rpt_class_by_tawt_package;
/

CREATE OR REPLACE PACKAGE BODY edr_rpt_class_by_tawt_package AS

   c_front_axle_only         CONSTANT axle_class.group_type%TYPE := -1;
   c_axle_single_group_type  CONSTANT axle_class.group_type%TYPE := 1;
   c_axle_tandem_group_type  CONSTANT axle_class.group_type%TYPE := 2;
   c_axle_tridem_group_type  CONSTANT axle_class.group_type%TYPE := 3;
   c_axle_quadrem_group_type CONSTANT axle_class.group_type%TYPE := 4;
   c_kips_conversion_unit_id CONSTANT units.unit_id%TYPE         := 8;

   v_report_axle_group_type  axle_class.group_type%TYPE := 0;


FUNCTION  class_count
(
  in_lane_id                  edr_rpt_by_ranges_output.lane_id%TYPE,
  in_direction_id             edr_rpt_by_ranges_output.direction_id%TYPE,
  in_interval_start_date_time edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
  in_interval_end_date_time   edr_rpt_by_ranges_output.interval_start_date_time%TYPE,
  in_axle_wt_min              edr_cls_by_tawt_report_data.group_weight%TYPE,
  in_axle_wt_max              edr_cls_by_tawt_report_data.group_weight%TYPE,
  in_class_min                edr_cls_by_tawt_report_data.vehicle_class%TYPE,
  in_class_max                edr_cls_by_tawt_report_data.vehicle_class%TYPE
)
RETURN NUMBER
IS
  my_count_result NUMBER(18);
BEGIN

   SELECT NVL(SUM(vehicle_count), 0 )
   INTO my_count_result
   FROM
       (
        SELECT site_lane_id
        FROM   edr_rpt_tmp_report_lanes
        WHERE  edr_rpt_tmp_report_lanes.output_lane_id        = in_lane_id
          AND  edr_rpt_tmp_report_lanes.output_direction_id   = in_direction_id
       ) report_lanes
   JOIN edr_cls_by_tawt_report_data
     ON edr_cls_by_tawt_report_data.site_lane_id          = report_lanes.site_lane_id
   WHERE edr_cls_by_tawt_report_data.bin_start_date_time >= in_interval_start_date_time
     AND edr_cls_by_tawt_report_data.bin_start_date_time <  in_interval_end_date_time
     AND edr_cls_by_tawt_report_data.group_weight >= in_axle_wt_min
     AND edr_cls_by_tawt_report_data.group_weight  < in_axle_wt_max  
     AND edr_cls_by_tawt_report_data.vehicle_class >= in_class_min
     AND edr_cls_by_tawt_report_data.vehicle_class <= in_class_max
     ;

   RETURN my_count_result;
END;


FUNCTION get_row_class_counts_text
RETURN VARCHAR2
IS
   my_row_counts_text  VARCHAR2(10000);
   my_row_counts_entry  VARCHAR2(10000);

   CURSOR row_counts_text IS
     SELECT 'edr_rpt_class_by_tawt_package.class_count('
                       ||'lane_id, '
                       ||'direction_id, '
                       ||'interval_start_date_time, '
                       ||'interval_end_date_time, '
                       ||'range_low, '
                       ||'range_high, '
                       || class_id || ', '
                       || class_id || ') "'|| class_id || '"'
     FROM edr_rpt_tmp_report_classes
     ORDER BY class_id;

BEGIN

  my_row_counts_text   := '';
  my_row_counts_entry  := '';

  -- generate the speed ranges function calls
  OPEN row_counts_text;
  LOOP

    FETCH row_counts_text INTO my_row_counts_entry;

    EXIT WHEN row_counts_text%NOTFOUND;

    my_row_counts_text := my_row_counts_text || ', ' || my_row_counts_entry;

  END LOOP;
  CLOSE row_counts_text;

  RETURN my_row_counts_text;

END;



FUNCTION get_row_totals_text
RETURN VARCHAR2
IS
   my_row_count_total_text  VARCHAR2(10000);
BEGIN

  my_row_count_total_text := '';

  -- generate the 'total' column function call
  SELECT 'edr_rpt_class_by_tawt_package.class_count('
                       ||'lane_id, '
                       ||'direction_id, '
                       ||'interval_start_date_time, '
                       ||'interval_end_date_time, '
                       ||'range_low, '
                       ||'range_high, '
                       || MIN(class_id) || ', '
                       || MAX(class_id) || ') " "'
  INTO my_row_count_total_text
  FROM edr_rpt_tmp_report_classes;

  RETURN ', ' || my_row_count_total_text;

END;



PROCEDURE apply_default_awt_ranges(in_report_parameter_id   IN   NUMBER)
IS

  my_awt_ranges_count NUMBER(4);

BEGIN

 SELECT nvl(count(1),0)
 INTO my_awt_ranges_count
 FROM report_range_parameters
 WHERE REPORT_PARAMETER_ID = in_report_parameter_id
   AND REPORT_PARAMETER_GROUP = 'AXLE_GROUP'
   AND REPORT_PARAMETER_NAME = 'AXLE_NAME';

 IF  ( my_awt_ranges_count = 0 )
 THEN
  INSERT INTO report_range_parameters (REPORT_PARAMETER_ID, REPORT_PARAMETER_GROUP, REPORT_PARAMETER_NAME, REPORT_PARAMETER_MIN_VALUE, REPORT_PARAMETER_MAX_VALUE)
    VALUES (in_report_parameter_id, 'AXLE_GROUP', 'AXLE_NAME', '0', '2'); 
    VALUES (in_report_parameter_id, 'AXLE_GROUP', 'AXLE_NAME', '30', '32');
 END IF;

END;


PROCEDURE edr_class_by_tawt_use_per_veh
(
   in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
   in_good_status_mask      IN      NUMBER
)
IS

 max_axle_group_value NUMBER(12);

BEGIN

  DELETE FROM edr_cls_by_tawt_report_data;
 
  COMMIT;

  INSERT INTO edr_cls_by_tawt_report_data
                (
                  site_id,
                  site_lane_id,
                  site_direction_id,
                  site_direction_name,
                  bin_start_date_time,
                  group_weight,
                  bin_id,
                  bin_value
                 )
  SELECT site_id,
         site_lane_id,
         site_direction_id,
         site_direction_name,
         date_time,
         group_weight,
         vehicle_class,
         COUNT(vehicle_class)
  FROM
         (
           SELECT edr_cls_by_tawt_per_veh_data.*
             FROM edr_cls_by_tawt_per_veh_data           
     GROUP BY date_time,
           site_lane_id,
           group_weight,
           vehicle_class,
           site_id,
           site_direction_id,
           site_direction_name;

END edr_class_by_tawt_use_per_veh;


PROCEDURE edr_class_by_tawt_data_type
(
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  in_good_status_mask      IN      NUMBER,
  in_data_type             IN      VARCHAR2,
  out_data_type_used          OUT  VARCHAR2
)
IS
  my_bin_entry_count   NUMBER(12,0);
  my_veh_entry_count   NUMBER(12,0);
BEGIN

  IF(UPPER(in_data_type) = 'BINNED') THEN

    --  Axle information can only be read from Per Vehicle data records
    --   - using bins-only is not a supported option
    RAISE_APPLICATION_ERROR(-20101,'Binned data cannot be used for this report.');


  ELSIF    (UPPER(in_data_type) = 'PERVEHICLE')
        OR (UPPER(in_data_type) = 'COMBINED')
  THEN

    out_data_type_used := 'Per Vehicle (All Vehicles)';

    edr_class_by_tawt_use_per_veh( in_report_parameter_id, in_good_status_mask );

  ELSE
     RAISE_APPLICATION_ERROR(-20101,'The data type specified is not recognized.');
  END IF;

END edr_class_by_tawt_data_type;


PROCEDURE edr_class_by_tawt_get_veh_data
(
  in_report_parameter_id   IN   NUMBER,
  in_site_id               IN   NUMBER,
  in_start_date_time       IN   TIMESTAMP,
  in_end_date_time         IN   TIMESTAMP,
  in_report_level_min      IN   NUMBER,
  in_report_level_max      IN   NUMBER
)
IS

BEGIN
 
  DELETE FROM edr_cls_by_tawt_per_veh_data;

  INSERT INTO edr_cls_by_tawt_per_veh_data
        (
          site_id,
          site_lane_id,
          site_direction_id,
          site_direction_name,
          record_id,
          date_time,
          group_weight,
          vehicle_class,
          group_number,
          vehicle_status,
          vehicle_error_count,
          axle_violations_count,
          group_type          
        )
  SELECT axle_info.site_id,
         axle_info.site_lane_id,
         axle_info.site_direction_id,
         axle_info.site_direction_name,
         axle_info.record_id,
         axle_info.datetime,
         axle_info.group_weight,
         axle_info.v_class,
         axle_info.group_number,
         NVL((SELECT SUM(status_code)
                FROM traffic_status
               WHERE traffic_status.record_id = axle_info.record_id), 0) vehicle_status,
         NVL((SELECT COUNT(error_code)
                FROM traffic_error
               WHERE traffic_error.record_id = axle_info.record_id), 0) vehicle_error_count,
         NVL((SELECT COUNT(1)
                FROM axle_weight_violation
               WHERE axle_weight_violation.record_id = axle_info.record_id), 0) axle_violations_count,
         axle_info.group_type            
    FROM (SELECT site_to_data_source_lane_v.site_id,
                 site_to_data_source_lane_v.site_lane_id,
                 site_to_data_source_lane_v.site_direction_id,
                 site_to_data_source_lane_v.site_direction_name,
                 traffic_record.record_id,
                 traffic_record.datetime,
                 NVL(traffic_class.v_class, 0)   v_class,
                 NVL(axle_class.group_type, 0)   group_type,
                 NVL(axle_class.group_number, 0) group_number,                
                 NVL(TRUNC(sum(convert_units(axle.weight_unit_id,
                                         c_kips_conversion_unit_id,
                                         axle.axle_weight
                                        )
                           )
                       ),
                       0
                     ) group_weight
           FROM  traffic_record
           JOIN  site_to_data_source_lane_v
             ON  traffic_record.data_source_id = site_to_data_source_lane_v.data_source_id
            AND  traffic_record.lane = site_to_data_source_lane_v.data_source_lane_id                    
       GROUP BY site_to_data_source_lane_v.site_id,
                 site_to_data_source_lane_v.site_lane_id,
                 site_to_data_source_lane_v.site_direction_id,
                 site_to_data_source_lane_v.site_direction_name,
                 traffic_record.record_id,
                 traffic_record.datetime,
                 traffic_class.v_class,                 
                 axle_class.group_type,
                 axle_class.group_number
        ) axle_info
   

END edr_class_by_tawt_get_veh_data;


PROCEDURE gen_class_by_axle_type
(
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS

 
BEGIN
 
  apply_default_awt_ranges(in_report_parameter_id);

  my_date_format_mask   := edr_rpt_generic_package.edr_rpt_get_date_format_mask(in_report_parameter_id);
  my_start_date_time    := edr_rpt_generic_package.edr_rpt_get_start_date_time(in_report_parameter_id, my_date_format_mask);
  my_end_date_time      := edr_rpt_generic_package.edr_rpt_get_end_date_time(in_report_parameter_id, my_date_format_mask);
  my_lane_grouping      := edr_rpt_generic_package.edr_rpt_get_lane_grouping(in_report_parameter_id);
  my_site_id            := edr_rpt_generic_package.edr_rpt_get_site_id(in_report_parameter_id);
  my_selected_data_type := edr_rpt_generic_package.edr_rpt_get_data_type(in_report_parameter_id);

  -- ensure selected classes and lanes temp tables have been populated
  edr_rpt_generic_package.edr_rpt_gen_tmp_lanes(in_report_parameter_id);
  edr_rpt_generic_package.edr_rpt_gen_tmp_classes(in_report_parameter_id);
  edr_rpt_generic_package.edr_rpt_gen_tmp_speed_ranges(in_report_parameter_id);

  my_good_weight_statuses_mask   := edr_rpt_generic_package.get_good_weight_status_mask(in_report_parameter_id);


  edr_rpt_generic_package.edr_rpt_gen_inclusion_table
  (
    in_report_parameter_id,
    my_date_format_mask,
    my_start_date_time,
    my_end_date_time
  );

  edr_rpt_generic_package.edr_rpt_gen_grouping_table
  (
    in_report_parameter_id,
    my_date_format_mask,
    my_start_date_time,
    my_end_date_time
  );

  edr_class_by_tawt_get_veh_data
  (
    in_report_parameter_id,
    my_site_id,
    my_start_date_time,
    my_end_date_time,
    0,                          --Hardcoded until reclassification is supported.
    0                           --Hardcoded until reclassification is supported.
  );

  edr_class_by_tawt_data_type
  (
    in_report_parameter_id,
    my_good_weight_statuses_mask,
    my_selected_data_type,
    my_used_data_type
  );


  edr_rpt_generic_package.gen_rpt_by_ranges_output_table
  (
    in_report_parameter_id,
    'AXLE_GROUP',
    'AXLE_NAME'
  );

  COMMIT;
  my_report_data_statement :=
      ' SELECT rank "Rank", '
    ||       ' row_type "Row Type", '
    ||       ' interval_start_date_time "Date", '
    ||       ' interval_start_date_time, '
    ||       ' range_label "Chart X-Axis", '
    ||       ' lane_id "Group Id" , '
    ||       ' ''None'' "Group Name", '
    ||       ' range_label "Speed (mph)" '
    ||         get_row_class_counts_text
    ||         get_row_totals_text
    ||       ' FROM edr_rpt_by_ranges_output '
    ||       ' ORDER BY lane_id, '
    ||                ' direction_id, '
    ||                ' interval_start_date_time, '
    ||                ' range_high, '
    ||                ' rank, '
    ||                ' range_low'
    ;

  dbms_output.put_line('SQL start------------------------');
  dbms_output.put_line(my_report_data_statement);
  dbms_output.put_line('SQL end--------------------------');


  my_chart_data_statement :=
       ' SELECT range_low "X Axis", '
    ||        ' lane_id "Group" '
    ||         get_row_class_counts_text
    || ' FROM '
    || ' ( '
    || ' SELECT lane_id, '
    ||        ' direction_id, '
    ||        ' range_low, '
    ||        ' range_high, '
    ||        ' min(interval_start_date_time) interval_start_date_time, '
    ||        ' max(interval_end_date_time) interval_end_date_time '
    || ' FROM edr_rpt_by_ranges_output '
    || ' WHERE rank = 1 '
    || ' GROUP BY lane_id, direction_id, range_low,  range_high '
    || ' ) '
    || ' order by "Group", range_low '
    ;

  dbms_output.put_line('SQL start------------------------');
  dbms_output.put_line(my_chart_data_statement);
  dbms_output.put_line('SQL end--------------------------');



  SELECT my_used_data_type
    INTO my_data_type_used
    FROM SYS.DUAL;

  SELECT NVL(COUNT(DISTINCT record_id), 0)
    INTO my_per_vehicle_total
    FROM edr_cls_by_tawt_per_veh_data;

  SELECT NVL(COUNT(DISTINCT record_id), 0)
    INTO my_status_vehicle_total
    FROM edr_cls_by_tawt_per_veh_data
   WHERE vehicle_status > 0
     AND vehicle_error_count = 0;


  SELECT NVL(COUNT(DISTINCT record_id), 0)
    INTO my_error_vehicle_total
    FROM edr_cls_by_tawt_per_veh_data
   WHERE vehicle_error_count > 0;


  SELECT NVL(COUNT(DISTINCT record_id), 0)
    INTO my_status_clear_total
    FROM edr_cls_by_tawt_per_veh_data
   WHERE vehicle_status = 0
     AND vehicle_error_count = 0;


  SELECT NVL(COUNT(1), 0)
    INTO my_binned_vehicle_total
    FROM edr_cls_by_tawt_per_veh_data;

  SELECT NVL(COUNT(1), 0)
    INTO my_good_weight_total
    FROM edr_cls_by_tawt_per_veh_data
   WHERE vehicle_error_count = 0
     AND BITAND(vehicle_status, my_good_weight_statuses_mask) = 0;

  -- insert vehicle totals into the temporary table
  DELETE FROM edr_rpt_tmp_veh_totals_table;

  INSERT INTO edr_rpt_tmp_veh_totals_table
  SELECT my_data_type_used,
         my_per_vehicle_total,
         my_binned_vehicle_total,
         my_error_vehicle_total,
         my_status_vehicle_total,
         my_good_weight_total,
         my_status_clear_total
    FROM SYS.DUAL;

  -- execute the query into the output refcursor
  OPEN report_data FOR
    my_report_data_statement;

  OPEN chart_data FOR
    my_chart_data_statement;

  OPEN footer_data FOR
    SELECT data_type_used,
           per_vehicle_total,
           binned_vehicle_total,
           error_vehicle_total,
           status_vehicle_total,
           good_weight_total,
           status_clear_total
      FROM edr_rpt_tmp_veh_totals_table;

END gen_class_by_axle_type;

PROCEDURE edr_rpt_gen_class_by_sawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS
BEGIN
  v_report_axle_group_type := c_axle_single_group_type;
  gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;

PROCEDURE edr_rpt_gen_class_by_fawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS
BEGIN
  v_report_axle_group_type := c_front_axle_only ;
  gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;

PROCEDURE edr_rpt_gen_class_by_tawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS
BEGIN
  v_report_axle_group_type := c_axle_tandem_group_type;
  gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;

PROCEDURE edr_rpt_gen_class_by_triawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS
BEGIN
  v_report_axle_group_type := c_axle_tridem_group_type;
  gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;

PROCEDURE edr_rpt_gen_class_by_qawt (
  in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
  report_data              OUT     SYS_REFCURSOR,
  chart_data               OUT     SYS_REFCURSOR,
  footer_data              OUT     SYS_REFCURSOR
)
AS
BEGIN
  v_report_axle_group_type :=  c_axle_quadrem_group_type;
  gen_class_by_axle_type(in_report_parameter_id, report_data, chart_data, footer_data);
END;

END edr_rpt_class_by_tawt_package;
/


LIST

SHOW ERROR

FUNCTION RETURN VARCHAR2 class_count in package specifications and
FUNCTION RETURN NUMBER class_count in the package body.
change the type of data SERVICE class_count

Tags: Database

Similar Questions

  • Impossible to compile a body of dbms_utility without its specifications

    Hello!
    I just got this error on my EE 11 g database

    yesterday had feeding problems and the batery backup was not working (but very often)

    Today, trying to send an e-mail with a job, I realized through TOAD this sys has 304 invalid objects.
    Try to compile and it seems that something is missing.

    "cannot compile the body of dbms_utility without its specifications.

    I can't find that descriptive and not found the forums related to this.

    need expert help...

    S.O. Oracle enterprise linux 4.7
    D.B. Oracle Enterprise 11.2

    Thank you!

    Looks like you can not compile this.
    You can try runing below on the server where the database is installed. This can take some time to complete:

    SQL>@?/rdbms/admin/catalog.sql
    

    Once it's done, please check the number of invalids run below and resumes the invalides

    SQL>@?/rdbms/admin/utlrp.sql
    

    If this fix then OK, otherwise please run below

    SQL>@?/rdbms/admin/catproc.sql
    

    and

    SQL>@?/rdbms/admin/utlrp.sql
    

    This should solve you the problem.

    Kind regards
    Julien

  • PLS-00323: subprogram or cursor is declared in a package specification and must be defined in the package body

    Hi all

    Please help me understand why I receive PLS-00323 error when my function exists in the header and body of the package.

    Please find below the source code.

    Maybe I should post more details here, please tell me what else should I show to get help.

    I tried to compile my drawing

    EXEC DBMS_UTILITY.compile_schema (pattern = > 'ZVIT');

    but still

    Select * from user_errors

    Returns

    NAME TYPE SEQUENCE LINE (LINE)

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

    TEXT

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

    ATTRIBUTE MESSAGE_NUMBER

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

    PACKAGE 2 8 12 PKG_PK8842_ACCNOTMOVE BODY

    PLS-00323: subprogram or cursor "ACCNOTMOVEFIZ" is declared in a specific package

    cation and must be defined in the package body

    ERROR 323

    PACKAGE 1 3 12 PKG_PK8842_ACCNOTMOVE BODY

    PLS-00323: subprogram or cursor "ACCNOTMOVEJUR" is declared in a specific package

    cation and must be defined in the package body

    ERROR 323

    2 selected lines.

    source code:

    CREATE OR REPLACE PACKAGE ZVIT. PKG_PK8842_AccNotMove

    AS

    FUNCTION AccNotMoveJUR)

    p_contragentId dwh_CR_contragent.ID%TYPE,

    p_date Date)

    RETURN number;

    FUNCTION AccNotMoveFIZ)

    p_contragentId dwh_CR_contragent.ID%TYPE,

    p_date Date)

    RETURN number;

    FUNCTION DtLastMove)

    p_Id B2_OLAP. DIMAACCOUNT_ALL.ID%TYPE)

    Date of RETURN;

    END;

    /

    CREATE OR REPLACE PACKAGE BODY ZVIT. PKG_PK8842_AccNotMove

    AS

    FUNCTION AccNotMoveJUR)

    p_contragentId zvit.dwh_CR_contragent.ID%TYPE,

    p_date Date)

    RETURN number

    IS

    l_Result Number (1);

    l_contragentId zvit.dwh_CR_contragent.ID%TYPE;

    l_dateopen Date;

    Date of l_dtMove1;

    Date of l_dtMove2;

    BEGIN

    l_Result: = 0;

    BEGIN

    Select Distinct a.contragentid

    In l_contragentId

    OF B2_OLAP. DIMAACCOUNT_ALL one

    where a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and a.ACCOUNTSTATEID not in (1,2);

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_contragentId: = NULL;

    END;

    IF l_contragentId IS NOT NULL THEN

    l_Result: = 0;

    ON THE OTHER

    BEGIN

    Select MAX (a.dateopen)

    In l_DateOpen

    OF B2_OLAP. DIMAACCOUNT_ALL one

    where a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and a.ACCOUNTSTATEID <>2

    and a.DateOpen > p_date;

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DateOpen: = NULL;

    END;

    IF l_DateOpen IS NOT NULL THEN

    l_Result: = 0;

    ON THE OTHER

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and d.ACCOUNTBID = a.Id

    and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and not in Substr (d.accountano, 1, 4) ('2608 ', ' 2658');

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and d.ACCOUNTBID = a.Id

    and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and not in Substr (d.accountano, 1, 4) ('2608 ', ' 2658');

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and d.ACCOUNTAID = a.Id

    and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2600,2650)

    and d.arcdate > = p_date

    and d.ACCOUNTAID = a.Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    l_Result: = 1;

    On the other

    l_Result: = 0;

    End If;

    END IF;

    END IF;

    RETURN l_Result;

    END AccNotMoveJUR;

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

    FUNCTION AccNotMoveFIZ)

    p_contragentId zvit.dwh_CR_contragent.ID%TYPE,

    p_date Date)

    RETURN number

    IS

    l_Result Number (1);

    l_contragentId zvit.dwh_CR_contragent.ID%TYPE;

    l_dateopen Date;

    Date of l_dtMove1;

    BEGIN

    l_Result: = 0;

    BEGIN

    Select Distinct a.contragentid

    In l_contragentId

    OF B2_OLAP. DIMAACCOUNT_ALL one

    where a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and a.ACCOUNTSTATEID not in (1,2);

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_contragentId: = NULL;

    END;

    IF l_contragentId IS NOT NULL THEN

    l_Result: = 0;

    ON THE OTHER

    BEGIN

    Select MAX (a.dateopen)

    In l_DateOpen

    OF B2_OLAP. DIMAACCOUNT_ALL one

    where a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and a.ACCOUNTSTATEID <>2

    and a.DateOpen > p_date;

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DateOpen: = NULL;

    END;

    IF l_DateOpen IS NOT NULL THEN

    l_Result: = 0;

    ON THE OTHER

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and d.ACCOUNTBID = a.Id

    and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and Substr(d.accountano,1,4) <>'2628';

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and d.arcdate > = p_date

    and d.ACCOUNTBID = a.Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and Substr(d.accountano,1,4) <>'2628';

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and d.ACCOUNTAID = a.Id

    and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    BEGIN

    SELECT MAX (d.arcdate)

    In l_dtMove1

    OF B2_OLAP. DIMAACCOUNT_ALL has,

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE a.contragentid = p_contragentId

    and a.BACCOUNTID in (2620,2625)

    and d.arcdate > = p_date

    and d.ACCOUNTAID = a.Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_dtMove1: = NULL;

    END;

    END IF;

    IF l_dtMove1 IS NULL THEN

    l_Result: = 1;

    On the other

    l_Result: = 0;

    End If;

    END IF;

    END IF;

    RETURN l_Result;

    END AccNotMoveFIZ;

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

    FUNCTION DtLastMove)

    p_Id B2_OLAP. DIMAACCOUNT_ALL.ID%TYPE)

    Date of RETURN

    IS

    l_Result Date;

    Date of l_DtLast1;

    Date of l_DtLast2;

    Date of l_DtLast3;

    Date of l_DtLast4;

    BEGIN

    l_Result: = NULL;

    BEGIN

    SELECT MAX (d.arcdate)

    In l_DtLast1

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE d.ACCOUNTBID = p_Id

    - and d.arcdate > = p_date

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and Substr (d.accountano, 1, 4) not in ('2608', ' 2658 ', ' 2628');

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DtLast1: = NULL;

    END;

    BEGIN

    SELECT MAX (d.arcdate)

    In l_DtLast2

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE d.ACCOUNTBID = p_Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3)

    and Substr (d.accountano, 1, 4) not in ('2608', ' 2658 ', ' 2628');

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DtLast2: = NULL;

    END;

    BEGIN

    SELECT MAX (d.arcdate)

    In l_DtLast3

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE d.ACCOUNTAID = p_Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DtLast3: = NULL;

    END;

    BEGIN

    SELECT MAX (d.arcdate)

    In l_DtLast4

    B2_OLAP.AR_DOCUMENT d,

    B2_OLAP. DIMDOCUMENTTYPE dt

    WHERE d.ACCOUNTAID = p_Id

    and d.DOCUMENTTYPEID = dt.id

    and dt. OPERATIONTYPEBYSUMMAID not to (2,3);

    - and d.DOCUMENTSTATEID = 2

    EXCEPTION

    WHEN NO_DATA_FOUND THEN

    l_DtLast4: = NULL;

    END;

    l_DtLast1:=NVL(l_DtLast1,to_date('01.01.1900','dd.mm.yyyy'));

    l_DtLast2:=NVL(l_DtLast2,to_date('01.01.1900','dd.mm.yyyy'));

    l_DtLast3:=NVL(l_DtLast3,to_date('01.01.1900','dd.mm.yyyy'));

    l_DtLast4:=NVL(l_DtLast4,to_date('01.01.1900','dd.mm.yyyy'));

    l_Result: = Greatest (l_DtLast1, l_DtLast2, l_DtLast3, l_DtLast4);

    IF l_Result = TO_DATE('01.01.1900','dd.mm.yyyy') THEN

    l_Result: = NULL;

    END IF;

    RETURN l_Result;

    END DtLastMove;

    ---////////////////////////////////////////////////////

    END;

    /

    You declare your parameter with a different type between the specification and body, your statements must match.

  • 4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode

    4.0 ai2 - cannot select and copy the code from a package body when opened in read-only mode

    He was connected/buggy. It is not fixed yet. But it will be.

  • How to find the timestamp of the packege/package body compiled in the last 15 days

    Hi all

    I would find the timestamp of the package/package body compiled in the last 15 days.

    Y at - it all features, which will record all the information date of compilation of a particular package or package body.

    If so, please provide the request.

    version: Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - Production

    Thank you
    Rambeau

    Hi Raghu,

    As far as I know, you can't.

    Kind regards.
    Al

  • How to display errors in compiling the package body

    Hi friends,


    My package body is not valid. How to compile it?

    I tried > alter compilation of body package PACKAGE1.

    But I got error.

    I tried > alter compilation package PACKAGE1.

    with compilation errors.

    SQL > show errors

    No errors.


    How can I get the errors of compilation of a package body?

    Thank you very much

    Check with--for the compilation of the body and package

    alter package   compile package
    alter package   compile body
    

    and after that check... display errors

    http://Stanford.edu/dept/ITSS/docs/Oracle/10G/server.101/b10759/statements_2005.htm

    Ravi Kumar

  • Procedure is not recognized in the package body

    I have this error message:

    Compile for HR.MILOS_PACKAGE BODY of PACKAGE errors

    Error: PLS-00323: subprogram or cursor "RAISE_SALARY" is declared in a package specification and must be defined in the package body

    Online: 19

    Text: IF (l_exists)

    I deffined in the whole of the body after the first procedure that is no problem.

    I don't know what the problem is. There is no other sugestions compiler.

    Procedure works very well when packing.

    PROCEDURE RAISE_SALARY (p_perc p_dep_id NUMBER, NUMBER) IS

    v_emp_id employees.employee_id%TYPE;

    v_sal employees.salary%TYPE;

    v_avg_sal employees.salary%TYPE;

    CURSOR c_salaries IS SELECT employee_id, salary employees

    If NOT EXISTS (SELECT 1 from employees e WHERE e.manager_id = employees.employee_id)

    and department_id = p_dep_id;

    CURSOR c_salaries_m IS SELECT employee_id, salary employees

    WHERE employe_id IN (SELECT distinct manager_id of employees)

    and department_id = p_dep_id;

    Start

    SELECT AVG (salary) IN the v_avg_sal FROM Employees WHERE department_id = p_dep_id;

    OPEN c_salaries.

    LOOP

    EXTRACT c_salaries INTO v_emp_id, v_sal;

    EXIT WHEN c_salaries % NOTFOUND;

    IF v_sal + 1 > 3 * v_avg_sal

    THEN UPDATE employees SET salary = 3 * v_avg_sal

    WHERE employe_id = v_emp_id;

    UPDATE of OTHER employees SET salary = salary * to_number ('1' |'.) ' || p_perc)

    WHERE employe_id = v_emp_id;

    END IF;

    END LOOP;

    CLOSE C_salaries;

    OPEN c_salaries_m.

    LOOP

    EXTRACT c_salaries_m INTO v_emp_id, v_sal;

    EXIT WHEN c_salaries_m % NOTFOUND;

    IF v_sal + 5 > 3 * v_avg_sal

    THEN UPDATE employees SET salary = 3 * v_avg_sal

    WHERE employe_id = v_emp_id;

    UPDATE of OTHER employees SET salary = salary * to_number ('1' |'.) ' || (p_perc + 50))

    WHERE employe_id = v_emp_id;

    END IF;

    END LOOP;

    CLOSE C_salaries_m;

    end RAISE_SALARY;

    Compile for HR.MILOS_PACKAGE BODY of PACKAGE errors

    Error: PLS-00323: subprogram or cursor "RAISE_SALARY" is declared in a package specification and must be defined in the package body

    We hear... you have defined the raise_salary procedure in the package specification but not in the package body. (pretty clear)

    not in the package body means:

    the statement could be different...

    PROCEDURE RAISE_SALARY (NUMBER, p_dep_id NUMBER p_perc)

    so:

    are identical named parameters?

    they have identical data types?

    vary according to the assigned default values?

    vary according to its use (IN/OUT/IN OUT) - (why did not specify the use anyway?)

    HTH

  • ORA-04063: package body 'SYS. DBMS_CUBE_EXP"got error in expdp

    Oracle 11.2.0.2 on Redhat. Received the error when export a schema
    [oracle@cchorbi1 admin]$ expdp bi/pass@cchbi2 schemas=BISTG directory=DATA_PUMP_DIR parallel=12 
    dumpfile=bistg_bi2_0315_%U.dmp logfile=bistg_bi2_0315.log
    ....
    Starting "BI"."SYS_EXPORT_SCHEMA_02":  bi/********@cchbi2 schemas=BISTG directory              
    =DATA_PUMP_DIR parallel=12 dumpfile=bistg_bi2_0315_%U.dmp logfile=bistg_bi2_0315.              log
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS []              
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.00.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    Thhs is a routine operation and still works. Recent changes to the database are down some patterns that we thought is perhaps not helpful, refer to
    http://abcdba.com/abcdbaserver11gdefaultschema 
    . Removed default schema users are
    ANONYMOUS,APPQOSSYS,CTXSYS,DIP,EXFSYS,MDDATA,MDSYS,OE,OLAPSYS,
    ORACLE_OCM,ORDDATA,ORDPLUGINS,ORDSYS,OWBSYS,OWBSYS_AUDIT,PM,SCOTT,
    SH,SI_INFORMTN_SCHEMA,SPATIAL_CSW_ADMIN_USR,SPATIAL_WFS_ADMIN_USR
    WMSYS
    The remaining default schemas are
    APEX_030200,APEX_PUBLIC_USER,DBSNMP,FLOWS_FILES,MGMT_VIEW,
    OUTLN,SYS,SYSMAN,SYSTEM,XDB,XS$NULL
    SYS objects. DBMS_CUBE_EXP causing ORA-06508 exists but not valid
    select owner,object_name,object_type,status from dba_objects where object_name='DBMS_CUBE_EXP'
    SYS     DBMS_CUBE_EXP     PACKAGE             VALID
    SYS     DBMS_CUBE_EXP     PACKAGE BODY     INVALID
    PUBLIC     DBMS_CUBE_EXP     SYNONYM             VALID
    We cannot restore the State before drooping users as it occurred last week and the backup is replaced by a more recent and a newapplication schema is generated and we want to keep?

    Is there a way to solve this problem without restoring database?

    Thank you

    In fact, I had the same problem with DBMS_CUBE_EXP. Oracle Enterprise Manager alert recommended remove EXECUTE on the public DBMS_LOB. This caused several * SYS packages and package bodies to go invalid.  I have granted EXECUTE the user (CTXSYS, OLAPSYS, ect) and then compiled the object successfully.

  • PACKAGE BODY APPS. AD_ZD_ADOP contains errors

    APP TIER - Linux - SLES 11 - SP2 - x86_64

    DB LEVEL - Linux for system Z - SLES 11 - SP2 - s390

    I encounter errors in the body to Package APPS. AD_ZD_ADOP, that has brought all the patches to a status quo on our schedule instance.

    The sequence of events have been

    The following hotfixes have been applied.

    1. Patch 19462638
    2. Patch 19197270
    3. Patch 21132723
    4. 19330775
    5. 20677045
    6. 19259764

    Doc 1617461.1 was followed - B path of

    After Patch 19259764 has been applied, all steps until step 8 of Doc 1617461.1 have been completed.

    Failure of the fs_clone step (step 9). My colleague opened a SR - advice was far from expected.

    Yesterday, I took this with success and more cloned the fix for the file system to perform file system (1383621.1) - however, I'm still not able to run fs_clone with success.

    Even a basic ADADMIN session fails.

    Here are the errors while trying to compile APPS package bodies. AD_ZD_ADOP

    SQL > alter package APPS. AD_ZD_ADOP compile body;

    WARNING: The bodies of Package modified with compilation errors.

    SQL > show errors;
    Errors for BODY of PACKAGE applications. AD_ZD_ADOP:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    2503/3 PL/SQL: statement ignored
    2503/7 PLS-00201: identifier ' SYS. DBMS_METADATA_UTIL' must be declared
    SQL >

    Also while trying to launch ADADMIN, I get errors themselves.

    Error of Administration AD:

    ORA-04063: package body "APPS. AD_ZD_ADOP"contains errors

    Could not insert the record of the action in the table of patches

    Error of Administration AD:

    Error when you try to insert adadmin task CMP_INVALID action

    Update running adadmin of failure actions

    Error of Administration AD:

    The following ORACLE error:

    ORA-01756: city not properly finished chain

    occurred while executing the SQL statement:

    UPDATE ad_adop_session_patches set status = 'F' where status = 'R' and

    as numero_de_bogue ' ADADMIN

    Error of Administration AD:

    Table ad_adop_session_patches update errors

    You must check the file

    /U02/fs_ne/EBSapps/log/ADadmin/log/ADadmin.log

    to find errors.

    Can someone please. I have also a SR - but nice try various channels to find a solution.

    Hello

    The necessary subsidies on the SYS package may be missing. DBMS_METADATA_UTIL.

    Try this command (as sysdba) and compile the package:

    Grant execute on SYS. DBMS_METADATA_UTIL applications;

    Kind regards

    Bashar

  • Package body is not VALID

    Hi friends,

    Could you help me understand this behavior in oracle.

    SQL > create or replace package mypkg is

    2 number of v_statevar: = 40;

    3 procedure MyProc;

    4 end mypkg;

    5.

    Package created.

    SQL > create or replace package body is mypkg

    2 procedure MyProc is

    3 myval number;

    4 start

    5. Select x

    6 in myval

    7 of dependonme;

    8

    9 - myval: = myval * mypkg.v_statevar;

    10 DBMS_OUTPUT. Put_line (' my result is: ' | myVal);

    11 end;

    12 end mypkg;

    13.

    Package body created.

    SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';

    OBJECT_NAME OBJECT_TYPE STATUS

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

    PACKAGE VALID MYPKG

    VALID PACKAGE BODY MYPKG

    SQL > set serveroutput on

    SQL > exec mypkg.myproc;

    My result is: 5

    PL/SQL procedure successfully completed.

    SQL > create or replace package mypkg is

    2 number of v_statevar: = 150;

    3 procedure MyProc;

    4 end mypkg;

    5.

    Package created.

    SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';

    OBJECT_NAME OBJECT_TYPE STATUS

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

    PACKAGE VALID MYPKG

    INVALID BODY PACKAGE MYPKG

    SQL > set serveroutput on

    SQL > exec mypkg.myproc;

    My result is: 5

    PL/SQL procedure successfully completed.

    SQL > select object_name, object_type, status from user_objects where object_name = 'MYPKG ';

    OBJECT_NAME OBJECT_TYPE STATUS

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

    PACKAGE VALID MYPKG

    VALID PACKAGE BODY MYPKG

    SQL >

    How did change the value of the variable in the package specification makes the invalid package body.

    How execution of the procedure of the package is once again the VALID State.

    Kimmy says:

    Hello carine,.

    I'm just setting the variable in the notebook, that variable was not referred to the procedure in the package body, also I'm not change any signature/details of the procedure described in the package specification, then what do the package body are invalid.

    There are two parts to this.

    (a) by recompiling package specifications, you then automatically invalidates all objects in the database that dependent on it.  In this case, the package body is dependent on, so get marked as invalid.  When you try and run something in the package Oracle try to compile the package, if it succeeds, it will mark it as valid again (as in your case).

    (b) the variables and declarations of a package (public and private) are what constitutes the 'State '.  By calling the package, you instantiate a copy in memory to create this state of package for this instantiation of the entire session.  By recompiling package specifications (it's not fair that you change the value of the variable, you recompile the spec), you can invalidate the State in memory and therefore potentially invalidate the package body.  It depends on your version of the database.  In 10g, by invalidating state you will get an exception "State package rejected" when you try to run the package after the change, and then it will automatically compile and validate the package, so that it eventually works ok.  From 11 g, there is more fine grain dependencies on the State, so if the change you have made has no effect on what you run, it can validate and run without causing the exception 'package State scrapped ';. He would only do that if it's something that you used.

  • package body "APPS. AD_ZD_ADOP' mistakes adoption apply fail

    Hello to any help/solution for this error:

    EBS version 12.2

    Intend to upgrade to 12.2.4 then only may apply Doc-Id 1617461.1 :

    "adoption phase = apply patches = 19330775, 20677045 = /hotpatch merge Yes = yes".

    Validation of the system configuration...

    [ERROR] Could not execute the SQL statement:

    Select AD_ZD_ADOP. The double GET_INVALID_NODES()

    [ERROR] Error message:

    [ERROR] Could not execute the SQL statement:

    Select AD_ZD_ADOP. The double GET_INVALID_NODES()

    [ERROR] Error message:

    [UNEXPECTED] '-1' nodes are listed in the table ADOP_VALID_NODES, but not in the FND_NODES table.

    [UNEXPECTED] To fix this problem, run AutoConfig on the nodes '-1 '.

    [UNEXPECTED] Error checking if it is an instance of multi node

    SQL > ALTER PACKAGE APPS. BODY OF AD_ZD_ADOP OF COMPILATION;

    WARNING: The bodies of Package modified with compilation errors.

    SQL > SHOW ERRORS, PACKAGE BODY APPS. AD_ZD_ADOP

    Errors for BODY of PACKAGE applications. AD_ZD_ADOP:

    LINE/COL ERROR

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

    505/13 PL/SQL: statement ignored

    507/86 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    511/13 PL/SQL: statement ignored

    513/86 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    521/12 PL/SQL: statement ignored

    524/18 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    533/9 PL/SQL: statement ignored

    535/121 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    575/9 PL/SQL: statement ignored

    577/123 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    1580/7 PL/SQL: statement ignored

    LINE/COL ERROR

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

    1582/65 PL/SQL: ORA-00904: "SESSION_TYPE": invalid identifier

    SQL >

    Thank you!

    Luis

    Hello

    The solution is:

    1. check that your ad_adop_session_patches.xdf file is version 120.6.12020000.4

    grep Header $AD_TOP/patch/115/xdf/ad_adop_session_patches.xdf

    2. If the version is correct, then run this command (from Bug 18544083 : ADOPTION: ORA-04063: "APPS.) (AD_ZD_ADOP"CONTAINS ERRORS / ORA-00904:"SESSION_TYPE"):

    adjava-mx512m - nojit oracle.apps.fnd.odf2.FndXdfCmp applsys APPS apps APPS thin :: table $AD_TOP/patch/115/xdf/ad_adop_session_patches.xdf $FND_TOP/patch/115/xdf/xsl changedb = y

    Please put in the host current (complete), port, and SID

    NOTE: If you want to test the command first, please change "changedb = y" to "changedb = n".

    3. Please retry compilation AD_ZD_ADOP (or try running ADZDADOPB.pls).

    4. If the compilation of work, retry the patch.

    Kind regards

    Luis

  • Package body dropped, but showing invalid

    Nice day:

    Oracle 11 g 2

    I created a Package with Package bodies, procedures 3, which works very well.  I can call it without error.  However, if I run this query:

    SELECT *.

    From user_objects

    Situation WHERE = "INVALID."

    I get the following result:

    OBJECT_NAMESUBOBJECT_NAMEOBJECT_IDDATA_OBJECT_IDOBJECT_TYPECREATEDLAST_DDL_TIMETIMESTAMPSTATUSTEMPORARYGENERATEDSECONDARYNAMESPACEEDITION_NAME
    TASK_PROCEDURES28700PACKAGE BODY5 July 14July 11, 142014-07 - 11:18:42:39Not validNNN2

    It is an old package body, that I dropped it about 4 days ago.  That is always supposed to show if I run this query?

    I work with Oracle SQL Developer, using almost the same version too. I don't think that it has nothing to do with the tool as the data dictionary shows this info too.

    Could you post the exact commands that you run from a sql more session? And the sql like too much output.

    Example (demo of pseudo code)

    SQL > alter the package xxx body compilation;

    SQL > compiled package.

    SQL > show errors

    SQL > no error

    SQL > drop package xxx;

    SQL > package abandoned;

    SQL > drop package body xxx.

    ???

    SQL > select xxx.someFunction from double;

    I could explain the behavior if you have enabled the editions (CDE). But there is no air if in your case.

    Just to be absolutely sure of it. Make the select statement and after the release:

    select object_name, object_type, namespace, edition_name
    from user_objects_ae
    where object_name = 'YOURPACKAGENAME';
    
  • ORA-04063: package body "APPS. HZ_PARTY_STAGE"contains errors

    Hello

    Received the error when compile. Checked in the Note: 427418.1 did not work. Help, please. It's 12.1.3, 11.2.0.3 Linux database.

    SQL > alter package APPS. HZ_PARTY_STAGE compile body;

    WARNING: The bodies of Package modified with compilation errors.

    SQL > show err

    Errors for BODY of PACKAGE applications. HZ_PARTY_STAGE:

    LINE/COL ERROR

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

    85/5 PL/SQL: statement ignored

    85/5 PLS-00201: identifier ' AD_CTX_DDL. DROP_PREFERENCE' must be

    has said

    95/5 PL/SQL: statement ignored

    95/5 PLS-00201: identifier ' AD_CTX_DDL. CREATE_PREFERENCE' must be

    has said

    96/5 PL/SQL: statement ignored

    96/5 PLS-00201: identifier ' AD_CTX_DDL. SET_ATTRIBUTE' must be declared

    3313/28 PL/SQL: statement ignored

    LINE/COL ERROR

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

    3313/28 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    3322/27 PL/SQL: statement ignored

    3322/27-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    3352/24 PL/SQL: statement ignored

    3352/24 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    3362/23 PL/SQL: statement ignored

    3362/23 PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    3399/26 PL/SQL: statement ignored

    3399/26-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    3409/26 PL/SQL: statement ignored

    3409/26-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    LINE/COL ERROR

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

    3447/27 PL/SQL: statement ignored

    3447/27-PLS-00201: identifier ' AD_CTX_DDL. SYNC_INDEX' must be declared

    SQL > grant execute on AD_CTX_DDL. DROP_PREFERENCE applications;

    Grant execute on AD_CTX_DDL. Applications DROP_PREFERENCE

    *

    ERROR on line 1:

    ORA-04042: procedure, function, package, or package body does not exist

    The solution in the doc, you mentioned in your first post. Run the dctxpkg.sql script and pass the correct settings and make sure that it runs successfully.

    Thank you

    Hussein

  • frmcmp cannot compile the modules containing SQL code that connected to the database

    Hello

    I checked several hundred messages of the forum on the net without finding a solution.

    I have a Linux server with 11.1 WebLogics (11 GR 1 material) and FormsRuntime installed.

    I am logged in as root.

    I put all the environment variables based on the values in default.env.

    In addition, I updated TERM and ORACLE_TERM vt220. And TNS_ADMIN to the location of the sqlnet.ora and tnsnames.ora.

    I compiled a simple .pll containing only the following code:

    IS test PROCEDURE

    an INTEGER: = 0;

    BEGIN

    a: = 1;

    END;

    command:

    frmcmp_batch module = TESTLIBPLAIN.pll userid=myuser/mypassword@mydb module_type = LIBRARY output_file = TESTLIBPLAIN.plx compile_all = Yes = Yes = No. batch connection

    result: successful compilation. generated .plx.

    now, I'm trying to compile an another .pll containing just the following code:

    IS test PROCEDURE

    an INTEGER: = 0;

    BEGIN

    Select 1 in the doubles.

    END;

    command:

    frmcmp_batch module = TESTLIBSQL.pll userid=myuser/mypassword@mydb module_type = LIBRARY output_file = TESTLIBSQL.plx compile_all = Yes = Yes = No. batch connection

    result: error:

    "

    11 forms (form of the compiler) Version 11.1.1.3.0 (Production)

    Copyright (c) 1982, 2010, Oracle and/or its affiliates.  All rights reserved.

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    With partitioning, OLAP and Data Mining options

    PL/SQL Version 11.1.0.7.0 (Production)

    Oracle V11.1.1.3.0 - Production procedure generator

    Oracle virtual graphics system Version 11.1.1.3.0 (Production)

    Oracle Multimedia Version 11.1.1.3.0 (Production)

    Oracle tools integration Version 11.1.1.2.0 (Production)

    Common tools Oracle area Version 11.1.1.3.0

    Oracle CORE Production 11.1.0.7.0

    Compile the library TESTLIB.

    Invalidate the body TEST procedure...

    Compilation of body TEST procedure...

    ERROR on line 5, column 1 0

    Ignored SQL statement

    Library TESTLIB closing...

    Errors on TEST:

    PL/SQL ERROR on line 5, column 1 0

    Ignored SQL statement

    Could not generate the library.

    FRM-30312: unable to compile the library.

    "

    the two libraries differ by having used SQl commands or not.

    I tried to compile some more complex .pll and .fmb containg the SQL code. I get similar error messages. The messages that I receive for each module are the same, I would get when compiling the module with FormBuilder 9i (Windows) without being connected to the database.

    So my first thought was, this frmcmp_batch is unable to connect to the database.

    BUT:

    From frmcmp_batch with an invalid user, password, or database name not existing (resp. not in tnsnames.ora), results in appropriate error messages (not found TNS, refusal to sign etc.).

    With myuser/mypassword@mydb I don' t get this kind of messages.

    sqlplus myuser/mypassword@mydb works.

    myuser can access all objects in the database mydb.

    mydb tnsping works.

    When I check v$ session on mydb while (!) frmcmp_batch is running, I see that it is in fact a db session, created from myuser: DB-User = myuser, terminal = myappsever, osuser = root, remote process = frmcmp_batch.  And State of the current session of the db is ACTIVE.

    As a result, frmcmp_batch fails with error messages that I expect that when there is no connection to the base, if it is connected!

    Any ideas what could be wrong with my setup?

    Help appreciated.

    Jean

    I found the solution. Seems, fmrcmp 11g can connect to, but compiles not on the 9i database. With the help of a Database 11 g resolves the problem :-)

  • ORA-04063: package body 'SYS. DBMS_LOGMNR_INTERNAL"contains errors

    Dear all,

    On my production server database RAC node 2, with 11 GR 2 and Linux is the operating system.

    Last month, I created a new tablespace and set it up as a logminer tablespace by using the command:
    EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE ('TBS_LOGMINER');

    Today morning I accidentally dropped the TBS_LOGMINER tablespace and don't have any backup of the tablespace.

    Now when I recreate the tablespace and run the command:

    EXECUTE DBMS_LOGMNR_D.SET_TABLESPACE ('TBS_LOGMINER');

    It returns the following error:

    ERROR on line 1:
    ORA-04063: package body 'SYS. DBMS_LOGMNR_INTERNAL"contains errors
    ORA-06508: PL/SQL: called program unit is not found:
    * "SYS. DBMS_LOGMNR_INTERNAL. "
    ORA-06512: at "SYS." DBMS_LOGMNR_D', line 135
    ORA-06512: at line 1

    Even when I tun and expdp exp
    For exp ORA-04063: package body 'SYS. DBMS_LOGREP_UTIL"contains errors
    For expdp
    ORA-04063: package body 'SYS. DBMS_INTERNAL_LOGSTDBY"contains errors
    ORA-06508: PL/SQL: called program unit is not found: 'SYS. DBMS_INTERNAL_LOGSTDBY ".
    ORA-06512: at "SYS." "KUPV$ FT", line 991
    ORA-04063: package body 'SYS. DBMS_LOGREP_UTIL"contains errors
    ORA-06508: PL/SQL: called program unit is not found: 'SYS. DBMS_LOGREP_UTIL ".

    I tried to compile objects disabled utlrp.sql running, but it did not help.

    Its my production environment and I doubt that I could have run catalog.sql and catproc.sql that can cause other problems as well.

    Please guide how to pass through this error.

    Kind regards
    Imran
    Its my production environment and I doubt i might have to run catalog.sql and catproc.sql that may cause other problems as well.
    

    Why? You manipulated SYS?
    running catalog.sql and catproc.sql in a normal situation only takes time and nothing else.

    ---------
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • How to change the download folder?

    I use firefox for android and I couldn't change the (default) download folder.It should be added in order to change this setting, I think. THX

  • PalmOne tungsten E2 6.2 download

    I have a Samsung laptop computer, Windows 8.1, i7 processor, I'm trying to sync my Palmone Tungsten E2.  I bought the necessary Kinvio bluetooth USB, download windows drivers, I loaded the disc that came with the Kinvio and loaded that.  Then downloa

  • Laptop of HP Envy 15 ts: limit of volume after upgrade to windows 10

    I have improved the 8.1-10 victory and now I can bearly hear the speakers, so I use headphones remain difficult to hear. so I looked up the good beats icon his party went to all programs cant find beats audio. all levels of video are 99 or 100. Thank

  • using a T-connector to connect 3 USRPs damage devices?

    I think connect 3 USRPs via a connector in t there any risks involved? Must be some special tip, like a pump connector, or it can be any T-connector? Thanks for the help! Filip

  • Design pattern using queues and notifiers and problem with sync

    Hello I'm rearchitecturing a 4-channel data acquisition system which includes data acquisition, indexing of data between four channels, signal processing and recording of data. All processes are placed in a single loop, and I have subdivided by the f