PROCEDURE IS NOT EXECUTED WITH IN THE DATABASE TRIGGER

The follwing databse trigger works fine but the procedure lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price); is not executed
please help
CREATE OR REPLACE TRIGGER SE.LV_SUMMARY_TRADE_TR
AFTER INSERT
ON SE.LV_DAILY_TRADES
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
vstock gn_stocks.stock_code%TYPE;
CURSOR stock_cur
IS
SELECT stock_code
FROM lv_trade_summary
WHERE stock_code = :NEW.stock_code;
BEGIN
OPEN stock_cur;
FETCH stock_cur
INTO vstock;
IF stock_cur%NOTFOUND
THEN
INSERT INTO lv_trade_summary(
     the_time,
     the_date,
     stock_code,
     stock_type_id,
     market_id,
     deals,
     price,
     qty,
     trade_value,
     le_value,
     buying,
     selling,
     rec_count,
     rec_serial,
     buying_count,
     close_price,
     coupon_value,
     currency,
     dividend_yield_perc,
     eps,
     free_stocks,
     hi_offer,
     hi_req,
     hi_req_qty,
     high_date,
     high_price,
     last_offer,
     last_request,
     last_trade_date,
     less_offer,
     less_offer_qty,
     less_request,
     liquid,
     low_date,
     low_price,
     market_cap,
     off_count,
     prev_close,
     prop_avg_ofr_10,
     prop_avg_rqst_10,
     prop_avg_ofr_5,
     prop_avg_rqst_5,
     prop_avg_offers,
     prop_avg_rqst,
     req_count,
     rqst_to_offers,
     sector_desc_a,
     sector_desc_e,
     selling_count,
     simple_avg_ofrs_10,
     simple_avg_rqst_10,
     simple_avg_ofr_5,
     simple_avg_rqst_5,
     simple_avg_offers,
     simple_avg_rqst,
     stock_count,
     stock_desc_a,
     stock_desc_e,
     sum_less_ofr_10,
     sum_less_rqst_10,
     sum_less_5_rqst,
     sum_offer,
     sum_volume_traded,
     trx_count,
     sum_request,
     last_request_qty,
     last_offer_qty )
