Why would connection pooling cause problems with a trigger?

This is a strange one. We have an app that deletes a row in a database table, and this table has a delete trigger on it. The row gets deleted every time the app is run, yet the trigger only fires intermittently. It's not that the trigger is failiing in some way - it just doesn't get called at all. If I issue the same delete command in PL/SQL developer then the trigger fires every time.
Several hours later and out of desparation I tried turning off connection pooling via the app's connection string, and found that the trigger now fires every time. Any ideas what might be causing this behaviour? I can reproduce/fix the issue every time simply by setting "Pooling" to true or false!
We are using Oracle 11g and ODP.Net v4.112.2.0.
Thanks in advance
Andrew

More information: I've now been able to reproduce this issue in a small .Net app, and can make it fail in a more consistent manner (which I'll explain later). While it's still too large to post the entire code here, I can summarise what the app does in pseudo-code:-
for(int i = 1; i <= 10; i++) // Run the test a number of times
// Step 1 - Delete rows from the table with the delete query in question
Execute non-query "delete from test_table";
Wait 1 second
// Step 2 - Check that the delete actually happened
Execute reader "select count(*) from test_table"
Display the count
// Step 3 - Check that the delete trigger inserted some rows into a "logging" table. This is my method of "tracing" - I added a basic insert to the start of each trigger section, as mentioned in my previous post.
Execute reader "select count(*) from my_logging_table"
Display the count
// Reinstate the test data
Execute non-query "<insert rows back into test_table>"
Wait 1 second
For info the connection string is fairly basic:- "Data Source=<tns name>;User Id=<foo>;Password=<bar>"
Some points of interest:-
- When running the above test app, the trigger successfully fires on the very first iteration (i.e. "Step 3" displays a non-zero count from the logging table). All subsequent iterations fail ("Step 3" displays the same count each time).
- If I turn off connection pooling (by adding "Pooling=false" to the connection string), the trigger runs on every iteration (i.e. "Step 3" displays an ever-incrementing record count).
- Regardless of whether it works or fails, the deletion in step 1 does take place (confirmed by "Step 2" displaying a count of zero).
- I added the waits after the non-query calls to see if that made a difference, but it doesn't. I can change these to 10 seconds or more and it will have no effect on the issue.
The "Execute non-query" method uses code along these lines:-
using (var conn = new OracleConnection(ConnString))
conn.Open();
using (var cmd = conn.CreateCommand())
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
result = cmd.ExecuteNonQuery();
conn.Close();
return result;
While the "Execute reader" method looks like this:-
var conn = new OracleConnection(ConnString);
conn.Open();
var cmd = conn.CreateCommand();
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
return cmd.ExecuteReader(CommandBehavior.CloseConnection);
The calling code in the for loop, wraps the returned reader in a using clause like this:-
using (var reader = ExecuteReader("<sql>"))
This will dispose of the reader, which will in turn close/dispose the connection (due to the CommandBehavior.CloseConnection parameter passed to ExecuteReader).
Interestingly, if the reader isn't disposed of then the problem becomes more intermittent (the trigger will fire perhaps 25% of the time). This is what's happening in our unit test harness. By ensuring the reader/connection is closed and disposed (which common sense would say should improve matters), the trigger only fires on the very first iteration of the loop. The plot thickens.

