OracleConnection opening more than one session.

Hi,
I am using ODP.NET 10.2 client, when i try to connect to Oracle database using OracleConnection object it is creating more than one session object.
I created one windows application, then i added the below code in form load event of the application
Please find the below code
string strConnection1 = "Persist Security Info=False;User ID=service1;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ases;";
string strConnection2 = "Persist Security Info=False;User ID=service1;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ASES;";
string strConnection3 = "Persist Security Info=False;User ID=service1_customer;Data Source=SD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=ases;";
OracleConnection con = new OracleConnection(strConnection1);
con.Open();
OracleConnection con1 = new OracleConnection(strConnection2);
con1.Open();
OracleConnection con2 = new OracleConnection(strConnection3);
con2.Open();
When i run the below Query
select * from V$session where PROGRAM='WindowsApplication7.vshost.exe'
I am getting 6 session. Please help me out in this regard.

The Error message was “Unable to open connection” once it reach the maximum session.
I agree for that, Previously I was not disposing that connection object. Presently I am using keyword to dispose the connection object.
Here I have doubt
In connection string the pooling attribute is true by default.
Scenario 1:
If I specify externally(through connection string it behaves very badly) like pooling=true in the connection string. It will create more than one session.
Scenario 2 :
If I donot specify pooling attribute in connection string it will create only one session and it will consume the same session for all the instance.
Below is the code snippet
Here is the example for scenario 2
private void button3_Click(object sender, EventArgs e)
//Connection string which donot have a pooling value.
string strConnection1 = "Persist Security Info=False;User ID= is_customer;Data Source=ISD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;PASSWORD=is;";
using(OracleConnection con = new OracleConnection(strConnection1))
con.Open();
MessageBox.Show(GetSID(con));
//con.Dispose();
using (OracleConnection con2 = new OracleConnection(strConnection1))
con2.Open();
MessageBox.Show(GetSID(con2));
//con2.Dispose();
Scenario 1 Example:
private void button7_Click(object sender, EventArgs e)
string strConnection1 = "Persist Security Info=False;User ID= is_customer;Data Source=ISD.World;Connection Lifetime=60;Max Pool Size=30;Min Pool Size=0;Pooling=true;PASSWORD=is;";
using (OracleConnection con = new OracleConnection(strConnection1))
con.Open();
MessageBox.Show(GetSID(con));
//con.Dispose();
using (OracleConnection con2 = new OracleConnection(strConnection1))
con2.Open();
MessageBox.Show(GetSID(con2));
//con2.Dispose();
GetSID is the function which is used to fetch the session of the connection string.
private string GetSID(OracleConnection con)
     OracleCommand cmd = new OracleCommand();
     cmd.Connection = con;
     cmd.CommandText = "select SYS_CONTEXT('USERENV','SID') from dual";
object sid = cmd.ExecuteScalar();
return Convert.ToString(sid);
In Scenario 2 example I will get only one session ID.
But in Scenarion 1 example I will get different session ID’s.
Please suggest what is the problem.
Message was edited by:
user476285

