Weird DB Link Behaviour

I have encountered a problem whereby Oracle considers that a user's session is distributed. This means that when a rollback occurs, they get an ORA-02055 error. Initially, my form was doing a select on a view which referenced a DB Link. This code was causing the problem, so I changed it to a call to a server-side procedure using an autonomous transaction to attempt to insulate the form from the DB Link. This partially solved the problem, but not entirely.
Now, when I exit the form, even if I have done a commit within it, the transaction is considered by Oracle to be distributed. (I am checking this by querying SYS.V$RESOURCE_LIMIT). The only workaround seems to be to do another commit in the calling form on returning.
Anyone got any idea what is going on here?
Chris

From my experience using DB links within a forms application, you need to be aware of 2 things:
1)You should only be referencing the linked data from the database. In other words place your links in DB packages or procudures in the DB that your form can access. You should not be calling your links directly from the form. The main reason is that forms pl/sql and the DB pl/sql engines are different.
2) Anytime a link is accessed it opens a db link to the linked DB and creates a session on the linked DB. This link must be explicetly closed. To do this the session on the linked DB must be either commited or rolled back. Then close your link. See below server side package code example. It would be this code that your form would call. If your form needs to interact with the dataset returned by the link then you will need to write additional code to return the dataset from the DB package to your form (function).
DECLARE
lt_return_table Package.table_spec@DB_link;
BEGIN
BEGIN
--| |
--| | RETRIEVE Linked DATA
--| |
package.some_query@DB_link(lt_return_table, var1, var2, var3);
--commit and close the link.
COMMIT;
Package.CLOSE_DB_LINK;
EXCEPTION
WHEN OTHERS THEN
--rollback and close the link.
ROLLBACK;
Package.CLOSE_DB_LINK;
END;
END;
Hope this helps
Pete