Similar Messages

  • I need to download dell drivers to a jumpdrive connected to my iMac.  Will this cause problems with my Mac?

    I need to download dell drivers to a jumpdrive connected to my iMac.  Will this cause problems with my Mac?

    Thanks.  These drivers are for the audio, etc. for a dell laptop I purchased used.  ( Needed something cheap for a training video that would only run on Windows.  Tried Emedia player but picture was too fuzzy.)  Dell support said I should contact Apple support for instructions on how to get the drivers onto the jumpdrive.  Any tips on doing that?

  • I just updated my latest java but the update is causing problems with some externale devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device

    i just updated my latest java but the update is causing problems with some external devices. So i would like to uninstall this latest java update and get back the previous one. That should solve to problems with my external device.
    Is this possible and how do i do that?
    Anyone who responds thanks for that!
    Juko
    I am running
    Hardware Overview:
      Model Name:          Mac Pro
      Model Identifier:          MacPro1,1
      Processor Name:          Dual-Core Intel Xeon
      Processor Speed:          2,66 GHz
      Number of Processors:          2
      Total Number of Cores:          4
      L2 Cache (per Processor):          4 MB
      Memory:          6 GB
      Bus Speed:          1,33 GHz
      Boot ROM Version:          MP11.005D.B00
      SMC Version (system):          1.7f10
      Serial Number (system):          CK7XXXXXXGP
      Hardware UUID:          00000000-0000-1000-8000-0017F20F82F0
    System Software Overview:
      System Version:          Mac OS X 10.7.5 (11G63)
      Kernel Version:          Darwin 11.4.2
      Boot Volume:          Macintosh HD(2)
      Boot Mode:          Normal
      Computer Name:          Mac Pro van Juko de Vries
      User Name:          Juko de Vries (jukodevries)
      Secure Virtual Memory:          Enabled
      64-bit Kernel and Extensions:          No
      Time since boot:          11 days 20:39
    Message was edited by Host

    Java 6 you can't as Apple maintains it, and Java 7 you could if you uninstall it and Oracle provides the earlier version which they likely won't his last update fixed 37 remote exploits.
    Java broken some software here and there, all you'll have to do is wait for a update from the other parties.

  • My Mac is 15 months old and all of a sudden it has started resetting the time and date then I get a message saying not all apps will work because of the pre Jan date any help as to why ? Causing problems with wireless router.

    My Mac book pro is 15 months old and now suddenly it has started resetting the date and time, causing problems with applications and my wireless access. Any suggestions as to why this is happening and how to fix it?

    Seems the time isn't being saved to your computer correctly, it may be a corrupt file that isn't saving the time anymore.
    You can move the
    com.apple.systempreferences.plist
    file out of your Users/Library/Preferences folder to the desktop and reboot.
    then go to your System Preferences > Date and Time and set a time server close to your location (or in your time zone)
    (trash the file on the desktop if no ill issues occur later on)
    or you can follow/bookmark these support docs to reset your PRAM and SMC (and for future reference)
    http://support.apple.com/kb/TS2570
    http://support.apple.com/kb/TS1440
    http://support.apple.com/kb/HT1455
    http://support.apple.com/kb/ht3964
    http://support.apple.com/kb/HT1379
    http://support.apple.com/kb/ht1379
    http://support.apple.com/kb/HT1509
    I don't remember exactly where OS X is keeping it time settings now, but I think one of those choices should help resolve your issue and won't hurt anything giving them a shot. Perhaps someone else could refresh my memory.

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • If I install the update to Adobe Reader 10, will that cause problems with Acrobat Pro 9?

    Firefox (version 15.0.1) is telling me I need to install an update to Adobe Acrobat 9.4 in order to view pdf files in my browser. I use Acrobat Pro 9. The update is actually Adobe Reader 10, and I am wondering if I install this, will it cause problems with my version of Acrobat Pro?
    Because I am not sure if this is so, I have temporarily disabled the plug-in and now pdf files download automatically rather than display in my browser. I would prefer they open in my browser but do not want to upgrade to Acrobat X.
    My OS is Windows Vista. I did not include the "troubleshooting information" file because I'm not sure what specific info is being requested.
    Thanks for any help.

    Hi WMdotcom
    did you try to view pdf with your acrobat pro 9 ?
    see
    [https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file Change what Firefox does when you click on or download a file]
    [https://support.mozilla.org/en-US/kb/set-how-firefox-handles-different-file-types
    Set how Firefox handles different types of files]
    thank you

  • Anyone successfully set up connection pool in s1as with ms sql server 2000?

    As subject. Since I have seen a lot of posts about the NoSuchMethodException issue with various dbms providers, and the only "official information" I found thru different forums, google, different sun/javasoft sites and forums are this:
    http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsunone%2F8172&zone_32=NoSuchMethodException&wholewords=on
    Which is wonderfully vague and provide not-so-much useful information...
    As for the information and suggestion posted by other forum members, most or all of them have experience with setting up Oracle, DB2, mySQL, etc., not aimed for MS SQL Server 2000 (you may think, I am just asking for it running MS SQL server with Java... oh well, not my choice)
    I still haven't seen any positive feedbacks on how this exception was caused and how to resolve it. I have literally exhausted all leads on how to fix this issue, so right now I'm only interested to know whether anyone in the forum actually have a successful connection pool set up with MS SQL server 2000.
    My platform:
    w2k sp3
    SunOne app server, update1, JDK 1.4.1
    latest MS SQL 2000 JDBC driver
    This fails with the NoSuchMethodException error:
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("test_db");
    con = ds.getConnection();
    System.out.println( "con is created -> " + con );
    } catch (Exception ex) {
    System.out.println( "failed -> " + ex.getMessage() );
    This works just fine:
    try {
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://xxx.xxx.xxx.xxx:1433;DatabaseName=testdb;SelectMethod=cursor", "username", "password");
    System.out.println( "con is created -> " + con );
    } catch (Exception ex) {
    System.out.println( "failed is fucked -> " + ex.getMessage() );
    thanks,
    --kuan

    Hi,
    Thanks for pointing out that article, I did not find it previously. After following the directions in the artile and your advise, now dbping seems to be able to connect to SQL server.
    Thank you very much.
    --kuan                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • My host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    my host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    There are several possible causes for this problem.
    1. Two (or more) computers on the local network have the same Bonjour name, such as "X's-MacBook-Pro.local".
    2. You have two simultaneous connections to the same local network: probably Ethernet and Wi-Fi. If applicable, disconnect the Ethernet cable or turn off Wi-Fi.
    3. A Mac wakes from sleep due to network traffic. This is due to a bug in OS X that may only affect some models.
    4. A device that gets its network address from the router wakes from sleep, and the address it was using before has been assigned to another device.
    5. A third-party wireless router has incompatible settings or firmware. In that case, refer to the manufacturer or ISP for support. Restarting the router may help, temporarily.
    6. See also this support article.
    Rename the computer in the Sharing preference pane.

  • Why do i have a problem with accessing images in adobe muse

    why do i have a problem with accessing images in adobe muse ??????!!!!!
    i need heeeeeelp ASAP
    pleeeeease

    I am on the begining stages with constructing the web so i do not have yet URL. The problem is i can not insert any image any way. Whether by fill a browser or by place image, i have the same issue. All the images with all image's format unable to be selected and it is turned off
    I really need help plz
    Is there any info i can supply that would help you figiring out the problem ??

  • GEARAspiWDM.sys causes problems with PlexTools.

    The unsigned driver GEARAspiWDM.sys (to be precise: upper filter) that you installed on my system cause problems with my DVD recorders (Px-716A and PX-760A). First thing I notice is a longer responce time (delay). The big problem is that there are faults while trying to erase or burn DVD media (I mostly use rewritable disks). I love iTunes, but just keep in mind why using upper filters and/or unsigned drivers is a very-very bad idea! The least you can do is to ask the user if he/she wants to install this driver.
    I found my way to uninstall the driver manually. Later I found the uninstaller from Gear Software:
    http://www.gearsoftware.com/cfknowledgebase/articledisplay.cfm?articleid=295
    Now iTunes will alert me that it cannot burn disk on every startup. You know what? I don't care about this future! So don't bother me every startup!

    We know about the large file support issue (though this given version of it looks new to me) and work on it.
    There is no intent to set __GNUC__ for us, nor we recommend users to define __GNUC__ with our compiler.
    However we do have (another) solution for this issue and it will be available in one of the upcoming Sun Studio eXpress releases.
    regards,
    __Fedor.

  • Can SAP GRC AC 5.3 connect without any problem with SAP R/3 4.7 Enterprise?

    hello,
    I went to the PAM in the SAP Marketplace to see if SAP GRC AC 5.3 could connect to SAP R/3 4.7 Enterprise but I can't see all the "Add-On Product Version for...", it's cut off.
    Can SAP GRC AC 5.3 connect without any problem with SAP R/3 4.7 Enterprise?
    If I can't is there any proof about it? I have to show it to a client.
    Best Regards,
    Pablo Mortera,

    Pablo,
    GRC AC 5.3 works perfectly fine with SAP's R/3 4.6c, mySAP ERP 4.7 and ECC systems. In fact we have two 4.7 Enterprise systems connected to GRC AC 5.3 system.
    You can get the details of supported SAP ERP systems under prerequisite section of Info page of GRC AC 5.3 , it can be accessed on marketplace at -
    Downloads-->Installations and Upgrades - Entry by Application Group > SAP Solutions for Governance, Risk, and Compliance>SAP GRC Access Control>SAP GRC ACCESS CONTROL>SAP GRC ACCESS CONTROL 5.3
    Just ensure to have proper BASIS and ABAP support pack level as mentioned in prerequisites.
    Regards,
    Amol

  • Reduce folders in Windows 7 for pictures without causeing problems with PSE11

    I want to simplify  my Windows 7 folders and reduce the number of the folders. Can you please advise me on the best way to do this so as not to cause problems with PSE11 finding the pictures? Thank you.

    19441965 wrote:
    I want to simplify  my Windows 7 folders and reduce the number of the folders. Can you please advise me on the best way to do this so as not to cause problems with PSE11 finding the pictures? Thank you.
    The only way to move files or folders/subfolders without causing problems, that is not creating 'missing files' is to do this from within the Organizer, not the OS (Win/Mac).
    You can create folders and move pictures from the Organizer.
    Note that if you are moving the files of several subfolders into a single one, you run the risk of wanting to move files with the same filename into the same folder ; your OS won't allow that. So the Organizer will rename pictures if needed.
    If you want to do such a big reorganizing task, absolutely do a full backup before. There is no advantage  for such a reorganizing from an Organizer point of view, but if you need it for some reason, it has to be done from within the organizer.

  • Have to re install elements 11 & premiere elements 11. cause problem with upgrade windows 8.0 to 8.1

    have to re install elements 11 & premiere elements 11. cause: problem with upgrade windows 8.0 to 8.1.    Lost all software and data.
    how to re install elements11. (downloads purchased in your store 2013-05)
    [email protected]

    have to re install elements 11 & premiere elements 11. cause: problem with upgrade windows 8.0 to 8.1.    Lost all software and data.
    how to re install elements11. (downloads purchased in your store 2013-05)
    [email protected]

  • WE + CE cause problem with accented characters

    While creating a CFF font which contains the WE as well as the CE character set, it causes problems with most of Adobe programs (Photoshop 7, Illustrator 10, Photoshop Elements 2.0) under Mac OS X. Problem: the accented characters get replaced by Helvetica (Photoshop) or Myriad (Illustrator). Only InDesign treats it right.
    I tested under Mac OS X 10.2 as well as 10.3; no difference. I tested on 'old machines', but fresh machines as well (machines which didn't have the fonts installed before); no difference. All the same problem.
    Deleting the CE characters solves the problem, but yeah, I want to create a CFF font which contains both character sets.
    Generating the font in FontLab or FDK doesn't make any difference.
    So, what's the solution? Sounds like a mystery.
    Bas

    Two comments:
    OpenType/CFF fonts should work to some degree on versions of Mac OS from 8.x on. "Some degree" means that pre-Mac OSX, you need ATM for them to work, and you only get the Roman char set. On Mac OSX, Unicode savvy apps will give you access to the entire charset, but at the moment only Adobe apps support any OpenType features.
    About your problem with CE charset: this is a known problem, and is still a mystery. Adam Twardoch has reported the same problem and has supplied some test fonts. I have spent over a day looking over the fonts, and looking into old code, and can't find any problem in the font data. Investigating further is likely to be a several day effort, and will happen, but not soon.

  • Why some times i have problem with purchase

    Why some times I have problem with purchase

    We won't be able to help you unless you tell us exactly what's happening or not happening when you try.

Maybe you are looking for

  • How to install an app in phone using extension files

    Hi, I have a very small doubt in windows development. I am new to windows development and my question is in android phones we can install developed app by using .apk files similarly is there any way to install app in windows phone app which i am deve

  • How can I get Siri for my ipad2

    How can I get Siri for my iPad 2 , and what happen to my YouTube app?

  • Why does Skype do not allow to delete conversation with single contact?

    IT is a simple question only if Skype can be HONEST and answer it truthfully.. What is the reason that we can not have a feature where we can delete the single conversation with one contact. Now the option skype has does not allow that. You either de

  • Upgrade CNR 6.2 to 8.1 : db error

    Hello, I try to upgrade CNR 6.2 to 8.1. When upgrading from a pre-7.2 cluster to 8.1, a plateform-specific tool cnr_mcdexport is required. This step is ok: I migrate 6.2 to 6.3 and, with the cnr_mcdexport, I extract the data from the MCD database 6.3

  • "Firefox is running" but not visible in task bar

    "Firefox is running" is message on screen but there is no evidence of that and it does not appear on the taskbar so it cannot be "closed." What now? Can't get access to Yahoo Games. Why? Must use IE to get to games. Why?