Temp Tables, Sessions, Connection Pooling, ODP.NET
448417Jul 27 2005 — edited Aug 3 2005I'm new to Oracle and would appreciate any help I can get.
I have an ASP.NET application going against an Oracle 9i database using the latest Oracle Data Provider. I'm missing some key concepts in understanding how this is all working together when temp tables are involved. Clarifications appreciated.
I am using a single user/pw for all my connection objects set in web.config. When a user clicks Submit on the web app it runs two sprocs called InitRollup and GetData. InitRollup deletes the temp table and then fills it with about 10k records. GetData runs some calculations on a field of each record and returns the records. The temp table is a session based temp table.
My question is: Given that the same connection object/string is used with the same user Id and pw. If two users click Submit will each user have its own temp table with different values or will they be deleting and refilling the same temp table?
Based on some observations with the application it seems that they are both accessing the same table. The GetData with calculations takes about 3 seconds to return the values to the application so if I time it just right I can mimic a collision against this temp table by clicking submit twice with two separate browser sessions. And nothing is returned to both browser sessions.
On the other hand, it would appear that instead of using the same connection string if I use the Login user ID in the connection string that each user would have their "own" temp table. Of course this would mean I would have to create actual users in the db instead of having just a user table.
TIA