473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

get a session id of database in java

dmjpro
2,476 2GB
I made a connection in oracle through JDBC.
I want the session id for that connection through java..............
Plz help me out .........................
Jan 31 '07 #1
2 5902
rengaraj
168 100+
You can get the session ID from the Oracle v$ tables using the following queries. SYS_CONTEXT is the preferred method from 8.x on.


//For Oracle 7.x on up to 10g
SELECT SID FROM V$SESSION
WHERE AUDSID = USERENV('SESSIONID');

//For Oracle 8.x on up to 10g
SELECT SID FROM V$SESSION
WHERE AUDSID = SYS_CONTEXT('USERENV','SESSIONID');
Feb 18 '07 #2
dmjpro
2,476 2GB
can't i get the connection back after i write


l_con.close() method
Feb 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Clement | last post by:
I need to retrive user session by session id. Any help is much appreciated. Thank you.
3
by: nn | last post by:
Hello I have ASP.Net application configured to use cookies for session. For some reasons I can't move to cookieless model. I need access to session created in this application without cookie. I...
3
by: Amil | last post by:
Please don't repond to this if you are guessing or just don't know the answer. I'm trying to login to a backend system running Java/Tomcat. I create a HttpWebRequest with the login data and do...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
2
by: ramendra | last post by:
Hello, I am having some trouble with passing session variables from one aspx page to another aspx page through an applet. Let me clarify the problem more ... I have an aspx page which...
0
by: dadasurf80 | last post by:
Hello, I've a problem with Axis which gives me a "Session alreday invalidated" message after a time of inactivity. I use: - Tomcat : 4.1.29 - Axis : 1.3 - JVM : 1.4.2-b28 The complete...
2
by: gupta.divyendu | last post by:
Hello Everybody I have a big problem. Please guide me. Is there any way through which I can get what session variables are created in the session. Suppose there are two pages. Page A and...
6
by: Marcus | last post by:
I have an ASP.Net 2.0 app that needs to jump out onto another web server running a java server page website (Apache TomCat 4.1.12) that I control. I hate that it needs to do this, but we are using...
0
by: krishna81m | last post by:
Could some one please explain why the session is not being maintained when I am doing a forward in a servlet after setting a cookie. I am even unable to set session attributes or parameters and...
0
by: Jim Kennedy | last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you don't issue a commit and the driver does not issue a commit, but the server does for all DDL. That is probably where...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.