Similar Messages

  • I lost my @ internet browser icon and can not find it. I have looked everywhere.  I even uninstalled/reinstalled my os and i still can not find it. Now I can not open more than one session unless i click a link in the existing session.

    I have looked everywhere for this icon.  I was looking at a video and all of a sudden my screen changed and I had a pop up asking me to hide.  I thought I was hiding the strange pop but my @ icon disappeared instead.  I looked in applications and do not see it anywhere. 

    If you mean the address field in Safari, choose Show Toolbar or Customize Toolbar from the View menu.
    If you mean the spring icon in the Dock, that's not an application. Open any site in Safari and drag the little icon of it to the Dock; the preset icon points to http://www.apple.com/macosx/
    rkaufmann87: The Safari Dock icon doesn't contain an @, and no other Mac web browser icon I've seen does.
    (59088)

  • Cannot open more than one Firefox session

    I am using Windows 7 on a PC. When I installed Firefox 3.6, I found that I could not open more than one session unless I deleted the process in Task Manager. When I reopened Firefox, it immediately said it had installed 6 plug-ins. It would then allow me to open a second Firefox session, but after this I could not open any more sessions. I do not have this problem with IE or Safari.
    Why is it installing plug-ins without my asking for them?
    Could the plug-in's be causing the problem of not allowing more than one session?
    How can I have a clean Firefox program without plug-ins and one that will open any number of sessions like it used to be?

    What happens when you right-click a link and use Open Link in New Window?

  • More than one session in IC WebClient

    Hi there,
    I have the following question: Is it a problem for the IC WebClient user to open more than one session within the Internet Explorer?
    From SAP docu side I cannont see any side-effect in doing so.
    Do you think this can lead to any performance issues?
    Thanks a lot in advance
    Cheers
    Ingo

    Hi Ingo,
    Generally ICWebClient is designed for the use in Customer Interaction or Customer Support Centres where usually agents can login and resolve customers query which means seperate user for seperate agents.hence it is advisable to use only one user per login but it would not effect the functioning of the application if more than one logins are also used since it is just a UI the background is processed in separate server.
    thanks,
    ashish.

  • Can I open more than one instance of CC5.2?

    In my experience, I have not been able to find a way to open more than one instance of CC5.2.  If I want to run an SOD user analysis and an SOD role analysis, for example, I have to run one and wait for the results to return before I can run the next analysis.  
    If I open a new instance of Internet Explorer and type in the url for CC5.2 while CC5.2 is already running in a separate instance, it overwrites whatever is running and reopens CC5.2 all over again.
    In CC4.0 I was able to open multiple SAP sessions and run multiple SOD reports.  I understand 5.2 is a web app, but it seems the code should be smart enough to allow me to open multiple IE instances to run multiple analyses. 
    Am I missing something?
    Thanks,
    Sandy

    Hi Sandy,
      What about option to run your analysis jobs on the background ?
      You can still be in your IE session, but schedule several analysis to run on the background. On completion of the jobs, you'll be able to check output results for each of them.
      Advantage of this is that it also doesn't depend on your link between your machine and CC server which could be an issue for the foreground jobs.
    Best regards,
    Laziz

  • Since I upgraded Firefox, I cannot open more than 1 session at a time. What can I do to correct the problem?

    Since I updated Firefox, I can no longer open more than 1 session at a time. How can I correct the problem?
    == This happened ==
    Every time Firefox opened
    == Since last upgrade

    Firefox only runs one session at a time, are you talking about not being able to open a 2nd window?
    Do you have that problem when running in the Firefox SafeMode?
    [http://support.mozilla.com/en-US/kb/Safe+Mode]
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this:
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Firefox will not open more than one window and upon restarting will not open the previous tab and refuses to open bookmarks

    Firefox does not open more than one window. I can open plenty of tabs, but not more than one window. Upon closing firefox and trying to restart the browser will not open and needs to be closed through windows task manager. Upon trying to re-open Firefox I receive the 'oops this is embarassing , firefox cannot re-open your tabs" message. When I click on "new session" the bookmarks do not load. It is becoming very frustrating as I am a student and often do lots of research on the web while using lots of open windows.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    See also "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

  • Upgraded to iOS 6 and now I can't open anything in the kindle app? I have to say that I have had my ipad3 for 6 months and intensely dislike the problems with using it. Also is there any way of opening more than one screen as it is hopeless otherwise?

    I Have had my iPad for 6 months as I cannot access my work emails using windows. I have to say that it is the most unhelpful device I have ever used and although it looks like there isn't an answer for some of the questions I have asked below, I thought I would try!
    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    IT might just be that I don't have the correct settings (I am a technophobe) but I absolutely hate the iPad and only have it for work emails, it is so annoying that I can get my mobile phone and kindle3g to work fine, but always have problems with the iPad. I am sure it could be good (and for reading emails on the go in the uk it is great, as I like the key board) but it just seems to make everything else difficult.
    i Hope you can help and sorry for asking questions others have, but I am just hoping that something new might have been developed!
    thanks,
    K
    Message was edited by: K Paton

    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    Try rebooting your iPad, that should fix he issue. I that doesn't work, delete the app and re-download it.  The Kindle books should all be in he Kindle cloud services and you can get them again. I have an iPad2 w/ Kindle app and it works just fine - no issues.
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    Page as in a kindle book way? turn iPad to landscape position from portrait position. If, however, you mean open more than one application at a time, then no. And not hopeless, as it takes a bit of time to get used to, going from a desktop/laptop format to tablet format.
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    It's actually fairly easy. Press down on the word, then you can expand by drawing your finger to cover word/sentence/paragraph/page, hit select or select all then it gives you the option to cut, copy, paste, define. If you want to use a word processing app on the iPad, Pages is a good application.
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    It's the connection on your phone. Samsung Galaxy SII? Android software?  What you have to do is go to the phone's settings and connect via wireless, not Bluetooth. Go to System Settings (on phone) and under Wireless and Networks click 'more' and go to the Tethering and Portable Hotspot option. Set up your mobile wifi hotspot,  name it though it will probably come up with 'AndroidAP', choose a WPA2 security level and put in a password. Go back to previous screen and turn on 'Portable Wi-Fi Hotspot' box. Then on your iPad in the Settings - Wi-Fi section, it should then recognize your phone for tethering. If it's a Windows Phone 7,  I don't know the layout of that software, but presumeably similar.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    Sometimes the issue is with the website design, not all websites are optimized for mobile devices - not just iPad but also Android devices. It happens. They're getting there, but occasionally the page might need a refresh.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    It depends on what you use to build the websites on the computer. Recommend a free program on the computer called CoffeeCup Free HTML Editor. I don't recommend using IE period; Firefox or Chrome are my choices on Windows machines. I have two websites that I manage, both using this program. I'm assuming that when you mean you can't access the sites on the iPad you mean to update them? Ostensible there are apps to let you do this. What format are the sites? Without seeing what exactly you mean and what you want to do, it's hard to explain.
    As for seeing full page while emailing within a site, turn iPad to portrait mode, and try to finger-pinch touch the screen to see if that will bring the fuller page  into view. Other option is opening a second tab with same website and just go between tabs to reference material.
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    If you were outside the US or Canada, my guess is the problem lies within the SIM card in your iPad. If you were outside North America, there are different band levels - I'm guessing you have a SIM thats locked to a particular provider. Band level frequencies differ per country/continent, so a SIM card that will work in Canada/US will not likely work in UK/Europe/Asia/Australia, etc. you will be able to get your emails again when back on a wifi network. Mobile phone may have a different type SIM card (GSM/HSPA) from your iPad SIM. Also, check your email settings.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    Moving the cursor on a sentence is a matter of putting your finger on the screen where you want it. It's exceptionally easy to do. I'm using the Notes app to write this whole segment and I just need to put my finger where I want to change things and presto it's ready for me to change where I want it.
    Here's a solution: sell your iPad (after you wipe your data off it) to someone who will appreciate it, and put your money towards the Windows Surface Tablet out later this year/early next year, where you can (reportedly) connect a mouse to it. It will have some of the Windows 7/8 functionality that you're more familiar with, or get a netbook.
    - Ceridwyn2

  • Photoshop can't open more than one graphic at a time without crashing

    I get the error:
    The instruction at "0x7c918af2" referenced memory at "0x00000010". The memory could not be "written".
    Anytime I try to open more than one image in Photoshop at a time, regardless of how I do it - doesn't matter if I choose the image and "open in photoshop" or if I am in photoshop and go to "file/open".
    It's Photoshop CS3. I have already uninstalled, restarted the computer and reinstalled. I tried to "repair/change" from Windows, but it asks for the CS3 cd and then CS4, which I don't have since I'm using CS3. 
    This is quite frustrating as it would be nice to be able to merge photos and the myriads of other things you can do with multiple images at once, if opening them does not crash your program.

    mikeobe wrote:
    OK, kinda slooow here, I hope I'm not trying your patience!? If I understand you correctly, install dummy drivers and then the drivers that came with my printer, Designating NO default printer! Then when I need to use the printer I will have to declare which one each and every time?
    Or, just intall by new printer but do not Delcare it as the Default printer, I guess in this instance there would be NO default printer?
    You may not even have the problem!
    Have you installed the new printer yet?
    There are many more people who don't see it happen than those who do.
    PS: there is always a default printer.

  • Error - Can't open more than one image in CS3

    My Photoshop CS3 was working fine until all of a sudden it no longer lets me open more than one image at a time without crashing. Anyone else have this problem? How do I fix it?

    Hi,
    There may be two issues you have to check:
    1) The " scratch disk" feature in photoshop(usually gets full). Go to preferences - performance. Also check how much RAM PS is using.
    2) Printer Communication: sometimes Photoshop is unable to communicate with the default printer(may be unstable drivers, out of date etc). Network computers also make some issues
    If you want to read more about this follow this link:
    http://www.fluther.com/disc/22453/photoshop-cs3-not-opening-more-than-one-image-at-a-time/
    They talk about the issues I mentioned here. Let me know if you found this information useful.
    Vicente Tulliano

  • Firefox won't let me open more than one window at a time. how do i fix the problem

    Firefox won't let me open more than one window at a time. It use to allow me to open multiple windows before but for no apparent reason it stopped. I uninstalled it and re-installed but I'm having the same problem. How do I fix the problem
    == This happened ==
    Every time Firefox opened
    == several days ago

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • Can i open more than one Resultset object

    hi in my program i have to retrive data from three table and the data from three
    table i have to use in another one
    i wanna know that can we open more than one ResultSet object within one
    try{
    }catch{] block ( i means ResultSet rs = st.excuteQuery(query) more than one time for different -different tables)
    or there is any other way to do this

    You can only have one active result set per statement at a time.
    Depending on the driver you are using you might be able to have more than one active statement (and result set) on one connection. Or not.
    Try catch has nothing to do with that.
    If you are nesting result sets then it is likely you should be using a join (SQL) which would then only require one result set.

  • How can others open more than one form? [Was: Sandra]

    How do you use Forms Central? I am the only account that can open more than one form. I have added all the people in contacts. When they login, they have the upgrade option for more than one form. We have an order number and end user id. Thanks for the help.

    Hi,
    It sounds like you have a paid account and the other users have free accounts.
    You will have to share the form with the other users, please see this link for more detailed on how to share a form with others:
    http://forums.adobe.com/docs/DOC-3351
    All the free account users should be able to open all the forms that you have shared with them. Free users can only create one form on their own.
    Hope this helps,
    Thanks
    Lucia

  • Using Maverick, how is it possible to open more than one calendar window?

    Hi, I'm using Maverick 10.9.1
    My question is: how is it possible to open more than one calendar window? i would like to have on the right my personnal calendar dates and on the left, my company calendar.
    Many thanks in advance for your help!
    ph

    See if the section on group calendar helps.
    http://www.dummies.com/how-to/content/basics-of-calendar-in-os-x-mavericks.html

  • PSE13 repeatedly crashing when opening more than one file at a time to layer images. [was: Feeling very frustrated.]

    Just bought Photoshop Elements 13.  I have a Macbook Pro that meets all the requirements.  I have installed and reinstalled the program but it just keeps crashing.  The program will load, when I choose the expert tab and try to open more than one file at a time to layer images it just crashes and says "Photoshop Elements has closed unexpectedly" Can anyone help me please?

    mikeobe wrote:
    OK, kinda slooow here, I hope I'm not trying your patience!? If I understand you correctly, install dummy drivers and then the drivers that came with my printer, Designating NO default printer! Then when I need to use the printer I will have to declare which one each and every time?
    Or, just intall by new printer but do not Delcare it as the Default printer, I guess in this instance there would be NO default printer?
    You may not even have the problem!
    Have you installed the new printer yet?
    There are many more people who don't see it happen than those who do.
    PS: there is always a default printer.

