How to select between sequences on different DB links when one DB is down

Hi!
I'm running Oracle 11.1.0.7.0 on HPUX v3 in a Stream replicated environment.
One of the applications would need to connect to both DBs ensuring some consistency across sequences defined locally.
We cannot use odd/even approach in the sequences so that I thought we may take the greatest value of the two sequences (one on each node).
The SQL would look like:
select greatest(user.SEQ_NUMBER.nextval@DB_B,user.SEQ_NUMBER.nextval@DB_A) from dual;
it works fine but only in a sunny day scenario, i.e. when both nodes are up and running. In case of issues with one of the DBs I would get:
ERROR at line 1:
ORA-12541: TNS:no listener
Is there any way to intercept this error and take the value from the local DB ?
Thanks,
Mike

Hi Mike,
Maybe something like this would help you:
  1  create or replace function f1 return number as
  2  lv_stmt varchar2(128);
  3  lv_ret  number;
  4  begin
  5   lv_stmt := 'select 1 from dual@dummy_dblnk';
  6   execute immediate lv_stmt into lv_ret;
  7  exception
  8   when others then
  9    if sqlcode = -2019 then
10      return -1;
11    else
12     raise;
13    end if;
14* end;
SQL> /
Function created.
SQL> save f1 replace
Wrote file f1.sql
SQL> SELECT f1 FROM dual;
        F1
        -1Thanks,
Lukasz

