can i get the session information in the form.. urgently [message #146719] |
Sun, 13 November 2005 00:48 |
ashraf_arif59
Messages: 35 Registered: March 2005 Location: Pakistan
|
Member |
|
|
can iget the session information
story is that
i have logon from (form) with scott/tiger
i check that in v$_session table e has the information
about the scott session
it generated the new sid,logontime,user.client information
when i exit from form
in v$_session the information is also finish
i want to ask the question
can form has the information of this session and sid of this session that oracle automatically insert into v$_session?
if form has the information then how i can get it from form;
|
|
|
|
|
|
|
Re: can i get the session information in the form.. urgently [message #147534 is a reply to message #147508] |
Fri, 18 November 2005 02:13 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Have you checked the manuals yet?
Oracle9i SQL Reference Release 2 (9.2) |
SYS_CONTEXT ( 'namespace' , 'parameter' [, length] )
SYS_CONTEXT returns the value of parameter associated with the context namespace. You can use this function in both SQL and PL/SQL statements.
For namespace and parameter, you can specify either a string (constant) or an expression that resolves to a string designating a namespace or an attribute. The context namespace must already have been created, and the associated parameter and its value must also have been set using the DBMS_SESSION.set_context procedure. The namespace must be a valid SQL identifier. The parameter name can be any string. It is not case sensitive, but it cannot exceed 30 bytes in length.
The datatype of the return value is VARCHAR2. The default maximum size of the return value is 256 bytes. You can override this default by specifying the optional length parameter. The valid range of values is 1 to 4000 bytes. (If you specify an invalid value, then Oracle ignores it and uses the default.)
Oracle9i provides a built-in namespace called USERENV, which describes the current session.
|
So, it is a function returning a VARCHAR2(30) value of a given parameter. If you use USERENV, you are using the built-in namespace for the current session.
If this wouldn't work from Forms, create a function on the database side returning the parameter's value. You should be able to figure this out yourself .
MHE
|
|
|
|
Re: can i get the session information in the form.. urgently [message #147566 is a reply to message #147551] |
Fri, 18 November 2005 04:22 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Ok, this is exactly the reason why we ask for DB version and Forms version. 8.0.5 was bug prone and is desupported quite some time now.
In your version, you still have to use the old
function.
[edit]I just saw the 'urgently' in your title:
how can it be urgent if the version you use is desupported? No official production box runs desupported software I hope.
MHE
[Updated on: Fri, 18 November 2005 04:24] Report message to a moderator
|
|
|
|