Maybe you are looking for

  • Tables's data scrambled (randomized) for testing purposes

    Dear Oracle People, I need to scramble (randomize) the date for testing purposes How I can do that within Oracle Source: CODE          FIRST_NAME     LAST_NAME 1          FN_1               LN_1 2          FN_2               LN_2 3          FN_3     

  • Can i use combination peoplesoft system  and http adapter on sender side

    hai can i use combination peoplesoft system  and http adapter on sender side is their any modifications i have to do on module tab can any body tell me how to post data to http adapter is there any application gui is there to post data

  • Restore table

    Dear All, Executed the following query in the ABAP Editor. EXEC SQL. ALTER TABLE SAPONE.MARA MOVE TABLESPACE PSAPONE ENDEXEC. Now the Table got corrupted and it is leading to dump while trying to view the table records. Here i'm moving the MARA from

  • IPhoto Slideshow default settings:

    iPhoto6 Is there any way to change settings for "playing each slide" for LESS than 1 second? Is there any way to change the settings to be individually set for EACH picture... (1 picture for 3 seconds, another for 4?)

  • Unicode representation

    Hi, I `m new in JAVA programming and I would like to know, how can I get the Unicode representation (Hexadecimal number of length 4) of a character. e.g. Given '0' as an input, the output should be 0030.