Similar Messages

  • How to select textFrames with tracking different to 0 (zero)?

    How to select textFrames with tracking different to zero (greater or smaller than zero)?
    Thanks.

    Hi All,
    Thanks for your help. The orignal clips are from Sony PMW F3 camera and I have got Dimensions: 1920 × 1080, Codecs: MPEG-2 Video, Linear PCM, Timecode, Color profile: HD (1-1-1), Total bit rate: 36,623.
    The other camera has given me .MTS files which I have converted in MPEG-2 also. I used Wondershare Video Converter to convert second cameras clip.
    I don't think the clips are matching with first camera's clips because still that is saying the same thing.
    Regards,
    Jai

  • How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    How do I merge two different libraries, linked to one account? They're on two different computers but I want them to be on one

    This should do the trick
    Home Sharing Learn More
    http://support.apple.com/kb/HT201976
    Best of Luck

  • How can I enable the ability to create links when editing site text in BC?

    I am about to launch my first BC site for a client. I built the site using Muse. The client needs to update text and pics on their own using BC, which is fine, but when editing text, they are unable to create a link to another page. How can I enable the ability to create links when editing site text in BC? I can apparently do this in this post, but I don't see a way to do this for their site.

    Grid control should be used if you have multiple dbs to manage.
    But if you still want to install dbconsole, you can use dbca as already mentioned. it's much easier to do that using dbca.
    With the manual method, you create the repository via emca -repos create.
    Then you configure it using emca -config dbcontrol db. This will ask for sys passwords, ports setting etc...

  • How to retrieve elements from 3 different xml file in one url

    Hi all,
    Could anyone please let me how can we retrieve elements from 3 different xml file in one url?
    i just can only do it with one file only, any help would very appreciate.
    Thank in advance
    Jim

    Hi Philip
    Thanks for replying me.
    I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
    SELECT
    {[Measures].[Internet Sales Amount] } ON 0,
    NON EMPTY
    {[Customer].[Gender].allmembers } ON 1 -- Used
    FROM
    [Adventure Works]
    WHERE
    [Customer].[Gender].&[M]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].&[XL]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].&[Australia]
    Can you provide alternate ways to get resolved.
    Thanks in advance

  • How do i set up two different ID accounts to one Mac

    I have a Mac book pro and was wondering how you set up two different user ID's to one Mac.
    I have logged out of itunes and set up two different libaries, when I log into one libary and log into Itunes all of my origional music is shown but when I log into the additional user ID and again into Itunes none of my purchases are shown.
    If i go onto my account i have authorised the Mac but in my account it says only one computer is authorised to play / download purchases.
    Any ideas on how to download my origional purchases?

    Move them from one library to the other, or click here and follow the instructions.
    (100046)

  • How to Convert Jquery Tabs To A URL Link When Selected

    The following page has three tabs in the content area. Courier Times, The Intelligencer and Burlington County Times. http://www.phillyburbs.com/test/pbnew/
    When one of the tabs is selected, I want the tab to then become a link to a differnet page. Does anyone know how to write this in jquery?

    Beginning on line 1239 of your HTML code,  change href="http://example.com" to your desired URLs:
    <div style="padding-bottom: 10px; display: block" class="tabsetb" id="alltabs">
    <a id="newNavButtonsPB-01" class="tabb active" rel="tncms-block-130437" href="http://example.com">Bucks County Courier Times</a>
    <a id="newNavButtonsPB-02" class="tabb" rel="tncms-block-130443" href="http://example.com">The Intelligencer</a>
    <a id="newNavButtonsPB-03" class="tabb" rel="tncms-block-130511" href="http://example.com">Burlington County Times</a>
    </div>
    Nancy O.

  • How to require licence from a different serverUrl (not the one in DRMContentData)?

    Hi guys
    I have a special request for requiring the movie licence from a different serverUrl (not the one I get from DRMContentData.serverUrl). I tried DRMManager.setAuthenticationToken with the new url but it didn't work.
    Does anybody know to do it or is it even possible to do it?
    Thanks.

    Hi,
    What is your particular workflow/use-case?
    Unfortunately, the license server's URL is baked into the DRMContentData and cannot be modified once a video has been packaged.  But, if you describe what problem you're attempting to solve, perhaps there is a different workaround.
    cheers,
    /Eric.

  • How to display page no for different master pages in one adobe form application

    Hi All,
    we have requirement where we need to  display page nos in different master pages in one single adobe form.
    For the First form the page nos should be displayed pgno of total pages and for 2nd form the page no shuld be displayed as pgno of total pg.
    so please help me with any script or suggestions for displaying the page no accordingly in different master pages. Your suggestions are greatly appreciated.
    Thanks
    Raja.

    Hi Lingaraj,
    We have 2 different Master pages and 2 Body pages. For the seccond Master page the page no are comming correct like 1 of 3 ,2 of 3 and 3 of 3 but for First master page the page no are comming 0 of 3  in all of the page its not displaying the current page no in 1st master page.
    Screen shots are attached for first master page and Hierarchy Node.Pls see the highlighted section in 2nd image.
    Pls see and suggest me accordingly. Hope this helps are let me know anything u require.

  • How to mark email as "read" on two computers when one computer opens the email?

    Trying to figure out how to set up so when one computer opens an email both computer show it as read.

    You must set them both up to use IMAP.
    The problem may be that your chosen/preferred email provider doesn't offer IMAP.
    https://support.mozilla.org/en-US/kb/switch-pop-imap-account

  • How to stop preview window from automatically getting focus when you move up/down the message list.

    Since updating (my TB was a few versions old) to 31.2, the preview window automatically gets focus when I move up/down the message list. I'm assuming this is a new "feature". Is there a way to shut this off and leave the focus on the message list so I can navigate up/down like before?

    You are referring to the 'Message Pane' which displays selected opened emails below the list of emails. It is not a 'preview'.
    When you select an email by either using mouse to click on an email in the list or using the arrow keys to select emails up and down the list, you are selecting an email to open and read. That is why it is being opened in the Message Pane so that you can read it.
    If you select an email in the list and then cllck anywhere else including in the Message Pane, then you will have moved focus away from the list and the strong highlight on email in list is reduced to paler highlight.
    When you click on an email in the list, the email becomes highlighted, at this point you can use eg: arrow keys to move up and down the list.
    If you are performing single left click on email in list and then do nothing else and the strong highlight auto changes to paler highlight.
    Check you do not have a conflict with an addon by starting Thunderbird in Safe Mode.
    Help > select 'Restart with addons disabled'

  • How to enter invoice with two different tax codes in one line?

    Dear friends,
    I have this PO for which I enter the invoice.
    I recieve later a subsequent debit for this PO from the transporter. This subsequent invoice has got extra debits, one with 21% VAT and one with 19% VAT, which means two items with two different tax codes.
    I want to enter this subsequent debit for each item of the PO, and I want to enter both debits in every item of the PO.
    How can I enter in one row in MIRO a debit with two different tax codes.
    Thank you.

    I want in the same line item to enter two tax codes.
    Do you Know if there is any way to do this?
    It is a subsequent debit and it has two items with two different tax codes. I want to enter the subsequent debit for a PO with many items and enter the value of the whole subsequent invoice. So there is the need to enter one line item with two tax codes.
    How can this be done?
    Thank you?

  • How can I correct for 2 different color temperatures in one image?

    Hi,
    In indoor architectural photography one may encounter mixed color temperatures in one image. If one could use gels and lamps to replace incoming natural daylight and force a uniform color temperature (for instance tungsten) then the problem would go away. Yet, sometimes this is not possible or practical and I was exploring what could be accomplished within Photoshop. Here is my proposal ( or beginning of it):
    shoot RAW
    generate 2 versions of the image, each corrected for one of the color temperatures present (say WB dropper in "should be neutral" area where daylight dominates and another WB dropper in "should be neutral" area where tungsten dominates)
    open them in Photoshop and move one of them as a layer on top of the other version
    Try to blend the two layers
    in one example, I used Hue blending mode and the photo fixed itself!! However this is not generalizable to other images
    I also tried BlendIf for harder images but with no success
    I presume selection is then a must which brings up the question:HOW CAN I SELECT DEPENDING ON COLOR TEMPERATURE? I mean, the layer where WB = daylight looks orange-casted in the areas where the main light source is tungsten, while the layer where WB = tungsten looks blue-casted in the areas lit mainly by sunlight. I must believe there should exist a best approach to select say the blue-casted areas or the orange-casted areas, and that approach should be simple if it somehow takes into consideration the predominant cast. I have tried Select Color Range but not very successfully. I just feel there must be a simpler way, taking advantage of the present casts.
    Masks seem also useful
    All feedback will be greatly appreciated!
    Thanks,
    Juan

    If you want to use multiple keepalives for a service, you must use a script. The alternative would be to create 2 content rules, and 2 sets of services, one for port 80 (or whatever) and one for port 443 (or whatever), and use http for one and ssl for the other.
    Michael Voight
    CSE

  • How can I send to a different URL link than what the text states in Acrobat?

    Hi there
    I know how to create URL links in my document using Acrobat but
    How can I create a link that goes to a different URL desintation other than the one the text states?
    For example
    the text states
    www.aaaaa.com
    and I want it to state this,
    but I want the link to direct to
    www.aaaaa.com/abcdefghijkl
    I dont want to have to create a link object, I want it to stay as text?
    Is this even possible?
    Any advise?
    Thanks

    try67 wrote:
    Actually, it is possible to specify your own tooltip text, if you use a
    button instead of a link.
    You just set the button's action to "Open a weblink" and it will act the
    same as a link, but you'll have more control over how it looks and behaves.
    Hi there
    I cant see the term "Open a weblink". Can you advise please?
    Also then how do you change the "Tooltip text" please?

  • How to assign a class for different colored links

    Hi. I'm new to CSS and HTML and Dreamweaver. I'm trying to
    get links to be different colors within the same page. I have a
    navbar with a CSS style that I've assigned colors to all my links
    there. They work. But if I attempt to change the links in the main
    content it screws up the navbar links.
    So, now, I'm trying to assign the different colors to the
    links in the main content. I have the link color down but I can't
    seem to get the visited, hover, active to work.
    So, I read somewhere you have to assign a class to be able to
    have different colors for your links on the same page. There is a
    class assigned to the links I want to change but it only assigns
    the link color, not the visit,hover,active colors. I don't know
    where I am supposed to put the code so that only the main content
    links are changed. Here is what I came up with from reading and
    studying. Can somebody tell me what's wrong with it and where I am
    supposed to put what in each page? This is just a CSS style page I
    made and I have no idea if I even did that right. Then, I can't
    figure out how to tell each page to include it for that class only.
    Thanks.
    @charset "utf-8";
    /* CSS Document */
    <class="style49"
    <style type="text/css">
    a:link {color: #3333FF}
    a:visited {color: #009900}
    a:hover {color: #6600CC}
    a:active {color: #FF0000}
    </style> </class>

    Pseudo-classes and container styles are what you need - here
    are some
    tutorials.
    http://www.thepattysite.com/linkstyles1.cfm
    http://www.projectseven.com/tutorials/pseudoclasses/index.htm
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Newbie744" <[email protected]> wrote in
    message
    news:fn3***$m6q$[email protected]..
    > Hi. I'm new to CSS and HTML and Dreamweaver. I'm trying
    to get links to
    > be
    > different colors within the same page. I have a navbar
    with a CSS style
    > that
    > I've assigned colors to all my links there. They work.
    But if I attempt
    > to
    > change the links in the main content it screws up the
    navbar links.
    >
    > So, now, I'm trying to assign the different colors to
    the links in the
    > main
    > content. I have the link color down but I can't seem to
    get the visited,
    > hover,
    > active to work.
    >
    > So, I read somewhere you have to assign a class to be
    able to have
    > different
    > colors for your links on the same page. There is a class
    assigned to the
    > links
    > I want to change but it only assigns the link color, not
    the
    > visit,hover,active
    > colors. I don't know where I am supposed to put the code
    so that only
    > the
    > main content links are changed. Here is what I came up
    with from reading
    > and
    > studying. Can somebody tell me what's wrong with it and
    where I am
    > supposed to
    > put what in each page? This is just a CSS style page I
    made and I have no
    > idea
    > if I even did that right. Then, I can't figure out how
    to tell each page
    > to
    > include it for that class only.
    >
    > Thanks.
    >
    > @charset "utf-8";
    > /* CSS Document */
    > <class="style49"
    > <style type="text/css">
    > a:link {color: #3333FF}
    > a:visited {color: #009900}
    > a:hover {color: #6600CC}
    > a:active {color: #FF0000}
    > </style> </class>
    >
    >
    >

Maybe you are looking for

  • How to find where used for PDF forms

    Hello Everyone, I have a small issue. I want to find the where used list for a PDF form SD_INVOICE_FORM01. Just want to see the driver program which is calling this PDF form. Can some one help me in this regard? Quick response would be appriciated. T

  • Panaflo fan question

    i have a xp-90 with a panaflo 92mm fan model FBA09A12M.  This fan does not have rpm reading and it caused problems with my abit av8.   I just ordered a msi neo2 k8n plat nforce3.  Does this mobo have problem with fans that read 0rpm such as not booti

  • Flash on front camera

    what you think about new iphone have flash on front camera, i will be the firts phone have this.. Think about it, iphone 6 with flash on front camera..

  • Dock mail icon problem

    The Mail dock icon always shows there are 7 unread messages in my inbox, when there are none. When there are some, their number is added to 7. This developed after I migrated the contents of my drive to my new computer. How can I get rid of the omnip

  • How to use iMessage better. - Issues

    I want to send a group message and is there a easy way of selecting all the contacts in one go? Why does deleted iMessages on the iPhone reappear on the iPad? It starts downloading all the history all over again? I want it sync only the unread messag