Dbms Advisor - Segment Advisor Task over db links

Good morning to everybody, i'm wondering why if is it possible to execute dbms advisor (segment advisor) task from a database to others one with PL SQL. My problem is that i have 13 Databases on different Servers and i have 13 db links. Now i have to call dmbs_advisor package from the first database on these 13 different databases and put the advisor returned data to the first one. I'm looked for the solution on internet but nobody solved this. Is there a way to achieve this goal?
Thanks in advance,
cheers
Alberto
Edited by: user1631132 on 21-feb-2012 1.42
Edited by: user1631132 on 21-feb-2012 1.46

It is complex when you are doing it from database.
Try it from back-end using OS commands with SQLPLUS.
Spool the output in 13 different files to categorise the output by instances.
Assuming , you have a procedure or anonymous block of code in an SQL file for Segment advice.
Shell$ sqlplus -s user/password@instance1 @<sqlfile.sql>
Shell$ sqlplus -s user/password@instance2 @<sqlfile.sql>
Shell$ sqlplus -s user/password@instance3 @<sqlfile.sql>
Shell$ sqlplus -s user/password@instance4 @<sqlfile.sql>
Shell$ sqlplus -s user/password@instance5 @<sqlfile.sql>
Shell$ sqlplus -s user/password@instance13 @<sqlfile.sql>
Note: You must have the TNS configurations set up on the database for all instances from where you are executing SQLPLUS
Edited by: Susil Kumar Nagarajan on Feb 22, 2012 1:31 AM

Similar Messages

  • How to check SQL Tuning Advisor task is exist or not

    How to check SQL Tuning Advisor task is exist or not using DBMS_SQLTUNE,
    I want to remove SQL Tuning Advisor task only if it is exist using DBMS_SQLTUNE.DROP_TUNING_TASK function

    Two approaches.
    1. Look up in DBA/USER_ADVISOR_TASKS, if it exists, drop it.
    2. Drop it, ignore the exception
    3. Drop it, catch the exception (specific exception if you want to rightly avoid such constructs as when others then null) obviously within an inner block is you want to catch and then move on to do other work.
    SQL> declare
      2   e_no_such_task exception;
      3   pragma exception_init(e_no_such_task,-13605);
      4   procedure forgetaboutit
      5   as
      6   begin
      7      null;
      8   end;
      9  begin
    10     begin
    11       dbms_sqltune.drop_tuning_task('NON_EXISTENT_TASK');
    12     exception
    13          when e_no_such_task then
    14               forgetaboutit;
    15     end;
    16     -- do something else
    17     null;
    18  end;
    19  /
    PL/SQL procedure successfully completed.
    SQL> P.S. Ignore procedure forgetaboutit - just amusing myself...

  • 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 ;)

  • 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

  • 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

  • Safari, when I hover over a link, doesn't show the web address, +Hotmail qu

    Hi, two questions.
    New to safari, when I hover over a link it doesn't display the web address, is there a way to turn this on or is it not available in Safari.
    In regard to Hotmail, is there a way to synch up Hotmail with Mail in leopard so that when I click an email address it allows me to send via hotmail.
    If not, how do you find out the email address, because when I click it, just takes me to mail and doesn't allow me to at least view what the email address is, so I can manually send it via Hotmail.
    Thanks for your time.

    New to safari, when I hover over a link it doesn't display the web address, is there a way to turn this on or is it not available in Safari.
    Choose Show Status Bar from the View menu.
    In regard to Hotmail, is there a way to synch up Hotmail with Mail in leopard so that when I click an email address it allows me to send via hotmail.
    Try using httpmail.
    (36670)

  • How do i change or hide the dialogue box that pops when i mouse over a link?

    i'm using adobe acrobat standard.
    i'm editing a document and adding links into the PDF to my website.
    i prefer only to show the "hand/pointer" when you mouse over the link.
    is there a way to:
    a. hide the dialogue that pops up when you mouse over a link?
    b. is there a way change the dialogue that pops up when you mouse over a link (e.g. Click Here versus the actual URL).
    Much thanks,
    KK

    Moving the discussion to Creating, Editing & Exporting PDFs forum.
    Thanks,
    Atul Saini

Maybe you are looking for