VALUES (
     :NEW.the_time,
     :NEW.the_date,
     :NEW.stock_code,
     :NEW.stock_type_id,
     :NEW.market_id,
     :NEW.deals,
     :NEW.price,
     :NEW.qty,
     :NEW.trade_value,
     :NEW.le_value,
     :NEW.buying,
     :NEW.selling,
     :NEW.rec_count,
     :NEW.rec_serial,
     lv_calc_pkg.f_buying_count (:NEW.stock_code),
     lv_calc_pkg.f_close_price (:NEW.stock_code),
     lv_calc_pkg.f_coupon_value (:NEW.stock_code),
     lv_calc_pkg.f_currency (:NEW.stock_code),
     lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
     lv_calc_pkg.f_eps (:NEW.stock_code),
     lv_calc_pkg.f_free_stocks (:NEW.stock_code),
     lv_calc_pkg.f_hi_offer (:NEW.stock_code),
     lv_calc_pkg.f_hi_request (:NEW.stock_code),
     lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
     lv_calc_pkg.F_HIGH_DATE (:new.stock_code),
     lv_calc_pkg.F_HIGH_price (:new.stock_code),
     lv_calc_pkg.f_last_offer (:NEW.stock_code),
     lv_calc_pkg.f_last_request (:NEW.stock_code),
     lv_calc_pkg. F_LAST_TRADE_DATE(:new.stock_code),
     lv_calc_pkg.f_less_offer (:NEW.stock_code),
     lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
     lv_calc_pkg.f_less_request (:NEW.stock_code),
     lv_calc_pkg.f_liquid (:NEW.stock_code),
     lv_calc_pkg.f_low_date(:new.stock_code),
     lv_calc_pkg.f_low_price(:new.stock_code),
     lv_calc_pkg.f_market_cap(:new.stock_code),
     lv_calc_pkg.f_off_count (:NEW.stock_code),
     lv_calc_pkg.f_prev_close (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
     lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
     lv_calc_pkg.f_req_count (:NEW.stock_code),
     lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
     lv_calc_pkg.f_sector_desc_a(:new.stock_code),
     lv_calc_pkg.f_sector_desc_e(:new.stock_code),
     lv_calc_pkg.f_selling_count (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
     lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
     lv_calc_pkg.f_stock_count (:NEW.stock_code),
     lv_calc_pkg.f_stock_desc_a(:new.stock_code),
     lv_calc_pkg.f_stock_desc_e(:new.stock_code),
     lv_calc_pkg.f_sum_less_10_offers,
     lv_calc_pkg.f_sum_less_10_rqst,
     lv_calc_pkg.f_sum_less_5_rqst,
     lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
     lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
     lv_calc_pkg.f_trx_count (:NEW.stock_code),
     lv_calc_pkg.f_sum_request (:NEW.stock_code),
     lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
     lv_calc_pkg.f_last_offer_qty (:NEW.stock_code) );
ELSIF stock_cur%FOUND THEN
     UPDATE lv_trade_summary
     SET the_time = :NEW.the_time,
     deals = :NEW.deals,
     price = :NEW.price,
     qty = :NEW.qty,
     trade_value = :NEW.trade_value,
     le_value = :NEW.le_value,
     buying = :NEW.buying,
     selling = :NEW.selling,
     rec_count = :NEW.rec_count,
     rec_serial = :NEW.rec_serial,
     buying_count = lv_calc_pkg.f_buying_count (:NEW.stock_code),
     close_price = lv_calc_pkg.f_close_price (:NEW.stock_code),
     coupon_value = lv_calc_pkg.f_coupon_value (:NEW.stock_code),
     currency = lv_calc_pkg.f_currency (:NEW.stock_code),
     dividend_yield_perc =
     lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
     hi_offer = lv_calc_pkg.f_hi_offer (:NEW.stock_code),
     hi_req = lv_calc_pkg.f_hi_request (:NEW.stock_code),
     hi_req_qty = lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
     last_offer = lv_calc_pkg.f_last_offer (:NEW.stock_code),
     last_request = lv_calc_pkg.f_last_request (:NEW.stock_code),
     last_trade_date = lv_calc_pkg.f_last_trade_date (:NEW.stock_code),
     less_offer = lv_calc_pkg.f_less_offer (:NEW.stock_code),
     less_offer_qty = lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
     less_request = lv_calc_pkg.f_less_request (:NEW.stock_code),
     liquid = lv_calc_pkg.f_liquid (:NEW.stock_code),
     off_count = lv_calc_pkg.f_off_count (:NEW.stock_code),
     prev_close = lv_calc_pkg.f_prev_close (:NEW.stock_code),
     prop_avg_ofr_10 =
     lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
     prop_avg_rqst_10 =
     lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
     prop_avg_ofr_5 =
     lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
     prop_avg_rqst_5 =
     lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
     prop_avg_offers = lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
     prop_avg_rqst = lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
     req_count = lv_calc_pkg.f_req_count (:NEW.stock_code),
     rqst_to_offers = lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
     sector_desc_a = lv_calc_pkg.f_sector_desc_a (:NEW.stock_code),
     sector_desc_e = lv_calc_pkg.f_sector_desc_e (:NEW.stock_code),
     selling_count = lv_calc_pkg.f_selling_count (:NEW.stock_code),
     simple_avg_ofrs_10 =
     lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
     simple_avg_rqst_10 =
     lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
     simple_avg_ofr_5 =
     lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
     simple_avg_rqst_5 =
     lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
     simple_avg_offers =
     lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
     simple_avg_rqst = lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
     stock_count = lv_calc_pkg.f_stock_count (:NEW.stock_code),
     stock_desc_a = lv_calc_pkg.f_stock_desc_a (:NEW.stock_code),
     stock_desc_e = lv_calc_pkg.f_stock_desc_e (:NEW.stock_code),
     sum_less_ofr_10 = lv_calc_pkg.f_sum_less_10_offers,
     sum_less_rqst_10 = lv_calc_pkg.f_sum_less_10_rqst,
     sum_less_5_rqst = lv_calc_pkg.f_sum_less_5_rqst,
     sum_offer = lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
     sum_volume_traded =
     lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
     trx_count = lv_calc_pkg.f_trx_count (:NEW.stock_code),
     sum_request = lv_calc_pkg.f_sum_request (:NEW.stock_code),
     last_request_qty = lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
     last_offer_qty = lv_calc_pkg.f_last_offer_qty (:NEW.stock_code)
     WHERE stock_code = :NEW.stock_code;
END IF;
lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price);
CLOSE stock_cur;
END;

Well, you can use merge statement or exception :
CREATE OR REPLACE TRIGGER SE.LV_SUMMARY_TRADE_TR
AFTER INSERT
ON SE.LV_DAILY_TRADES
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
     BEGIN
          UPDATE lv_trade_summary
          SET the_time = :NEW.the_time,
          deals = :NEW.deals,
          price = :NEW.price,
          qty = :NEW.qty,
          trade_value = :NEW.trade_value,
          le_value = :NEW.le_value,
          buying = :NEW.buying,
          selling = :NEW.selling,
          rec_count = :NEW.rec_count,
          rec_serial = :NEW.rec_serial,
          buying_count = lv_calc_pkg.f_buying_count (:NEW.stock_code),
          close_price = lv_calc_pkg.f_close_price (:NEW.stock_code),
          coupon_value = lv_calc_pkg.f_coupon_value (:NEW.stock_code),
          currency = lv_calc_pkg.f_currency (:NEW.stock_code),
          dividend_yield_perc =
          lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
          hi_offer = lv_calc_pkg.f_hi_offer (:NEW.stock_code),
          hi_req = lv_calc_pkg.f_hi_request (:NEW.stock_code),
          hi_req_qty = lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
          last_offer = lv_calc_pkg.f_last_offer (:NEW.stock_code),
          last_request = lv_calc_pkg.f_last_request (:NEW.stock_code),
          last_trade_date = lv_calc_pkg.f_last_trade_date (:NEW.stock_code),
          less_offer = lv_calc_pkg.f_less_offer (:NEW.stock_code),
          less_offer_qty = lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
          less_request = lv_calc_pkg.f_less_request (:NEW.stock_code),
          liquid = lv_calc_pkg.f_liquid (:NEW.stock_code),
          off_count = lv_calc_pkg.f_off_count (:NEW.stock_code),
          prev_close = lv_calc_pkg.f_prev_close (:NEW.stock_code),
          prop_avg_ofr_10 =
          lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
          prop_avg_rqst_10 =
          lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
          prop_avg_ofr_5 =
          lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
          prop_avg_rqst_5 =
          lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
          prop_avg_offers = lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
          prop_avg_rqst = lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
          req_count = lv_calc_pkg.f_req_count (:NEW.stock_code),
          rqst_to_offers = lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
          sector_desc_a = lv_calc_pkg.f_sector_desc_a (:NEW.stock_code),
          sector_desc_e = lv_calc_pkg.f_sector_desc_e (:NEW.stock_code),
          selling_count = lv_calc_pkg.f_selling_count (:NEW.stock_code),
          simple_avg_ofrs_10 =
          lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
          simple_avg_rqst_10 =
          lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
          simple_avg_ofr_5 =
          lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
          simple_avg_rqst_5 =
          lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
          simple_avg_offers =
          lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
          simple_avg_rqst = lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
          stock_count = lv_calc_pkg.f_stock_count (:NEW.stock_code),
          stock_desc_a = lv_calc_pkg.f_stock_desc_a (:NEW.stock_code),
          stock_desc_e = lv_calc_pkg.f_stock_desc_e (:NEW.stock_code),
          sum_less_ofr_10 = lv_calc_pkg.f_sum_less_10_offers,
          sum_less_rqst_10 = lv_calc_pkg.f_sum_less_10_rqst,
          sum_less_5_rqst = lv_calc_pkg.f_sum_less_5_rqst,
          sum_offer = lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
          sum_volume_traded =
          lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
          trx_count = lv_calc_pkg.f_trx_count (:NEW.stock_code),
          sum_request = lv_calc_pkg.f_sum_request (:NEW.stock_code),
          last_request_qty = lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
          last_offer_qty = lv_calc_pkg.f_last_offer_qty (:NEW.stock_code)
          WHERE stock_code = :NEW.stock_code;
     EXCEPTION WHEN OTHERS THEN
          INSERT INTO lv_trade_summary(
          the_time,
          the_date,
          stock_code,
          stock_type_id,
          market_id,
          deals,
          price,
          qty,
          trade_value,
          le_value,
          buying,
          selling,
          rec_count,
          rec_serial,
          buying_count,
          close_price,
          coupon_value,
          currency,
          dividend_yield_perc,
          eps,
          free_stocks,
          hi_offer,
          hi_req,
          hi_req_qty,
          high_date,
          high_price,
          last_offer,
          last_request,
          last_trade_date,
          less_offer,
          less_offer_qty,
          less_request,
          liquid,
          low_date,
          low_price,
          market_cap,
          off_count,
          prev_close,
          prop_avg_ofr_10,
          prop_avg_rqst_10,
          prop_avg_ofr_5,
          prop_avg_rqst_5,
          prop_avg_offers,
          prop_avg_rqst,
          req_count,
          rqst_to_offers,
          sector_desc_a,
          sector_desc_e,
          selling_count,
          simple_avg_ofrs_10,
          simple_avg_rqst_10,
          simple_avg_ofr_5,
          simple_avg_rqst_5,
          simple_avg_offers,
          simple_avg_rqst,
          stock_count,
          stock_desc_a,
          stock_desc_e,
          sum_less_ofr_10,
          sum_less_rqst_10,
          sum_less_5_rqst,
          sum_offer,
          sum_volume_traded,
          trx_count,
          sum_request,
          last_request_qty,
          last_offer_qty )
          VALUES (
          :NEW.the_time,
          :NEW.the_date,
          :NEW.stock_code,
          :NEW.stock_type_id,
          :NEW.market_id,
          :NEW.deals,
          :NEW.price,
          :NEW.qty,
          :NEW.trade_value,
          :NEW.le_value,
          :NEW.buying,
          :NEW.selling,
          :NEW.rec_count,
          :NEW.rec_serial,
          lv_calc_pkg.f_buying_count (:NEW.stock_code),
          lv_calc_pkg.f_close_price (:NEW.stock_code),
          lv_calc_pkg.f_coupon_value (:NEW.stock_code),
          lv_calc_pkg.f_currency (:NEW.stock_code),
          lv_calc_pkg.f_dividend_yield_perc (:NEW.stock_code),
          lv_calc_pkg.f_eps (:NEW.stock_code),
          lv_calc_pkg.f_free_stocks (:NEW.stock_code),
          lv_calc_pkg.f_hi_offer (:NEW.stock_code),
          lv_calc_pkg.f_hi_request (:NEW.stock_code),
          lv_calc_pkg.f_hi_request_qty (:NEW.stock_code),
          lv_calc_pkg.F_HIGH_DATE (:new.stock_code),
          lv_calc_pkg.F_HIGH_price (:new.stock_code),
          lv_calc_pkg.f_last_offer (:NEW.stock_code),
          lv_calc_pkg.f_last_request (:NEW.stock_code),
          lv_calc_pkg. F_LAST_TRADE_DATE(:new.stock_code),
          lv_calc_pkg.f_less_offer (:NEW.stock_code),
          lv_calc_pkg.f_less_offer_qty (:NEW.stock_code),
          lv_calc_pkg.f_less_request (:NEW.stock_code),
          lv_calc_pkg.f_liquid (:NEW.stock_code),
          lv_calc_pkg.f_low_date(:new.stock_code),
          lv_calc_pkg.f_low_price(:new.stock_code),
          lv_calc_pkg.f_market_cap(:new.stock_code),
          lv_calc_pkg.f_off_count (:NEW.stock_code),
          lv_calc_pkg.f_prev_close (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_best_10_ofrs (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_best_10_rqst (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_best_5_ofrs (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_best_5_rqst (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_offers (:NEW.stock_code),
          lv_calc_pkg.f_prop_avg_rqst (:NEW.stock_code),
          lv_calc_pkg.f_req_count (:NEW.stock_code),
          lv_calc_pkg.f_rqst_to_offers (:NEW.stock_code),
          lv_calc_pkg.f_sector_desc_a(:new.stock_code),
          lv_calc_pkg.f_sector_desc_e(:new.stock_code),
          lv_calc_pkg.f_selling_count (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_best_10_ofrs (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_best_10_rqst (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_best_5_ofrs (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_best_5_rqst (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_offers (:NEW.stock_code),
          lv_calc_pkg.f_simple_avg_rqst (:NEW.stock_code),
          lv_calc_pkg.f_stock_count (:NEW.stock_code),
          lv_calc_pkg.f_stock_desc_a(:new.stock_code),
          lv_calc_pkg.f_stock_desc_e(:new.stock_code),
          lv_calc_pkg.f_sum_less_10_offers,
          lv_calc_pkg.f_sum_less_10_rqst,
          lv_calc_pkg.f_sum_less_5_rqst,
          lv_calc_pkg.f_sum_offerst (:NEW.stock_code),
          lv_calc_pkg.f_sum_volume_traded (:NEW.stock_code),
          lv_calc_pkg.f_trx_count (:NEW.stock_code),
          lv_calc_pkg.f_sum_request (:NEW.stock_code),
          lv_calc_pkg.f_last_request_qty (:NEW.stock_code),
          lv_calc_pkg.f_last_offer_qty (:NEW.stock_code) );
     END;
     lv_calc_pkg.p_orders_executed(:new.stock_code,:new.selling,:new.buying,:new.qty,:new.price);
END;
/Nicolas.

Similar Messages

  • Procedure Transformation not executing with a Mapping

    I have a mapping that uses a number of procedure and function transformations.
    Basically the flow is as follows source data from an external table, push into a funtion transformation for validation output from this is feed into a splitter.
    Where validation fails flow from splitter is pushed into another function transformation and output from that get pushed into an error table.
    Where validation passes output flow from splitter combined with flow from a procedure transformation is pushed into a target table.
    The issue is where validation passes it appears not be execute the procedure - hence appropriate values to the target table is null, executing this procedure in SQLPLUS works fine.
    The strange thing is where validation fails the data flows nicely to the error table.
    Is there an issue in using procedure transformations in this way?
    Thanks in advance for any help.
    Message was edited by:
    kayvic01

    Hi,
    The flow looks ok...when the validation passes the output attributes from the splitter outgroup are not properly taken in by the procedure. Since u have executed the procedure seperately you will manually give the IN attributes for the procedure...check whether ur manual IN for the procedure matches with the outgroup from the splitter. Generate an internediate script and check...it will give you the solution,
    Regards
    Bharath

  • Pl/sql Procedure is Not Creating With the CLOB data Type

    Hi,
    I am Using Oracle 10g Express Edition Release2.... My Doubt is While creating a table With CLOB Data Type the table is created successfully,but while Creating a Procedure With the CLOB Data type i am getting an Error Message
    2667/5 PL/SQL: Statement ignored
    2667/24 PLS-00382: expression is of wrong type
    then i tried With the Varchar2(30000) the Procedure is Created Successfully note i have not changed any thing in my code except the data type.
    I am Just Confused ......Why the Procedure is not Created with CLOB Data type?
    Please advice ...
    Thank U
    SHAN

    hi,
    Thanks for reply....Another Example
    CREATE TABLE USER_MAS (USER_ID     VARCHAR2 (20 Byte),MAIL_ID     VARCHAR2 (255 Byte));
    set serveroutput on
    declare
    atable varchar2(64) := 'USER_MAS';
    acolumn varchar2(64) := 'MAIL_ID';
    avalue varchar2(64) := 'NEWYORK' ;
    dyn_sql clob;
    begin
    dyn_sql := 'update '||atable||' set '||acolumn||' = '''||avalue|| '''' ;
    dbms_output.put_line(dyn_sql);
    execute immediate dyn_sql;
    end;
    commit ;
    Error at line 2
    ORA-06550: line 9, column 23:
    PLS-00382: expression is of wrong type
    ORA-06550: line 9, column 5:
    PL/SQL: Statement ignored
    When i Changed the Data type to varchar2(64)
    update USER_MAS set MAIL_ID = 'NEWYORK'
    PL/SQL procedure successfully completed.
    Commit complete.
    I like to Know the Reason Why the Procedure is Not Created in Oracle 10g XE DB
    Note :the Same Script i used in 11g DB the Procedure is Created Successfully....
    Why you need use CLOB or VARCHAR2 in your temp_num variable as you sending parameters as number?
    In the Procedure we are create some run time queries while executing the procedure. There are around 10 run time queries created.
    The size of each query is more than 4000 characters . We then add all the queries using union all after each query  to the clob variable as the normal varchar will not support.
    Please Advice
    Thank U
    SHAN

  • Lync 2013 Error - Certificate could not be published in the database associated with User Services Cluster

    Hi Lync gurus,
    I have a weird issue:
    Just installed a Lync Standard 2013. 
    Everything works except I keep getting this error in Log: every 30 minute or so.
    First an Error:  Event 47067
    A server did not respond to HTTP request
    Server lyncserver.domain.local did not respond to HTTP request PublishCertRequest targeted at
    https://lyncserver.domain.local:444/LiveServer/UserPinService.
    Cause: Server might be down or the network path between servers might not be properly configured.
    Resolution:
    Please ensure that the server can be connected on the target port using telnet and then re-try.
    Then I get a Warning: Event 47068
    GetAndPublish web service failed.
    Certificate could not be published in the database associated with User Services Cluster [lyncserver.domain.local ]. Request Details - Entity: [[email protected]], Device Id: [6BB30A3E-2923-553A-8E5F-0B2FB2CEA330], Authenticated User: [sip:[email protected]].
    Additional Context: [Publish_Failure: OtherFailure;HttpNoResponse:"lyncserver.domain.local "]
    Cause: This could be due to network connectivity issues with the remote server, or because the database is down.
    Resolution:
    Please ensure that the user services is reachable and the database is up and running.
    Thanks for any help

    Please check you can telnet port 443 and port 444 on Lync Front End Serve from client.
    Try to regenerate a new certificate for Lync Front End Server.
    Check all the services on Lync Front End Server are started.
    Check the option “Enable all purposes for this certificate” is checked for the trusted root CA certificate.
    For the detailed steps:
    Run MMC--Add\Remove Snap-ins--certificates--Local Computer--Trusted Root Certificate Authorities--Certificates, find the Root CA certificate you installed--Properties--General, check the "Enable all purposes for this certificate".
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I can not stop or start the Database logged with sidadm

    Hello !!
    I migrated ECC6 SAP / MaxDB 7.6.00.35 Windows 2003 Server to Windows 2008 Server. But now when I perform a login with sidadm, can not stop or start the database in dbmcli.
    Just with Administrator can stop or start the database.
    Error After  db_offline :
    Err -24994, ERR_RTE: Runtime enviroment error 1, could not create comm. Shared memory [5]
    sdbverify ok :
    SAP Utilities 7.6.00.35 64 bit in d:/sapdb/
    check files... ok
    check dependencies... ok
    package data is consistent
    DB Analyzer 7.6.00.35 64 bit in d:/sapdb/pr
    check files... ok
    check dependencies... ok
    package data is consistent
    db_enum
    OK
    P01     D:\sapdb\P01\db                         7.6.00.35       fast    running
    P01     D:\sapdb\P01\db                         7.6.00.35       quick   offline
    P01     D:\sapdb\P01\db                         7.6.00.35       slow    offline
    P01     D:\sapdb\P01\db                         7.6.00.35       test    offline
    Anyone have any ideas or know of any problem with windows 2008?
    tks

    Hello,
    -> Please check, if the solution of  SAP Note No. 688028 will help you with reported issue
    -> I also recommend to update the MAXDB, the version is quite old and there many fixes done in the new release patches of 7.6.
    Regards, Natalia Khlopina

  • I am not able to shutdown the database by using stopsap

    Dear all,
    As mentioned in the subject "I am not able to shutdown the database by using stopsap". I am getting the following errors:
    exec(): 0509-036 Cannot load program oracle<SID> because of the following errors:
            0509-150   Dependent module libjox9.a(shr.o) could not be loaded.      
            0509-022 Cannot load module libjox9.a(shr.o).                          
            0509-026 System error: A file or directory in the path name does not exist
    R3 is terminated correctly by using the command stopsap and also I am able to shutdown the database normally by using the SQL command.
    Thanks for your cooperation.
    Maher

    Thank you Nick for your care.
    I will test start/stop manually later; because the system is active and used by the users for testing purpose (not production).
    Yes, LIBPATH is the same for both users.
    The ownership/permisssion for the both files is
    -rwxr-xr-x   1 <SID>adm   sapsys    stopdb
    -rwxr-xr-x   1 <SID>adm   sapsys    startdb
    I compared with production, it seems ok.
    I started DBCheck by using the transaction DB13 and also it failed due to same errors.
    Job started
    Step 001 started (program RSDBAJOB, variant &0000000000272, user name ****)
    No application server found on database host
    Execute logical command BRCONNECT On host *******
    Parameters: -u / -c -f check
    BR801I BRCONNECT 6.20 (113)
    exec(): 0509-036 Cannot load program oracle<SID>because of the following errors:
    #0509-150   Dependent module libjox9.a(shr.o) could not be loaded.
    #0509-022 Cannot load module libjox9.a(shr.o).
    #0509-026 System error: A file or directory in the path name does not exist.
    BR805I Start of BRCONNECT processing: cdnybrme.chk 2004-08-11 08.27.04
    exec(): 0509-036 Cannot load program oracle<SID> because of the following errors:
    #0509-150   Dependent module libjox9.a(shr.o) could not be loaded.
    #0509-022 Cannot load module libjox9.a(shr.o).
    #0509-026 System error: A file or directory in the path name does not exist.
    BR280I Time stamp 2004-08-11 08.27.07
    BR301E SQL error -12547 at location db_connect-2
    ORA-12547: TNS:lost contact
    BR310E Connect to database instance <SID> failed
    exec(): 0509-036 Cannot load program oracle<SID> because of the following errors:
    #0509-150   Dependent module libjox9.a(shr.o) could not be loaded.
    #0509-022 Cannot load module libjox9.a(shr.o).
    #0509-026 System error: A file or directory in the path name does not exist.
    BR280I Time stamp 2004-08-11 08.27.07
    BR301E SQL error -12547 at location thr_db_connect-4
    ORA-12547: TNS:lost contact
    BR310E Connect to database instance <SID> failed
    BR806I End of BRCONNECT processing: cdnybrme.chk 2004-08-11 08.27.07
    BR280I Time stamp 2004-08-11 08.27.07
    BR804I BRCONNECT terminated with errors
    External program terminated with exit code 3
    BRCONNECT returned error status E
    Job finished
    Do you think that we need to rebuild the Oracle Software ?
    Thank in advance for your cooperation.
    Maher.
    Message was edited by: Maher M.

  • Error - Exclusive access could not be obtained because the database is in use

    I am actually trying to make a script (in Sql Server 2008) to restore one database from one backup file. I made the following code and I am getting an error -
    Msg 3101, Level 16, State 1, Line 3
    Exclusive access could not be obtained because
    the database is in use.
    Msg 3013, Level 16, State 1, Line 3
    RESTORE DATABASE is terminating abnormally.
    How do I fix this problem ?
    IF DB_ID('AdventureWorksDW') IS NOT NULL
    BEGIN
    RESTORE DATABASE [AdventureWorksDW]
    FILE = N'AdventureWorksDW_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\Backup\AdventureWorksDW.bak'
    WITH FILE = 1,
    MOVE N'AdventureWorksDW_Data'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW.mdf',
    MOVE N'AdventureWorksDW_Log'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW_0.LDF',
    NOUNLOAD, STATS = 10
    END

    Check, if there are existing connections to the database you are restoring by following command
    select spid from sys.sysprocesses where dbid = db_id('AdventureWorksDW')
    if you see any existing connections then kill them by issuing KILL command Syntax for kill is
    KILL <SPID>
    once you see there are no more connections then 
    Use mastergoIF DB_ID('AdventureWorksDW') IS NOT NULL
    BEGIN
    RESTORE DATABASE [AdventureWorksDW]
    FILE = N'AdventureWorksDW_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\Backup\AdventureWorksDW.bak'
    WITH FILE = 1,
    MOVE N'AdventureWorksDW_Data'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW.mdf',
    MOVE N'AdventureWorksDW_Log'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW_0.LDF',
    NOUNLOAD, STATS = 10
    END
    Mark as answer, if it works.

  • Not able to access the Database & Clusterware from OEM Console.

    hi,
    I had installed Oracle RAC 11g R2 in RHEL 5.3 Operating environment. I had installed my Oracle RAC with Enterprise Manager Console.
    Its with the defailt port 1158. After the installation when i try to access my EM Console, i was not able to access the Database and Clusterware from EM Console.
    When i access the EM console with url, I found with Startup and Perform Recovery option. But whereas my database is already startup and running.
    So when i click startup its saying database is already started. Since it is a prodution environment i dont want to go with Perform recovery option.
    Please tell me hw to attach files in this thread so that i can send the snap shot of the console for your reference.
    with regards
    A.Aravind
    Edited by: 795847 on Sep 21, 2010 10:40 PM

    hi,
    As mentioned due to not having the default listener port 1521, we are facing this problem.
    As meniotned i had changed the emoms.properties file and changed the port and my emctl page is opening.
    But am not able to access the other parameters like ASM, Servers, Clusters etc bcoz since in some file it is looking for 1521 default port.
    So is it better to go for emctl deconfig and config again or to change the port the files which required.
    If i do in what are the file the default port will be located related to emctl.
    with regards
    A.Aravind

  • The server principal "XYuser" is not able to access the database "Ydb" under the current security context

    SQL2005 on winserver 2003. I have a view in Xdb that accesses tables in 2 different databases (Xdb and Ydb) on the same server. I have mixed mode security. I have a SQL user (XYuser) that has read access to all tables and views on both databases, yet when I try to access the view using a C# windows application I get the following error:
    The server principal "XYuser" is not able to access the database "Ydb" under the current security context
    This same scenario works under SQL 2000. I looked through the postings and tried to set TRUSTWORTHY ON on both databases but that didn't help. I can access any other views or tables on the SQL 2005 server, just not the one that joins the tables cross databases. Any help is much appreciated... john

    This appears to be a Login/Database Mapping issue.  I was having this problem, but was able to resolve it as follows:
    Using the SQL Server management Studio:
    In the Object explorer, under the SERVER security folder (not the database security folder), expand Logins. 
    That is: ServerName -> Security -> Logins
    NOT: ServerName -> Databases -> DatabaseName -> Security -> Users
    Select the Login that is having the troubles.  Right click on the Login and select ‘Properties.’
    The ‘User Mapping’ page should list all databases on the server with a check mark on the databases that the Login has been mapped to.  When I was getting the error, the database in question was not checked (even though the Login was assigned as a User on the database itself).  Map the Login by checking the box next to the database name.  Set the default schema.  Then select the roles for the Login in the Database role membership list box.  I selected db_datareader and public.  After clicking OK to save the changes, the problem was resolved.
    In order to ‘Map’ the Login, the Login must not already be as User on the database, so you may have to go to the database security (ServerName -> Databases -> DatabaseName -> Security -> Users) and delete the Login from the list of database Users before mapping the Login to the database.

  • How to create  a procedure to send a mail if the Database is down?

    Hi,
    I have created the below procedure to send a mail if the count is less than 1300. It scheduled daily @ 15 30 hrs. Its fine.
    CREATE OR REPLACE procedure SCOTT.hrsmail
    is
    v_count number;
    begin
    Select count(*) into v_count from emp;
    if v_count < 1300
    then
    UTL_MAIL.send(sender => '[email protected]',
    recipients => '[email protected]',
    cc => '[email protected]',
    bcc => '[email protected]',
    subject => 'Testing the UTL_MAIL Package',
    message => 'If you get this, UTL_MAIL package
    else
    null; --what you want to do here
    end if ;
    end;
    Sometime the Database is down, so the job is not running.
    How to create a procedure to send a mail if the database is down?
    Pls help me. Its highly appreciated.
    Thanks
    Nihar

    nihar wrote:
    How to create a procedure to send a mail if the database is down?And what if the database is up, but the network down? Or the database up and mail server down? Or mail server undergoing maintenance?
    There are loads of "+What if's+" - and in that respect, playing "+What if database is down..+" in this case does not make any sense. You do not use the database to monitor its own up/down status. You do not rely just on SMTP as notification protocol that the database is down.
    The correct approach would be using something like SNMP as the monitoring protocol. A monitoring system that can process SNMP and perform some basic root cause analysis (e.g. network to the database server down, database server status unknown). And this system supporting notification methods like SMTP, SMS and so on.

  • Problem with Opening the Database

    Dear All,
    I am learning myself Backup And Recovery.
    I messed up with Redo Log files and now the database is not opening.
    What actually I did is
    1) I got 2 redo log groups with I member file in each group.
    Group 1 (redo1) & Group 2(redo 2)
    2) Then I shutdown the database "Shutdown Normal"
    3) Then I removed the one redo log files. (redo 1) "rm redo1"
    4) Now I tried to open the database. It didnot opened as redo 1 is not available
    5) Now I Added one group 3 when the database is in mount mode (alter database add logfile group 3 ...)
    6) Now when I tried to drop the redo log file, I am getting the below error
    ORA-01623 log 1 is current log for instance orcl (thread 1) - cannot drop.
    7) So Now I am not able to open the database
    Can Anyone please help me out.
    Appreciate any help
    Thanks & Regards
    Madhu K

    Madhu,
    Can you try recreating the controlfile ? All it does is resets the redologs (reinitializes them). There wont be any dataloss. You can open the database using "alter database open resetlogs" after you recreate the controlfile.
    Have you looked into the backup and recovery case scenarios. They covered loss of redologs also.
    Since you are learning by yourself, i hope you are following Official Oracle guides. They are your bible when you practice things for the first time.
    http://www.oracle.com/pls/db102/portal.portal_db?selected=4 => Backup and Recovery Section => Backup and Recovery Basics and Backup and Recovery Advanced User's Guide
    -Srinivas

  • Forms 6i is not connecting with Oracle 11g database?

    Forms 6i is not connecting with Oracle 11g database?
    How to resolve this issue?

    Hi,
    Once you installed the Forms and Reports, you need to configure the paramters like tnsnames.ora in you path.
    There will be one folder in the Installation path of Forms and Reports search for tnsnames.ora file..and you need to Updated the file as per the which ORACLE Server you are connecting and then try.. it..
    Default path for forms will be "ORACLE_HOME/net80/admin".. search for tnsnames.ora and modify it..
    - Pavan Kumar N

  • I have ipod classic 5gen it will not sync with windows the error message says ipod can not sync as required file missing   wht to do???

    i have ipod classic 5gen it will not sync with windows the error message says ipod can not sync as required file missing   wht to do???

    Although you used the new USB 3.0 port, the actual connection speed is still USB2.0, as the iPod Dock connector, does not have the 10 times faster USB3.0 signal pins, the connection speed is still 480Mbits/s
    I assumed that you have tried the other USB 2.0 port to no success..
    Can you do the iPod Disk diagnostic as posted earlier by tt2, it wont fix your problem, but helps in troubleshooting.
    Have a nice day!

  • Itunes store does not display with in the itunes player, why?

    I have latest iTunes download. I have PC with Windows Vista. My system requirements are what they should be for the iTunes player. I have gone through all of the troubleshooting that i am willing to go through to make this work - Can someone !! Tell me why does the iTunes store NOT DISPLAY with in the iTunes Player?
    I click on the iTunes Store from the iTunes player...center screen with in the player shows that its "Accessing iTunes Store" when its finishes - the screen remains blank! and stays like that...
    Again why does the iTunes store not display with in iTunes?
    Also , my Safari acts the same why...i open the browser and the Screen just sits there never finding, opening, or access anything from the web...YES I am connected to the internet? SO why does Safari sit there...

    http://support.microsoft.com/kb/972034
    This worked for me.
    Reset HOSTS File back to defaults

  • SQL Server 2005 Database Mail - Mail configuration information could not be read from the database.

    I'm trying to setup Database Mail and send a test message, but it's not working.
    I've done several step-by-steps and all and I can't get it to work. Also checked several posts in this forum but none helped. I think it used to work before (2 months ago) but we had to turn it off.
    I've enabled it in Surface Configuration, have tried recreating all profiles, restarted SQL Agent, checked version mismatch...
    I check the Database Mail and I get the following message:
    Log Database Mail (Database Mail Log)
    Log ID 152
    Process ID 7684
    Last Modified 3/14/2013 6:49:58 PM
    Last Modified By SPEEDLING\sqlservice
    Message
    1) Exception Information
    ===================
    Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
    Message: Mail configuration information could not be read from the database.
    Data: System.Collections.ListDictionaryInternal
    TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.Account GetAccount(Int32)
    HelpLink: NULL
    Source: DatabaseMailEngine
    StackTrace Information
    ===================
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)
       at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
       at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
       at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
    2) Exception Information
    ===================
    Exception Type: System.IndexOutOfRangeException
    Message: timeout
    Data: System.Collections.ListDictionaryInternal
    TargetSite: Int32 GetOrdinal(System.String)
    HelpLink: NULL
    Source: System.Data
    StackTrace Information
    ===================
       at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
       at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
       at System.Data.SqlClient.SqlDataReader.get_Item(String name)
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)

    I'm trying to setup Database Mail and send a test message, but it's not working.
    I've done several step-by-steps and all and I can't get it to work. Also checked several posts in this forum but none helped. I think it used to work before (2 months ago) but we had to turn it off.
    I've enabled it in Surface Configuration, have tried recreating all profiles, restarted SQL Agent, checked version mismatch...
    I check the Database Mail and I get the following message:
    Log
    Database Mail (Database Mail Log)
    Log ID
    152
    Process ID
    7684
    Last Modified
    3/14/2013 6:49:58 PM
    Last Modified By
    SPEEDLING\sqlservice
    Message
    1) Exception Information
    ===================
    Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
    Message: Mail configuration information could not be read from the database.
    Data: System.Collections.ListDictionaryInternal
    TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.Account GetAccount(Int32)
    HelpLink: NULL
    Source: DatabaseMailEngine
    StackTrace Information
    ===================
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)
       at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession
    dbSession)
       at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
       at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
    2) Exception Information
    ===================
    Exception Type: System.IndexOutOfRangeException
    Message: timeout
    Data: System.Collections.ListDictionaryInternal
    TargetSite: Int32 GetOrdinal(System.String)
    HelpLink: NULL
    Source: System.Data
    StackTrace Information
    ===================
       at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
       at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
       at System.Data.SqlClient.SqlDataReader.get_Item(String name)
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetAccount(Int32 accountID)

Maybe you are looking for

  • How to download a file from memory

    Hi, has anybody an idea how to make a file (that is generated in a bean) available via plain download-link? i'm currently using command links as there needs to be some action performed before (generating/getting file from backend). however if i right

  • Using Data Provider

    Hi, I am using Data Provider. Below are the pararmeters I am passing to it, oms:dataSource <parameter>mslv/oms/oms1/internal/jdbc/DataSource</parameter> DefaultValue=Xquery oms:sql <parameter>select name from employee where job=?</parameter> DefaultV

  • Make customer field appear in item overview in RFQ

    Dear SAP gurus, We have requirement to add fields for RFQ. We are using enhancement MM06E005 and code our field, but we just realize that the fields only appear in the item detail, while we expect that the field also appear in the item overview. (In

  • Highlands Cable Group (Highlands, NC 28741) Not Listed in WMC

    In Highlands, NC 28741, there are two cable companies: Northland Cable and Highlands Cable Group. When I put the zip code into WMC, Highlands Cable Group is not listed as a choice. How do I get the Zap2It data to show up in WMC?

  • Memory Nokia 7100 supernova

    can Nokia 7100 supernova upgrade memory ? It's memory 4 MB is too small ! Solved! Go to Solution.