Similar Messages

  • Address Book - Weird text field behaviour

    In Address Book when I try to edit any text field weird things happen.
    When I start typing all the previous characters are repeated with each keystroke - for example typing "Thomas" would become TThThoThomThomaThomas". Pressing the backspace, delete or the ESC key repeats only the keystrokes made, i.e. "Thomas" would be added to the end of "TThThoThomThomaThomas".
    If I click into another field and start typing it still remembers all the previous keystrokes and puts all of them in front of the key I just pressed.
    Additionally, nothing can be typed in the notes field.
    I've tried deleting:
    ~/Library/Preferences/com.apple.AddressBook.abd.plist
    ~/Library/Preferences/com.apple.AddressBook.plist
    but that doesn't fix it.
    Anything in ~/Library/Application Support/Address Book be the problem?
    When I log in a a guest user this behaviour is not present.

    It's good that you tried this on a different account. That suggests that the problem exists somewhere in your user account directory. I don't think anything in ~/Library/Application Support/AddressBook/ would cause this. Do you have any input managers installed? These might be in ~/Library/Input Managers/ or something like that. I've never installed one myself, so I am not certain where they are. I think if you find one, you can just remove it from that folder by dragging it out, and then restarting Address Book might solve the issue.

  • X131e - weird browser tabs behaviour

    Hello all. Took delivery of an X131e a few days ago. OVer the past few days I have noticed an intermittent issue with the behaviour of tabs in both Explorer and the latest version of Firefox I installed. Essentially, what happens is that every time I click on a link it opens in a new browser window. This didn't happen to start with and it goes back to normal after I restart Windows. This 'fault' seems to start up randomly. It happens in both Explorer and Firefox (so does not appear to be a browser-specific setting).
    I am aware that some links are specifically set to open in a new tab/browser window by the page's designer, but this is every single link, even just Google search results. Select a link with left button above track pad and link opens in a new tab. Extremely frustrating. Restart computer, run exactly the same search and clicking the link works as it should. a day or two later and the tabbing thing has started again.
    Machine is running Windows 7 Home Premium. I don't shut it down when I have finished with it; I just close the lid.
    Can anybody suggest what might be causing it and how I might prevent it?
    Solved!
    Go to Solution.

    Hi there,
    From what I'm gathering, it's almost like you're clicking the link and even though you're not pressing Ctrl, a new tab opens like it would if you were holding that key, is that a correct assessment of the situation?
    If so, have you checked Sticky Keys in Control Panel?
    Ed
    Was this or another post on the forum helpful? Click the star on the left side of the screen to give kudos! Did someone solve a problem you encountered? Mark it as "solution provided" to help others with the same problem.

  • Weird window decoration behaviour

    Has anyone else experienced windows, particularly in Finder, though sometimes in Safari, that appear to be only "semi" active as in the screenshot linked below?
    http://dl.dropbox.com/u/2459380/weird.png

    Try selecting one of the Devices or Places in the Sidebar on the left.
    If that doesn't help, go to ~/Library/Preferences and move the com.apple.finder.plist file to the Trash.
    ~ (Tilde) represents your Home Folder.
    Restart your Mac.

  • Slow database link behaviour

    I've written an accouting program 15 years ago that runs on developer, with excellent performance overall. Now I'm trying to write an apex program that uses a database link to access the data on a 10.1.0.3.0 SE database. Two things are happening: 1) every once in a while, when I navigate on a view in an XE report (the usual "next 15 records" option,) apex asks if I want to "save" the file (f.bin) and then it gets real slow! Too slow for commercial use... I mean, it takes minutes to move between pages. 2) every two pages that I navigate, it gets really, really slow! It goes from the first page to the next fast; fast again; and then sloooow; fast, fast and then slow; fast, fast, and then: save the page. It is driving me nuts. I've tried using a 10g SE table@, I've tried using a 10g SE view@, and I've tried using an XE view on a 10g SE table - but I am having the same results... However, if I write an XE table, based on a 10g SE view, and do not use the database link, keeping everything local (using only the XE) - it gets very fast, and the strange behavour ends! I wanted to use a database link because it would be easier, much simpler to write the program, and very dynamic. If a have to transfer data between databases it will be much harder to do it.
    Any ideas? Has anyone come across such behaviour? Do you believe it could be a bad installation? By the way, the 10g SE runs on RHES4 and the XE runs on debian; I'am using apex 2.0. Thanks.

    An update on the problem: I've decided to go with the whole XE solution, and I wrote another application, that works just fine! It's normal, I mean, fast! That is, until I transfer data between databases - then it gets real slow until the user logs out. Interesting, isn't it? Later on I'll try the other way around, connecting to SE and transfering the data from XE. I am using something like:
    insert into table@dblink select * from table; delete from table;
    insert into table select * from table@dblink; delete from table@dblink;

  • Weird OT font behaviour in InDesign and Illustrator

    Hi font experts.
    I've been directed here by someone at the InDesign forum, who thought you might be able to help.
    Can anyone explain what's happening here?
    I've loaded an OT version of Zapf Dingbats into Suitcase Fusion on my Mac Pro and it seems just fine. Font Doctor says its OK. Suitcase Fusion says its OK. The font characters display correctly in Fusion.
    I can use both the TT and OT versions of the font in Mail and Word. Both versions print OK, too.
    But when I apply the OT font in Adobe InDesign or Illustrator, all I get to see is boxes with a cross through them and that "missing font" pinkish hue.
    No other OT fonts pose this problem. And deleting the TrueType font of Zapf Dingbats makes no difference so it's not a duplicates problem.
    As a result of the above I've temporarily ditched Fusion today to try out FontExplorer (which I like). Comparing the two fonts in there, I can see that there are lots of "missing" characters in the OT version if I select "Show missing characters", but none in the TT version. Not sure if that's relevant.
    Also, each character in the OT version has a lot more information, including Character Code, Unicode, Glyph ID, HTML and Keystroke, whereas the TT version simply has the Glyph ID. Don't know if that's relevant either. Incidentally, the keystroke doesn't work in InDesign or Illustrator.
    Thanks for any suggestions or solutions to this annoying issue. It seems very weird but maybe there's a simple explanation. Cheers.

    Dang! It was so obvious. The OT version has the symbols in the correct place in the glyph palette. The letters and numbers that I used to type to get the bullets and scissors are empty characters in OT. Thanks to Carl over at Extensis for enlightening me. Boy was I being dim.

  • Weird Image Processor Behaviour

    The image processor has started acting really weird a couple of hours ago. I have been trying to figure the problem out since then, but to no avail. It all started when I tried to run batch processor from the Bridge with a really simple action that is just meant to save the images as a TIFF. This has worked before and I did not change the setup in any way. But this time many of the images just stayed open in Photoshop. They were neither saved nor closed - others were, though. I played around with the settings, repaired permissions, deleted cache files, etc. Then at one point, when I ran the image processor again, it suddenly started to open random raw files! These files are on the same hard drive as the .psd files I was trying to convert, but they are not even nearly in the same directory. In fact, these happened to be really old pictures that I hadn't seen in a while. That scared me. Also I am at the end of my wits. The only thing left to do would be to uninstall and then reinstall Photoshop, I guess. But that would mean, that I would have to go through all the settings again, import my actions, keyboard shortcuts, etc. I'd like to avoid that if possible.
    I am using Photoshop CS 5.0.1 on an iMac running MacOS 10.5.8.

    You mention Image Processor and Batch, which are two different things – which did you employ?
    Could you post a screenshot of the Actions Panel with that specific Action clicked open just to make sure which steps are included?
    And have you tried trashing prefs (after making sure your presets are saved)?

  • Very weird af:forEach behaviour

    I've got a page with a table in it and some filter code so the user can specify a string and only rows that have that string in any of several fields will be displayed. To refine the search, it can be repeated with another word which gets added to any that are already in there. Behind it is an ArrayList in a backing bean containing the individual search terms. The ArrayList gets passed to a method in an application module which builds a predicate out of them all and calls .setWhereClause on the relevant VO. This all works OK.
    Then to indicate that the displayed list is filtered, I want an af:showDetail at the top which summarises the filter that's been applied and lets the user expand it to see the list of search terms. Something like this;
    <af:panelBox rendered="#{backing_UserManagement_UserManagement.resultsFiltered}"
    width="100%">
    <af:panelTip>
    <af:showDetail disclosed="false">
    <af:panelList binding="#{backing_UserManagement_UserManagement.filterList}">
    <af:forEach items="#{backing_UserManagement_UserManagement.criteria}"
    var="thisSearchCriterium">
    <af:outputText value="Username or real names contain '#{thisSearchCriterium}'"/>
    </af:forEach>
    </af:panelList>
    <f:facet name="prompt">
    <af:outputText value="#{backing_UserManagement_UserManagement.filterSummary}"/>
    </f:facet>
    </af:showDetail>
    </af:panelTip>
    </af:panelBox>
    This in itself works OK, however elsewhere on the page very odd things happen whenever there is anything non-trivial inside the af:forEach. Columns become duplicated inside the table, and panelBox elements elsewhere on the page- and their contents- also become duplicated. If I reduce this right down to the bare minimum, the odd behaviour occurs with
    <af:forEach items="#{backing_UserManagement_UserManagement.criteria}"
    var="thisSearchCriterium">
    <af:commandButton text="commandButton 1"/>
    </af:forEach>
    but not with
    <af:forEach items="#{backing_UserManagement_UserManagement.criteria}"
    var="thisSearchCriterium">
    <pre> Hello World </pre><hr>
    </af:forEach>
    Though the "Hello World" lines appear at the top of the page, outside any ADF elements (even when defined inside an af:panelBox or similar) so this doesn't give me a way of getting to the result I want.
    Has anyone seen this kind of thing before and solved it?

    Hi,
    put a print statement into your managed bean and see how often it gets executed. Usually this is 2 times the case. You can set a flag after the first run , or just set refresh as needed in the iterator binding with a refresh condition of prepareRender or prepareModel
    Frank

  • Intermittent image link behaviour in iOS mail client

    We use image links with a mailto reference for mobil approvals. For some reason the links occasionally do not behave as links but instead are processed only has an image, meaning the save image / copy menu pops up opposed to an email draft. I have stripped the html email down to the bare minimum but still happens. Same mail works fine on some phones/ipads. Any thoughts much appreciated.

    I have the same problem. iPhone 4 is on iOS 5.1 (9B176) and iPad 2 on iOS 5.1 (9B176). I have seen someone with an iPhone 4S that apparently did not have that problem (there the menu also has an "open" option). Also I noticed that if you touch the icon before the image has finished loading (so with a very large image), it actually does open the URL, but once the image has been loaded, it assumes that you want to save or copy the image.

  • Weird flash plugin behaviour

    Hello guys and girls.
    Recently I switched back from catalyst to the opensource driver. Everything worked fine after that.
    Now I updated my system a week ago and for some reason my flash player behaves weirdly since then.
    When I got 2 or more tabs open and all of them having flash active, flash stops displaying correctly when I close one of them.
    Is this a known problem? I couldn't find any posts mentioning this, so I thought I should post a topic here.
    Thanks in advance,
    szt

    I've been having flash issues lately too, although different ones from yours. Flash videos on lots of sites refuse to go fullscreen. sometimes they will go fullscreen once, but if I unfullscreen and try again it will be broken until I restart firefox. youtube is the only site it works reliably on. I resolved my issues by using chromium and chromium-pepper-flash, which is far more up to date and less buggy than flash 11.2

  • Weird DocumentBuilderFactory.newInstance() behaviour

    problem summary
    ==============
    jvm breaks when I call DocumentBuilderFactory.newInstance(). I suspect its something to do with security but no exception is caught in the try...catch block where DocumentBuilderFactory.newInstance() is called.
    Other info about the problem
    ======================
    I'm working on an application that use 'presence service' and message queue service. When I use Sun's message queue service, jvm doesn't break. But when I use a SKype client (jskype) jvm always fail even though jskype doesn't reference DocumentBuilderFactory.newInstance() at all. Anyone?

    That's great thinking Fred.
    I've working on a much cut down and simplified version with just program changes to find out the cause of the behaviour.
    I tried your note off suggestion without success, but your comment on the original multi being "blocked" led me to route the final events to a second copy of the multi instrument rather than the original, and it works - the custom bank changes are correctly output!
    Maybe there's some kind of internal message validation or something, I'm not quite sure. But using a second copy of the multi instrument - though not ideal - is a perfectly acceptible workaround.
    So thanks for the pointer - you really helped me out..!

  • Weird mouse pointer behaviour

    Since this morning OSX won't register the position of my mouse pointer. All the hover triggered events (link highlights, Expose Hot Corners) won't work. OnClick events do work correctly, but it is kind of annoying not being able to use hot corners.
    Any ideas on how to fix this?

    Something is up with the 10.5.6 update. Bluetooth mice pointer is erratic, but buttons all work fine. Mouse is fine (Great: ROCKETFISH) on all other Macs. Mail.app, SyncServer and other non desrcript and arcane named processes are sucking the goodness out my MacBook 2.16 Mid 2007. Fans are going much more than it ever did...battery is being drained by processes I never evoke. Crashes from BAD_ACCESS plagued me on 10.4.11 so I took the plunge....bought Leopard....and spent days trouble shooting all the messes it casued...had to search for Mail.app update....never showed up in the software updater process....that is not acceptable....I have bought new hard drives, thinking it was a faulty drive...not enough free space.....nope. Spotlight was eratic at one point. I run Disk Utility and ONyx regularly and often the permissions are wrong on a big scale....run it again and the same ones are wrong again....run it off the Installer Disk....Get everything apparently tickety boo....then the Bad Access thing reals its ugly head again....I am tired of being a beta tester...this is not my bling thing toy...it is my living and I spend more time doing trouble shooting than work....Genius guys are a misnomer....Apple is starting to drop from the top of the tree and is looking rather fetid mixed with the compositing leaves....enough CRAPPLE give me the good Mac stuff once again....System/Finder 3.7 wasn't this bad. Who needs a million bells and whistles if you can't the 'trailer hitch' to work? Tech tool shows all is well.

  • Weird Inspector hotkey behaviour

    The built in Firefox web developer tool inspector can be called with CTRL+SHIFT+I. which will show the web developer toolbar and you can also select a desired element on the page. Now, when I want to select another element and press CTRL+SHIFT+I again, it closes the toolbar. WHY ON EARTH? Is there any way to eliminate this overly annoying toggle behaviour?
    I don't want to click every time on an icon, to inspect an element. I want a shortcut which always brings up the toolbar and lets me inspect any element on the page. Like firebug's CTRL+SHIFT+C does it.
    Ideas?

    Ctrl+Shift+i works like Ctrl+Shift+k and other toggles that open/shut the relevant pane. I don't think it was ever intended to reactivate inspect mode. Someone needs to define a new keyboard shortcut for that.
    I looked into using [http://forums.mozillazine.org/viewtopic.php?f=48&t=72994 keyconfig 20110522] for that, but I don't know how to invoke the inspector.highlighter.unlockAndFocus() method from an object available to the extension. I'm sure someone does.

  • Weird Quick Time Behaviour

    Hi,
    I have to translate a fla into DVD. The picture become soft
    and blurry when exported in AVI, but the export in .mov produce a
    very clean and crisp image. Re-exporting from QT Pro for import in
    a video editor program works perfectly well. The problem comes from
    randomly "sliding" frames. I'm not talking about flickering... It
    looks as the picture has been spilt in the middle and the 2 parts
    are sliding on top of each other.
    The Fla is a 15 minutes corporate film designed for
    projection with no action script involved. On these 15 minutes this
    weird effect appear 4 or 5 times, lasting approx. 1/3 of a second.
    Did anybody came accross this before? Is there an answer?
    Thanks in advance,
    Dominique

    Hi,
    I have to translate a fla into DVD. The picture become soft
    and blurry when exported in AVI, but the export in .mov produce a
    very clean and crisp image. Re-exporting from QT Pro for import in
    a video editor program works perfectly well. The problem comes from
    randomly "sliding" frames. I'm not talking about flickering... It
    looks as the picture has been spilt in the middle and the 2 parts
    are sliding on top of each other.
    The Fla is a 15 minutes corporate film designed for
    projection with no action script involved. On these 15 minutes this
    weird effect appear 4 or 5 times, lasting approx. 1/3 of a second.
    Did anybody came accross this before? Is there an answer?
    Thanks in advance,
    Dominique

  • Weird csv import behaviour...

    Hi guys!
    I was wondering if any of you encountered a werid csv import behaviour:
    If the csv file I'd like to import has columns shortened...I mean sometimes you have to click twice on a column to see its full content..and I'm talking about the situation where you don't see it in a full spectrum. Then if im trying to import it I receive an error...if immediately after that I click twice on every column of that csv file...the import works fine...
    Any ideas?
    With regards,
    PsmakR

    Hi guys!
    I was wondering if any of you encountered a werid csv import behaviour:
    If the csv file I'd like to import has columns shortened...I mean sometimes you have to click twice on a column to see its full content..and I'm talking about the situation where you don't see it in a full spectrum. Then if im trying to import it I receive an error...if immediately after that I click twice on every column of that csv file...the import works fine...
    Any ideas?
    With regards,
    PsmakR

Maybe you are looking for

  • Trouble with Deskjet 612C and Windows 7

    I have an HP Deskjet 612C that has a parallel connection only. I have new WINDOWS 7 computer with only USB ports.The printer prints fine & I have several spare cartridges that cost a some bucks. I therefore bought a Parallel to USB cable hoping it wo

  • SuperDrive not working/ appearing/ powering up

    So my super drive has stoped working, when i try insert a disk it does not accept it or reject it, in fact it dosent make a single sound, its like there is no power going to it. When i looked in disc utilities there is also no superdrive appearing, e

  • Nano Skips Certain Songs

    Hello, is there a cure for my Nano? It skips certain songs. It will say play 3 minutes of a track then just move on? I have tried a resest, update, re-install - well I have tried everything I can think off! It keeps happening on the same songs - howe

  • Oracle 10g on solaris 10 : kernel parameter warning

    I am installing oracle 10g on Solaris 10. I have a warning on kernel parameter missing (shminfo_shmmax for example) during the system check. I understood that with the 10 version of solaris these parameters are replaced by ressources control and I ha

  • Macbook Pro Trackpad wrongly left clicks

    When I click on the bottom right part of my trackpad it will left click instead of doing a normal right click.  I think it has something to do with the fact that that part of the trackpad is used the most. It does not do this on any other part of the