Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am connecting to an Oracle database in ASP.Net using SQLDataSource. My connection string is:

<add name="ConnectionString3"
 connectionString="Data Source=sml; User ID=sml; Password=sml; Unicode=True; Pooling=False;"

Problem is that when I look at v$session on the database, I can see two locked sessions. They don't clear till I shutdown the ASP.Net server.

i.e. the query

select * 
from v$session b
where status='INACTIVE' and schemaname='SML' AND program='w3wp.exe'

always shows two sessions which don't clear till I shutdown the server.

What is the proper way in ASP.Net to connect with an Oracle database and then manage the connections to clear after connecting with database? I meant how can I logout from the database after querying it?

Are there any session settings to do in the Oracle database?

share|improve this question
What does it mean to you to have a "locked session"? What query are you running and what results are you seeing that leads you to believe that there is a problem? – Justin Cave Nov 16 '12 at 4:17
I am Just selecting Data from DB using Sqldatasource – user15377 Nov 16 '12 at 4:19
And there are permanently loacked sessions in session browser – user15377 Nov 16 '12 at 4:19
What is a "permanently locked session"? That's not a term I've ever come across so I'm very unsure what you're seeing and why you believe what you are seeing is problematic. – Justin Cave Nov 16 '12 at 4:21
Ok Sir Tell me One Thing...If we connect with oracle database from or any other platform then there become a session which tell us the host which database is connected and then also we close the connection after connecting with DB to Clear that session from DB.I am Doing selecting and also closing the DB connection then why there is locked session in session browser of Oracle DB – user15377 Nov 16 '12 at 4:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.