Procedure performance over db link

In our source database, we are having one procedure that inserts data from one view and is inserting it into the another table.
When we are running the procedure on this source system itself, it is getting executed in 3-4 mins
Issue is coming when we are executing the procedure across database link.
exec proc@source
Plan is getting changed and is taking huge time. Are we hitting some bug or we have to stalablise the plan by addding hints is the only solution.
Database version is 10.2.0.5
Best Regards

864411 wrote:
In our source database, we are having one procedure that inserts data from one view and is inserting it into the another table.
When we are running the procedure on this source system itself, it is getting executed in 3-4 mins
Issue is coming when we are executing the procedure across database link.
WHY across dblink?
>
>
exec proc@source
Plan is getting changed and is taking huge time. Doctor, it hurts when I poke myself in the eye.
How can I get the pain to stop?
So stop poking yourself in the eye!

Similar Messages

  • Execute procedure over db link

    I am trying to execute a stored procedure over database link and I get the following error
    DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER@DBCS(
    ERROR at line 12:
    ORA-06550: line 12, column 2:
    PLS-00306: wrong number or types of arguments in call to 'SET_UPDATE_CONFLICT_HA
    NDLER'
    ORA-06550: line 12, column 2:
    PL/SQL: Statement ignored
    However when I execute the same peice of code by logging on to the server the code executes successfully. "DBCS" is the database link name.
    CODE which I am executing over DB LINK
    DECLARE
    COL_NAME DBMS_UTILITY.NAME_ARRAY;
    CURSOR C1 IS
    SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE OWNER='SCOTT' AND TABLE_NAME='DEPT';
    BEGIN
    OPEN C1;
    FETCH C1 BULK COLLECT INTO COL_NAME;
    CLOSE c1;
    DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER@DBCS(
    OBJECT_NAME => 'SCOTT.DEPT',
    METHOD_NAME => 'OVERWRITE',
    RESOLUTION_COLUMN => COL_NAME(1),
    COLUMN_LIST => COL_NAME);
    END;
    CODE without DB LINK (executed this on db where db link is pointing too.
    DECLARE
    COL_NAME DBMS_UTILITY.NAME_ARRAY;
    CURSOR C1 IS
    SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE OWNER='SCOTT' AND TABLE_NAME='DEPT';
    BEGIN
    OPEN C1;
    FETCH C1 BULK COLLECT INTO COL_NAME;
    CLOSE c1;
    DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(
    OBJECT_NAME => 'SCOTT.DEPT',
    METHOD_NAME => 'OVERWRITE',
    RESOLUTION_COLUMN => COL_NAME(1),
    COLUMN_LIST => COL_NAME);
    END;
    Please guide.

    orausern wrote:
    Hi,
    We are on Oracle 11.2.0.2 on Solaris 10. I have two databases on this version of Oracle. From one db I have execute a stored procedure via db link to another database. The store procedure has dynamic sqls (execute immediate) and it uses commit statement as part of the code. Is it alllowed to execute this procedure over db link? I am not aware on the implications on stored proc execution over db link and will be thankful for help.
    Thanks,if no error is thrown, why are you looking for problems where none exist?

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Can we create pl/sql code over database link?

    Hi All,
    We are using Oracle 9i database.
    I want to know if we can create or modify pl/sql code (procedue, package, etc) over the database link? That means - can we create a procedure in remote database using the db link?
    Thanks,
    Dnyanesh

    yes, I can connect to the remote database directly and create/modify the packages.
    But I want the users not to create them using the db link.
    Is there any way to create the pl/sql package over database link?
    Thanks,
    Dnyanesh

  • Creating Views over DB links

    I have a requirement to create views in 3 different versions of Oracle 8i, 9i and 10g. All the views will be created over DB links and the source tables reside in an Oracle 10g instance. Other than the performance is anybody aware of any other issues with this approach?
    Thanks
    Martin

    Again, though, you're going to need to be more specific about the database releases...
    Database links between 10.2 and 8.1.7 are supported.
    Database links between 10.2 and 9.2 require that the 9.2 end be on 9.2.0.4 or later
    Database links between 10.1 and 8.1.7 require that the 8.1.7 end be on 8.1.7.4 or later
    Database links between 10.1 and 9.2 are supported
    You'll want to review the Client/Server Interoperability Matrix on Metalink to get more detailed information on what is and is not supported.
    Justin

  • Report over database link error

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

    Good morning all.
    I have a database link LINKA from USERA on LOCALSERVER to USERB on REMOTESERVER.
    (create database link LINKA connect to USERB identified by mypassword using validtns)
    In USERC on REMOTESERVER I have a TABLEX, with grant all on TABLEX to USERB on REMOTESERVER.
    In USERB on REMOTESERVER I have a view TABLEXV, select * from USERC.TABLEX
    From USERA on LOCALSERVER I can select * from TABLEXV@LINKA. In fact I can insert/update/delete tablexv from USERA.
    I also have a view TABLEXV on USERA, select * from TABLEXV@LINKA. I can also select/insert/update/delete from USERA.TABLEXV.
    So far so good - all working as expected.
    Then, my APEX app on LOCALSERVER, interactive report, parsing schema USERA, querying TABLEXV, I get the following:
    when "Exclude Link Column", I get the error "The requested URL /pls/apex/f was not found on server.
    when "Link to Single Row View", report displays correctly.
    when "Link to Custom Target", I get the error "The requested URL /pls/apex/f was not found on server.
    When I run the select * from TABLEXV as a regular report (i.e. not interactive), I also get the error.
    So the only time I get the report displayed correctly is using IR and "Link to Single Row View".
    However, clicking on the link (for Single Row View) I get "The requested URL /pls/apex/wwv_flow.show was not found on this server.".
    To summarize:
    - accessing table via view over database link
    - works outside of apex without issue
    - inside only works when Link to Single Row View set
    - But clicking on link fails
    I could live with just having the Link to Singe Row View option if I could disable displaying of the icon so that the user cant click on it.
    APEX 3.2.00.27
    EE Database - 10.2.0.3 (yes I know out of support)
    Remote EE Database - 10.2.0.5
    Real object names replaced to protect the innocent!
    Anyone got any clues?
    I have used remote tables many times in my APEX applications and never had this issue.
    Thanks,
    Rob @ very confused .com

  • Mouse-over a link

    when i mouse-over a link, i can see where that link brings me in the lower left corner. but when i enable the search (shift+f), the links are in the lower RIGHT corner. why? its really embarassing for example on facebook, because the chat windows can be found at the lower right corner, right where are these "links". can i change it some way? thanks in advance!

    You can use this extension to change that behavior:
    * Status-4-Evar: https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/

  • Mouse over HTML link causes single frame to display at top of page Netscape only

    Having a wierd problem. When you run the mouse over HTML
    links on the page a single frame of the flash movie apears at the
    top center of the page. It only happens in netscape in firefox
    mode. IE, Opera, and Firefox do not have the problem.
    Problem site
    Thanks in Advance,
    Vorsch

    The problem goes away if i modify my .css file by removing
    the
    border: 1px solid #999999;
    line from the "a:hover" style.
    I ran my css file thru the validator at w3c and its fine. The
    Page also validates as xhtml transitional.
    and just a note the same file version is on my public server
    and my testing server.
    Has anyone ever seen this before?? I have several sites with
    a:hover effects and flass media and have never run across this
    before.

  • In WebHelp, when I mouse over a link, the font size changes.

    Either after I generate to WebHelp or View in RoboHelp, when I mouse over a hyperlink text, the font changes from large to small text. My step is a 11pt font, my body text is 10pt. It appears the 11 pt. font switches to 10pt font when I mouse over it. Any way to fix this?
    Also noticed that when I have a note at 9 pt, and mouse over a link, the text changes to 10pt.
    So now it appears in most of my topics with links within a step or note. In a body, the text appears fine (or stays the same) when you mouse over a link.

    Not believing that either.
    You should be able to edit your CSS in a text editor. If you are not sure what to do, set up a simple project using your CSS. Any text will do and create a link.
    See the Contact page on my site and follow the instructions there.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Calling a procedure from a dynamic link

    I have the following situation-
    I have a report created using SQL Query.
    I need to call a Stored Procedure(move_to_portal) through a link from one of the fields in the report (Exec_id field of the report).
    How can I do this?
    The links do not allow me to choose a stored procedure as the Target component....so maybe I have to create a dynamic link.
    How to do this? Any help would be appreciated.

    I have just another question-
    I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
    The following is my code....
    SELECT re.report_exec_id, re.exec_userid,
    NVL(re.batch_exec_date, re.begin_date) report_date,
    re.rows_returned,
    re.status, re.error,
    f_file_url(re.filename) file_url,
    re.comments,
    ''Archive''archive
    FROM metadev.report_execution re, metadev.report r
    WHERE re.report_id = r.report_id
    AND r.spec_number = :v_spec
    AND re.status <> 'DELETED'
    AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
    ORDER BY begin_date DESC
    The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
    IT GIVES AN ERROR....
    Do you guys know where I am going wrong...

  • I want to know how to get the web addresses to go away that appear in the bottom left corner of the browser every time my mouse goes over a link

    Any time that my mouse goes over a link on a web page a little box in the bottom left corner of the browser pops up showing the web address for that link and it is really annoying, especially when i am on facebook because there are so many links on the home page i cant move my mouse anywhere without that box popping up and blocking part of my conversations. I was wondering if there was any way to turn this off. I've checked through the options and to my knowledge there is no way to turn it off. Just wondered if anyone else has had this problem or knew if there was a way to get that box to go away.

    Another option would be to use the following extension to push those messages into the status bar. It could be a convenient way to have your messages visible when you want them, but with less distraction.
    https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    If you try it, let us know what you think.

  • How do I turn on and turn off the pop-up that displays the true URL when I hover over the link?

    I would like to know how to set Firefox so it displays the true URL of a link when I hover my mouse over that link.

    It's been many moons since I've used a Fireberd, since I'm no longer with the phone company, but if memory serves, that can be turned of directly with a fireberd command. You might check the manual for that. If so, then all you need is a simple "send GPIB" command from Labview
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • My link preview has disappeared from the bottom left of the page (it no longer pops up when I hover over a link.) Thoughts on how to get it back? I really LIKE having it!

    My link preview has disappeared from the bottom left of the page (it no longer pops up when I hover over a link.) Thoughts on how to get it back? I really LIKE having it!

    It is possible that the screen is too high and that the scroll bar and the find bar and add-on bar fall off at the bottom.
    If that works then close Firefox (File > Exit/Quit) to save that setting.
    See also:
    * http://kb.mozillazine.org/Resizing_oversize_window
    If the above didn't help then see:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf

  • Mouse cursor appearing as an arrow instead of a hand over album links

    Hi. I've just published my iWeb 08 site on .Mac (using Zone Edit to set up the CNAME for my personal domain, purchased from Last Digital). For some reason, when I hover over the links in the My Albums page, the mouse cursor appears as an arrow instead of the usual hand cursor. This has already confused a few of my testers, as obviously people are conditioned to expect a link where they see a hand. The links themselves work fine, it's just that the mouse cursor makes it look like they're not links. Does anyone know how this can be fixed so that the hand appears when you hover over each image? You can see the page in question here - http://www.paulinelockie.com/Pauline_Lockie/Portfolio/Portfolio.html

    That's the way it is.
    When you have multiple images in an album, and move the pointer over the album, you see the images displayed.
    Since it is not really a link, a pointer is used instead of the hand. It's a design decision.
    Send a feedback to the iWeb team.

  • When I used to move my cursor over a link, it would display the address, that disappeared, how do I get it back on?

    When I used to move the cursor over a link, it would display the address of the link in the lower left hand corner before I clicked on it. This has disappeared, how do I turn it back on?
    == This happened ==
    Not sure how often
    == A few months ago

    View > Statusbar

Maybe you are looking for

  • How to view movies As List on iPhone like in iTunes?

    Can iPhone act like iTunes when scrolling through my movies? in iTunes: Movies > View > As List (shows the movies as coverflow, and then below, as a scrollable list) but, in iPhone: Movies > View > As List is greyed out. I am accumulating a lot of mo

  • Is there a way to embed a file into a mailto function within DPS?

    I'd like to attach a pdf or an image when someone clicks a mailto button or link. Could someone provide an example of one that works?

  • Save as .pdf  in Photoshop CS5 - serious font issues.

    Hello. It may not be directly about Acrobat, but since it's a PDF issue maybe someone here will be able to help. I'm having serious issues with fonts while saving as .pdf from Ps. No matter what pdf settins I use, the fonts result messed up one way o

  • Home Hub 3 and iPhone 4 - Problems

    Hi all, Firstly appologies for a double post, I posted in the infinity section in error when here's probably better, so if mods see it they can remove that one, unless someone answers! Anyways, Just upgraded to infinity and have the home hub 3 after

  • Mac OS X Version 10.6.8 Apple tv icon in task bar missing ?

    Hi, I have mid 2009 Mac Book Pro Mac OS X Version 10.6.8 build 10K549 fully updated as reported by OS update utility in the 'About Mac' option. The Apple tv is running fine with iTunes and other apple devices but there is no apple tv icon in taskbar