<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 23,  comments - 3,  trackbacks - 0
    Hi   TOM,  
      I   have   a   problem   with   ref   cursors.I'll   try   to   explain   it(sorry   if   my   english   is    
      not   very   good).  
      I   have   2   databases   and   i   want   to   return   values   from   one   DBto   the   other.  
      In   the   DB   that   i   want   to   recieve   the   data   i   have   the   call(with   a   procedure)   and      
      i   create   a   variable    
      wich   the   type   is   REF   CURSOR   from   the   second   DB.   In   example:  
      --the   variable    
      vResultCursor   user_DB2.pk_k1.vSqlCursorD@DB2;    
      --where   pk1   is   a   package   in   which   i   declare   the   REF   CURSOR   variable  
      ..  
      --The   call  
      user_DB2.pk_k1.P_1@DB2(vResultCursor);  
      --where   P1   is   the   procedure   in   wich   i   open   the   cursor   and    
      after   that   i   want   to   work   with   this   cursor  
       
      loop            
      --vx   is   varchar2              
                      FETCH   vResultCursor   INTO   vx;  
                            EXIT   WHEN   vResultCursor%NOTFOUND;  
                            insert   into   tbl_probe   values   (sysdate,'vx',vx);              
                          commit;                          
                 
      end   loop;  
      close     vResultCursor;  
       
      In   the   first   DB   i   have   in   PK_K1   the   declaration   of   the   ref   cursor,   and   the    
      procedure   wich   open   the   dinamic  
        cursor:  
      CREATE     OR   REPLACE   PACKAGE   PK_K1   IS    
      TYPE   vSqlCursorD   IS   REF   CURSOR;  
      PROCEDURE   P_RESOLVECURSOR   (vSQLCURSOR   OUT   vSqlCursorD);  
      END   PK_K1;  
       
      CREATE   OR   REPLACE   PACKAGE   BODY   PK_K1   IS  
       
      PROCEDURE   P_RESOLVECURSOR   (vSQLCURSOR   OUT   vSqlCursorD)   IS  
      vSqlCursortxt   VARCHAR2(4096);  
      BEGIN  
      vSqlCursortxt:=   'SELECT   *   FROM   DUAL';  
      OPEN   vSQLCURSOR   FOR   vSqlCursortxt;  
      EXCEPTION  
                        WHEN   OTHERS   THEN  
                                    IF   (vSQLCURSOR%ISOPEN)   THEN  
                                            CLOSE   vSQLCURSOR;  
                                  END   IF;  
      END;    
      END   PK_K1;  
      The   problem   that   i   have   is,   that   if   i   make   a   procedure   in   the   package   PK_K1   and    
      i   call   the   procedure   P_RESOLVECURSOR  
      it   works,   but   when   i   call   from   the   other   DB   it   doesnt   work.   The   error   is   ERROR    
      ORA-01001   when   whe   make   the   FETCH  
      I   gave   the   EXECUTE   grant   from   one   DB   to   the   OTHER  
      GRANT   EXECUTE   ON   PK_K1   TO   USERDB1;  
      could   u   help   me?  
      Thanks    
         
       
       
      Followup:  
       
      ref   cursors   cannot   be   used   over   a   dblink   like   that.  
       
       
      http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm#sthref1448  
       
      ....  
      Note:  
       
              *     Using   a   REF   CURSOR   variable   in   a   server-to-server   RPC   results   in   an    
      error.   However,   a   REF   CURSOR   variable   is   permitted   in   a   server-to-server   RPC   if    
      the   remote   database   is   a   non-Oracle   database   accessed   through   a   Procedural    
      Gateway.  
              *     LOB   parameters   are   not   permitted   in   a   server-to-server   RPC.  
       
      .....    
       
      Passing   a   cursor   from   one   DB   to   the   other     March   23,   2006  
      Reviewer:     Jorge     from   Spain  
       
      Thank   for   the   explanation,   we   solve   the   problem   opening   and   closing   the   cursor    
      in   one   DB   and   passig   the   data   to   the   other   server   in   an   TABLE   Object   by   means   of    
      a   function.  
      Thanks   a   lot     

      ==========================================================
    看來這幾天的努力白費了,氣憤啊
    posted on 2009-03-30 16:58 temper 閱讀(146) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導航:
     
    主站蜘蛛池模板: 亚洲av无码无线在线观看| 91亚洲导航深夜福利| 激情小说亚洲色图| 国产精品色午夜视频免费看| 亚洲日本VA午夜在线电影| 免费H网站在线观看的| 亚洲一卡2卡4卡5卡6卡残暴在线| 亚洲日韩在线第一页| 久久综合久久综合亚洲| 最近最好的中文字幕2019免费| 国产成人免费福利网站| 美女被吸屁股免费网站| 高清国语自产拍免费视频国产| 亚洲国产精品一区第二页 | 免费黄色福利视频| 久久精品国产亚洲av麻豆色欲| 亚洲 欧洲 日韩 综合在线| 日韩激情无码免费毛片| 亚洲va中文字幕无码久久不卡| 色天使亚洲综合在线观看| 女性自慰aⅴ片高清免费| 亚洲最大福利视频| 精品免费久久久久久成人影院| 亚洲AV无码精品色午夜果冻不卡| 亚洲色在线无码国产精品不卡 | 国产中文字幕在线免费观看 | 亚洲成av人片在www鸭子| 蜜臀91精品国产免费观看| 杨幂最新免费特级毛片| 亚洲欧洲∨国产一区二区三区| 亚洲国产精品18久久久久久 | 四虎影视无码永久免费| 亚洲av日韩av天堂影片精品| 免费AA片少妇人AA片直播| 精品一区二区三区无码免费直播| 免费黄色福利视频| 国产成人亚洲午夜电影| 香蕉视频在线观看亚洲| 日韩高清在线高清免费| 在线观看肉片AV网站免费| 亚洲国产精品xo在线观看|