Home » Server Options » Data Guard » ORA-16224: Database Guard is enabled (11g, 11.2.0.3, solaris10)
ORA-16224: Database Guard is enabled [message #605744] Tue, 14 January 2014 03:27 Go to next message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
Dear All,

Guard_status of the database was "standby".
1)Our logical database is having addition one schema which is imported directly here (which is not available in primary side).

2) When user tried to execute the view onto it, below error pop-up -
ORA-00604: error occurred at recursive SQL level 1
ORA-16224: Database Guard is enabled


3) Then I issued the below command -
alter database guard none;


4) By issuing the above command, oracle allowed to do so.

Can you please tell me why it is happened?
since this schema is apart from primary database. Why do it required such privileges?
It should be run through "standby" status.

Please help me out to understand the puzzle.

Regards,
Ishika
Re: ORA-16224: Database Guard is enabled [message #607356 is a reply to message #605744] Wed, 05 February 2014 02:16 Go to previous message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
Dear All,

One schema is created locally on logical side. When we tried to execute and procedure for that particular schema, also getting error "Data Guard is enable".

Here, select is happening from sync tables and through procedure, locally tables are getting update.

Below are the scripts & errors -


create or replace procedure dw_rep.ISHIKA_TEST_PROC(p_from_date date,
                                                        p_to_date   date,
                                                        p_err_code  out number,
                                                        p_err_msg   out varchar2) is

  l_stage    number;
  l_err_msg  varchar2(300);
  L_MONTH    number;
  L_YEAR     number;
  L_MONTH_TO number;
  L_YEAR_TO  number;

begin

  delete from dw_claim_os_details
   where dat_accounting_date between p_from_date and p_to_date;

  l_stage := 1;

  insert into dw_claim_os_details
    (num_claim_no, ----------------1
     num_department_code, --------------2
     num_product_code, ---------------3
     txt_claim_feature, ---------------4
     txt_account_line, ------------------5
     dat_loss_date, ----------------------6
     txt_policy_no_char, -----------------7
     dat_policy_eff_fromdate, --------------8
     txt_servicing_office_cd, -------------9
     txt_claimant_name, -------------------10
     dat_notification_date, -----------------11
     num_treaty_no, ------------------------12
     txt_treaty_type, ----------------------13
     txt_currency_cd, -----------------------14
     cur_clm_os_amt, ------------------------15
     cur_currency_rate, ---------------------16
     cur_amt_in_inr, ------------------------17
     txt_rein_type_cd, -----------------------18
     cur_rein_liab_percnt, -------------------19
     num_uw_year, ----------------------------20
     txt_name_of_insured, --------------------21
     cur_our_share, -------------------------22
     txt_location_description, -------------23
     txt_nature_of_loss, -------------------24
     dat_accounting_date, ---------------------25
     txt_gl_code, ------------------------------26
     txt_clm_os_cumm, -------------------------27
     txt_major_line_cd, -----------------------28
     txt_minor_line_cd, ------------------------29
     txt_class_peril_cd, ---------------------------30
     dat_process_run_date, ---------------------31
     dat_process_run_upto_date, ------------------32
     txt_examiner_id, ----------------------------33
     txt_garage_name, ----------------------------34
     txt_defence_autorney, -------------------------35
     dat_hearing_date, ----------------------------36
     txt_loss_adjuster_name, -----------------------37
     txt_pcg_client_id, -----------------------------38
     txt_customer_clm_no, ----------------------------39
     txt_priority_client_id, --------------------------40
     txt_sar_mlr_no, ----------------------------------41
     txt_clm_category, --------------------------------42
     txt_priority_client, ------------------------------43
     txt_venue, ---------------------------------------44
     txt_litigation_type, -----------------------------45
     txt_injury_type, ----------------------------------46
     dat_petition_date, ---------------------------------47
     txt_registration_no ------------------------------48
     )

    select distinct t.num_claim_no, -------------------------num_claim_no--------1
                    t.num_department_code, -------------------num_department_code---------2
                    t.num_product_code, ------------------------num_product_code-----------3
                    ins.get_child_serial_no(to_number(t.NUM_SERIAL_NO)) txt_claim_feature, --------txt_claim_feature----4
                    j.txt_account_line, -------------------txt_account_line--------------------5
                    t.dat_loss_date, ---------------------------dat_loss_date---------------6
                    u.txt_policy_no_char, ---------------------txt_policy_no_char------------7
                    u.dat_policy_eff_fromdate, ------------------dat_policy_eff_fromdate----------8
                    t.txt_servicing_office_cd, ---------------------txt_servicing_office_cd-----------9
                    t.txt_name_of_insured, --------------------------txt_claimant_name--------------10
                    t.dat_notification_date, ----------------------------dat_notification_date------11
                    r1.NUM_RI_TREATY_ID, -----------------------num_treaty_no------------12
                    r1.TXT_CESSION_TYPE, ----------------------txt_treaty_type-----------13
                    d.param_value, ------------------------------txt_currency_cd--------14
                    sum(j.num_amount), -----------------------------------cur_clm_os_amt------------15
                    1, -------------------------------------cur_currency_rate----------16
                    sum(j.num_amount), -------------------------------------cur_amt_in_inr-----------17
                    r2.num_cession_type_cd, ---------------------txt_rein_type_cd-----------18
                    0, -----------------------------cur_rein_liab_percnt-------------------------19
                    to_number(to_char(u.dat_policy_eff_fromdate, 'YYYY')) num_uw_year, ------num_uw_year---------20
                    t.txt_name_of_insured, -----------------txt_name_of_insured----------------------21
                    nvl(C.SHARE_PCT, 100) SHARE_PCT, ----------------------cur_our_share------------22
                    gl.txt_address_line_1, --------------------------txt_location_description------23
                    substr(CM.TXT_COVER_DESCRIPTION, 1, 100), ----------------txt_nature_of_loss------24
                    j.dat_voucher_date, ----------------------dat_accounting_date---------------------------25
                    j.txt_ledger_account_cd, ------------------------txt_gl_code--------------------------------26
                    sum(j.num_amount), ------------------------txt_clm_os_cumm---------------------------27
                    null, ---------------------------txt_major_line_cd-----------------------28
                    null, ----------------------------txt_minor_line_cd---------------------29
                    null, -----------------------------txt_class_peril_cd------------------30
                    trunc(sysdate), ----------------------dat_process_run_date---------------31
                    p_to_date, ---------------------------dat_process_run_upto_date------------32
                    E.Txt_Info18, --------------------------txt_examiner_id-----------------33
                    F.TXT_INFO2, ----------------------------txt_garage_name----------------34
                    G.Txt_Info6, ------------------------------txt_defence_autorney----------35
                    I.dat_date_of_hearing, -----------------------------dat_hearing_date------------------36
                    H.txt_intermediary_name, -----------------------------txt_loss_adjuster_name-------------37
                    null, -----------------------------txt_pcg_client_id---------------------38
                    t.txt_master_claim_no, -------------txt_customer_clm_no------------------39
                    null, --------------------------------txt_priority_client_id---------------40
                    E.txt_info2, ---------------------------txt_sar_mlr_no----------------------41
                    E.txt_info6, ---------------------------txt_clm_category----------------------42
                    null, -------------------------------------txt_priority_client----------------43
                    I.txt_venue_code, ------------------------txt_venue-------------------------44
                    G.txt_info14, ----------------------------txt_litigation_type---------------45
                    null, -----------------------------------txt_injury_type--------------------46
                    I.dat_date_of_filing_of_petition, -------------dat_petition_date-------------47
                    w.txt_registration_no --------------------txt_registration_no----------------48

      from ins.gc_clm_gen_info      t,
           gen_prop_information_tab u,
           uw_vehicle_dtls          w,

           (select distinct NUM_REFERENCE_NUMBER,
                            NUM_RI_TREATY_ID,
                            TXT_CESSION_TYPE
              from reins.ri_td_reinsurer_transactions l
             where num_ri_treaty_id <> 0
               and l.num_transaction_code in (4, 52)) r1,
           reins.ri_mm_cession_types r2,
           (select c.param_value
              from cnfgtr_parameter_table c
             where c.param_code = 'BASE_CURRENCY') d,
           (SELECT NUM_REFERENCE_NUMBER, SHARE_PCT
              FROM INS.CO_INSURANCE_DETAILS_TAB
             WHERE TXT_COMPANY_SHORT_DESC = 'TATAAIG'
            /*and LEADERNONLEADER='L'*/
            ) C,
           genmst_location gl,
           (select distinct num_cover_code, txt_cover_description
              from covercodemaster) CM,
           (select num_claim_no, txt_info6, txt_info18, txt_info2
              from INS.GC_CLM_GEN_INFO_EXTRA T
             where num_extra_info_type_cd = 2
               and num_update_no =
                   (select max(num_update_no)
                      from INS.gc_clm_gen_info_extra u
                     where t.num_claim_no = u.num_claim_no)) E,
           (select num_claim_no, TXT_INFO2
              from GC_CLM_MOT_ADDITIONAL t
             where NUM_ADDITIONAL_INFO_TYPE_CD = 5
               and num_serial_no =
                   (select max(num_serial_no)
                      from gc_clm_mot_additional u
                     where t.num_claim_no = u.num_claim_no)) F,
           (select f1.num_claim_no,
                   f1.num_update_no,
                   f1.txt_info2,
                   f2.txt_info14,
                   f1.txt_info6
              from GC_CLM_MOT_ADDITIONAL_DTLS F1, GC_CLM_MOT_ADDITIONAL F2
             where f1.num_claim_no = f2.num_claim_no
               and f1.num_update_no = f2.num_update_no
               and f1.num_additional_info_type_cd = 15.1
               and f2.num_additional_info_type_cd = 9
               and f2.num_serial_no =
                   (select max(num_serial_no)
                      from GC_CLM_MOT_ADDITIONAL A
                     where a.num_claim_no = f2.num_claim_no)) G,
           (select num_claim_no, txt_intermediary_name
              from gc_clm_surveyor t
             where t.num_update_no =
                   (select max(num_update_no)
                      from gc_clm_surveyor u
                     where u.num_claim_no = t.num_claim_no)) H,
           (select num_claim_no,
                   dat_date_of_hearing,
                   dat_date_of_filing_of_petition,
                   txt_venue_code,
                   t.num_update_no
              from GC_CLM_TP_PETITION_DTLS t
             where t.num_update_no =
                   (select max(num_update_no)
                      from GC_CLM_TP_PETITION_DTLS u
                     where u.num_claim_no = t.num_claim_no)) I,
           dw_claim_accounting_data J

     where t.num_reference_no = u.num_reference_number
       and w.num_refer_no(+) = u.num_reference_number

       and r1.num_reference_number = t.num_reference_no
       and r2.txt_cession_type = r1.txt_cession_type
       and C.num_reference_number(+) = u.num_reference_number
       and t.num_loss_location_cd = gl.num_location_cd
       and CM.NUM_COVER_CODE = t.num_nature_of_loss

       and E.num_claim_no(+) = t.num_claim_no
       and F.num_claim_no(+) = t.num_claim_no
       and G.num_claim_no(+) = t.num_claim_no
       and H.num_claim_no(+) = t.num_claim_no

       and I.num_claim_no(+) = t.num_claim_no
       and t.num_update_no =
           (select max(num_update_no)
              from gc_clm_gen_info v
             where v.num_claim_no = t.num_claim_no)
       and J.num_claim_no = t.num_claim_no
       --and t.num_claim_no !=30020042139050058001
       and j.dat_voucher_date between p_from_date and p_to_date
     group by t.num_claim_no,
              t.num_department_code,
              t.num_product_code,
              ins.get_child_serial_no(to_number(t.NUM_SERIAL_NO)),
              j.txt_account_line,
              t.dat_loss_date,
              u.txt_policy_no_char,
              u.dat_policy_eff_fromdate,
              t.txt_servicing_office_cd,
              t.txt_name_of_insured,
              t.dat_notification_date,
              r1.num_ri_treaty_id,
              r1.txt_cession_type,
              d.param_value,
              r2.num_cession_type_cd,
              to_number(to_char(u.dat_policy_eff_fromdate, 'YYYY')),
              nvl(C.SHARE_PCT, 100),
              gl.txt_address_line_1,
              substr(CM.TXT_COVER_DESCRIPTION, 1, 100),
              j.dat_voucher_date,
              j.txt_ledger_account_cd,
              trunc(sysdate),
              p_to_date,
              E.txt_info18,
              F.txt_info2,
              G.txt_info6,
              I.dat_date_of_hearing,
              H.txt_intermediary_name,
              t.txt_master_claim_no,
              E.txt_info2,
              E.txt_info6,
              I.txt_venue_code,
              G.txt_info14,
              I.dat_date_of_filing_of_petition,
              w.txt_registration_no;

  -------------------------------monthly--------------------------

  l_stage := 2;

  L_MONTH    := TO_NUMBER(TO_CHAR(P_FROM_DATE, 'MM'));
  L_YEAR     := TO_NUMBER(TO_CHAR(P_FROM_DATE, 'YYYY'));
  L_MONTH_TO := TO_NUMBER(TO_CHAR(P_TO_DATE, 'MM'));
  L_YEAR_TO  := TO_NUMBER(TO_CHAR(P_TO_DATE, 'YYYY'));

  delete from dw_claim_os_details_monthly n
   where n.num_ac_year = L_YEAR
     and n.num_ac_month = L_MONTH;

  loop
    begin

      insert into dw_claim_os_details_monthly
        (num_claim_no, -----------------1
         num_department_code, ---------------------2
         num_product_code, -------------------------3
         txt_claim_feature, ------------------------4
         txt_account_line, --------------------------5
         dat_loss_date, ----------------------------6
         txt_policy_no_char, ----------------------7
         dat_policy_eff_fromdate, -----------------8
         txt_servicing_office_cd, ----------------9
         txt_claimant_name, -----------------------10
         dat_notification_date, -------------------11
         num_treaty_no, --------------------------12
         txt_treaty_type, ---------------------13
         txt_currency_cd, -----------------------14
         cur_clm_os_amt, -------------------------15
         cur_currency_rate, -----------------------16
         cur_amt_in_inr, --------------------------17
         txt_rein_type_cd, -------------------------18
         cur_rein_liab_percnt, ---------------------19
         num_uw_year, -----------------------------20
         txt_name_of_insured, ------------------------21
         cur_our_share, ---------------------22
         txt_location_description, --------------23
         txt_nature_of_loss, ------------------------24
         dat_accounting_date, ------------------------25
         txt_gl_code, -------------------------------26
         txt_clm_os_cumm, -----------------------------27
         txt_major_line_cd, -----------------------------28
         txt_minor_line_cd, ----------------------------29
         txt_class_peril_cd, ----------------------------30
         dat_process_run_date, ----------------------------31
         dat_process_run_upto_date, -------------------------32
         num_ac_year, ---------------------------------------33
         num_ac_month, ---------------------------------------34
         txt_examiner_id, -------------------------------------35
         txt_garage_name, -----------------------------------36
         txt_defence_autorney, --------------------------------37
         dat_hearing_date, ---------------------------------------38
         txt_loss_adjuster_name, --------------------------------39
         txt_pcg_client_id, --------------------------------------40
         txt_customer_clm_no, -----------------------------41
         txt_priority_client_id, --------------------------42
         txt_sar_mlr_no, -------------------------43
         txt_clm_category, -------------------------44
         txt_priority_client, -----------------------45
         txt_venue, ---------------------------------46
         txt_litigation_type, --------------------------47
         txt_injury_type, -------------------------------48
         dat_petition_date, -----------------------------49
         txt_registration_no) --------------------------50
      /*txt_master_claim_no)----------------------------51*/

        select distinct t.num_claim_no, -------------------------num_claim_no--------1
                        t.num_department_code, -------------------num_department_code---------2
                        t.num_product_code, ------------------------num_product_code-----------3
                        ins.get_child_serial_no(to_number(t.NUM_SERIAL_NO)) txt_claim_feature, --------txt_claim_feature----4
                        j.txt_account_line, -------------------txt_account_line--------------------5
                        t.dat_loss_date, ---------------------------dat_loss_date---------------6
                        u.txt_policy_no_char, ---------------------txt_policy_no_char------------7
                        u.dat_policy_eff_fromdate, ------------------dat_policy_eff_fromdate----------8
                        t.txt_servicing_office_cd, ---------------------txt_servicing_office_cd-----------9
                        t.txt_name_of_insured, --------------------------txt_claimant_name--------------10
                        t.dat_notification_date, ----------------------------dat_notification_date------11
                        r1.NUM_RI_TREATY_ID, -----------------------num_treaty_no------------12
                        r1.TXT_CESSION_TYPE, ----------------------txt_treaty_type-----------13
                        d.param_value, ------------------------------txt_currency_cd--------14
                        sum(j.num_amount), -----------------------------------cur_clm_os_amt------------15
                        1, -------------------------------------cur_currency_rate----------16
                        sum(j.num_amount), -------------------------------------cur_amt_in_inr-----------17
                        r2.num_cession_type_cd, ---------------------txt_rein_type_cd-----------18
                        0, -----------------------------cur_rein_liab_percnt-------------------------19
                        to_number(to_char(u.dat_policy_eff_fromdate, 'YYYY')) num_uw_year, ------num_uw_year---------20
                        t.txt_name_of_insured, -----------------txt_name_of_insured----------------------21
                        nvl(C.SHARE_PCT, 100) SHARE_PCT, ----------------------cur_our_share------------22
                        gl.txt_address_line_1, --------------------------txt_location_description------23
                        substr(CM.TXT_COVER_DESCRIPTION, 1, 100), ----------------txt_nature_of_loss------24
                        j.dat_voucher_date, ----------------------dat_accounting_date---------------------------25
                        j.txt_ledger_account_cd, ------------------------txt_gl_code--------------------------------26
                        sum(j.num_amount), ------------------------txt_clm_os_cumm---------------------------27
                        null, ---------------------------txt_major_line_cd-----------------------28
                        null, ----------------------------txt_minor_line_cd---------------------29
                        null, -----------------------------txt_class_peril_cd------------------30
                        trunc(sysdate), ----------------------dat_process_run_date---------------31
                        p_to_date, ---------------------------dat_process_run_upto_date------------32
                        l_year, -------------------------------num_ac_year------------------------33
                        l_month, -------------------------------num_ac_month----------------------34
                        E.Txt_Info18, --------------------------txt_examiner_id-----------------35
                        F.TXT_INFO2, ----------------------------txt_garage_name----------------36
                        G.Txt_Info6, ------------------------------txt_defence_autorney----------37
                        I.dat_date_of_hearing, -----------------------------dat_hearing_date------------------38
                        H.txt_intermediary_name, -----------------------------txt_loss_adjuster_name-------------39
                        null, -----------------------------txt_pcg_client_id---------------------40
                        t.txt_master_claim_no, -------------txt_customer_clm_no------------------41
                        null, --------------------------------txt_priority_client_id---------------42
                        E.txt_info2, ---------------------------txt_sar_mlr_no----------------------43
                        E.txt_info6, ---------------------------txt_clm_category----------------------44
                        null, -------------------------------------txt_priority_client----------------45
                        I.txt_venue_code, ------------------------txt_venue-------------------------46
                        G.txt_info14, ----------------------------txt_litigation_type---------------47
                        null, -----------------------------------txt_injury_type--------------------48
                        I.dat_date_of_filing_of_petition, -------------dat_petition_date-------------49
                        w.txt_registration_no --------------------txt_registration_no----------------50

          from ins.gc_clm_gen_info      t,
               gen_prop_information_tab u,
               uw_vehicle_dtls          w,

               (select distinct NUM_REFERENCE_NUMBER,
                                NUM_RI_TREATY_ID,
                                TXT_CESSION_TYPE
                  from reins.ri_td_reinsurer_transactions l
                 where num_ri_treaty_id <> 0
                   and l.num_transaction_code in (4, 52)) r1,
               reins.ri_mm_cession_types r2,
               (select c.param_value
                  from cnfgtr_parameter_table c
                 where c.param_code = 'BASE_CURRENCY') d,
               (SELECT NUM_REFERENCE_NUMBER, SHARE_PCT
                  FROM INS.CO_INSURANCE_DETAILS_TAB
                 WHERE TXT_COMPANY_SHORT_DESC = 'TATAAIG'
                /*and LEADERNONLEADER='L'*/
                ) C,
               genmst_location gl,
               (select distinct num_cover_code, txt_cover_description
                  from covercodemaster) CM,
               (select num_claim_no, txt_info6, txt_info18, txt_info2
                  from INS.GC_CLM_GEN_INFO_EXTRA T
                 where num_extra_info_type_cd = 2
                   and num_update_no =
                       (select max(num_update_no)
                          from INS.gc_clm_gen_info_extra u
                         where t.num_claim_no = u.num_claim_no)) E,
               (select num_claim_no, TXT_INFO2
                  from GC_CLM_MOT_ADDITIONAL t
                 where NUM_ADDITIONAL_INFO_TYPE_CD = 5
                   and num_serial_no =
                       (select max(num_serial_no)
                          from gc_clm_mot_additional u
                         where t.num_claim_no = u.num_claim_no)) F,
               (select f1.num_claim_no,
                       f1.num_update_no,
                       f1.txt_info2,
                       f2.txt_info14,
                       f1.txt_info6
                  from GC_CLM_MOT_ADDITIONAL_DTLS F1,
                       GC_CLM_MOT_ADDITIONAL      F2
                 where f1.num_claim_no = f2.num_claim_no
                   and f1.num_update_no = f2.num_update_no
                   and f1.num_additional_info_type_cd = 15.1
                   and f2.num_additional_info_type_cd = 9
                   and f2.num_serial_no =
                       (select max(num_serial_no)
                          from GC_CLM_MOT_ADDITIONAL A
                         where a.num_claim_no = f2.num_claim_no)) G,
               (select num_claim_no, txt_intermediary_name
                  from gc_clm_surveyor t
                 where t.num_update_no =
                       (select max(num_update_no)
                          from gc_clm_surveyor u
                         where u.num_claim_no = t.num_claim_no)) H,
               (select num_claim_no,
                       dat_date_of_hearing,
                       dat_date_of_filing_of_petition,
                       txt_venue_code,
                       t.num_update_no
                  from GC_CLM_TP_PETITION_DTLS t
                 where t.num_update_no =
                       (select max(num_update_no)
                          from GC_CLM_TP_PETITION_DTLS u
                         where u.num_claim_no = t.num_claim_no)) I,
               dw_claim_accounting_data J

         where t.num_reference_no = u.num_reference_number
           and w.num_refer_no(+) = u.num_reference_number

           and r1.num_reference_number = t.num_reference_no
           and r2.txt_cession_type = r1.txt_cession_type
           and C.num_reference_number(+) = u.num_reference_number
           and t.num_loss_location_cd = gl.num_location_cd
           and CM.NUM_COVER_CODE = t.num_nature_of_loss

           and E.num_claim_no(+) = t.num_claim_no
           and F.num_claim_no(+) = t.num_claim_no
           and G.num_claim_no(+) = t.num_claim_no
           and H.num_claim_no(+) = t.num_claim_no

           and I.num_claim_no(+) = t.num_claim_no
           and t.num_update_no =
               (select max(num_update_no)
                  from gc_clm_gen_info v
                 where v.num_claim_no = t.num_claim_no)
           and J.num_claim_no = t.num_claim_no
           --and t.num_claim_no != 30020042139050058001
           and TO_NUMBER(TO_CHAR(j.dat_voucher_date, 'MM')) = L_MONTH
           AND TO_NUMBER(TO_CHAR(j.dat_voucher_date, 'YYYY')) = L_YEAR
         group by t.num_claim_no,
                  t.num_department_code,
                  t.num_product_code,
                  ins.get_child_serial_no(to_number(t.NUM_SERIAL_NO)),
                  j.txt_account_line,
                  t.dat_loss_date,
                  u.txt_policy_no_char,
                  u.dat_policy_eff_fromdate,
                  t.txt_servicing_office_cd,
                  t.txt_name_of_insured,
                  t.dat_notification_date,
                  r1.num_ri_treaty_id,
                  r1.txt_cession_type,
                  d.param_value,
                  r2.num_cession_type_cd,
                  to_number(to_char(u.dat_policy_eff_fromdate, 'YYYY')),
                  nvl(C.SHARE_PCT, 100),
                  gl.txt_address_line_1,
                  substr(CM.TXT_COVER_DESCRIPTION, 1, 100),
                  j.dat_voucher_date,
                  j.txt_ledger_account_cd,
                  trunc(sysdate),
                  p_to_date,
                  E.txt_info18,
                  F.txt_info2,
                  G.txt_info6,
                  I.dat_date_of_hearing,
                  H.txt_intermediary_name,
                  t.txt_master_claim_no,
                  E.txt_info2,
                  E.txt_info6,
                  I.txt_venue_code,
                  G.txt_info14,
                  I.dat_date_of_filing_of_petition,
                  w.txt_registration_no,
                  l_year,
                  l_month;

      If l_year = l_year_to and l_month = l_month_to then
        exit;
      Else
        IF L_YEAR = L_YEAR_TO THEN
          L_MONTH := L_MONTH + 1;
        ELSE

          IF L_MONTH = 12 THEN
            L_MONTH := 1;
            L_YEAR  := L_YEAR + 1;
          ELSE
            L_MONTH := L_MONTH + 1;
          END IF;
        END IF;
      end if;

    exception
      when others then
        p_err_code := -1;
        p_err_msg  := 'Error at Stage ' || l_stage ||
                      substr(sqlerrm, 1, 300);

    end;

  end loop;

  p_err_code := 0;
  p_err_msg  := 'SUCESSFUL';

exception
  when others then
    p_err_code := -1;
    l_err_msg  := substr(sqlerrm, 1, 300);
    p_err_msg  := 'Error at Stage ' || l_stage || l_err_msg;

end ISHIKA_TEST_PROC;
/

********************************

begin
  -- Call the procedure
  ISHIKA_TEST_PROC(p_from_date => :p_from_date,
                          p_to_date => :p_to_date,
                          p_err_code => :p_err_code,
                          p_err_msg => :p_err_msg);
end;


p_from_date => 11/16/2013
p_to_date => 2/5/2014
p_err_code => -1
p_err_msg => Error at Stage ORA-16224: Database Guard is enabled


Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 
Connected as dw_rep
 
SQL> alter procedure DW_REP.ashish_test_proc compile;
 
Warning: Procedure altered with compilation errors
 
SQL> sho error;
Errors for PROCEDURE DW_REP.ISHIKA_TEST_PROC:
 
LINE/COL ERROR
-------- --------------------------------------------
175/24   PL/SQL: ORA-16224: Database Guard is enabled
175/5    PL/SQL: SQL Statement ignored
182/24   PL/SQL: ORA-16224: Database Guard is enabled
182/5    PL/SQL: SQL Statement ignored
632/37   PL/SQL: ORA-16224: Database Guard is enabled
577/9    PL/SQL: SQL Statement ignored
722/12   PL/SQL: ORA-16224: Database Guard is enabled
722/5    PL/SQL: SQL Statement ignored
729/17   PL/SQL: ORA-16224: Database Guard is enabled
729/10   PL/SQL: SQL Statement ignored
 


Waiting for your kind response on the same.

Regards,
Ishika
Previous Topic: Dataguard - Role Transition
Next Topic: Is FAL must in Oracle 9204
Goto Forum:
  


Current Time: Thu Mar 28 07:53:39 CDT 2024