Home » Developer & Programmer » Forms » Problem with Sys_Context
Problem with Sys_Context [message #178475] Wed, 21 June 2006 04:21 Go to next message
Rehan Mirza
Messages: 67
Registered: July 2004
Location: Pakistan
Member

I am trying to get Os_User name with this Sql Statement, but it give me error i m user "Oracle8i Enterprise Edition Release 8.1.5.0.0"

SQL> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
SELECT sys_context('USERENV', 'OS_USER') FROM dual
*
ERROR at line 1:
ORA-02003: invalid USERENV parameter

is any other way to get Os_User?? except this one????

select osUser from v$Session
where UserName = User
and status = 'ACTIVE';

Thanks in advance

take care
Re: Problem with Sys_Context [message #178482 is a reply to message #178475] Wed, 21 June 2006 04:33 Go to previous messageGo to next message
manwadkar
Messages: 104
Registered: September 2005
Location: Washington DC
Senior Member

It works on my machine.
Re: Problem with Sys_Context [message #178483 is a reply to message #178475] Wed, 21 June 2006 04:35 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
In Oracle 8iR1 (8.1.5)? Not that I know of. In 8.1.7 OS_USER is a known SYS_CONTEXT parameter. With your desupported database (never considered an upgrade?) you're stuck with V$SESSION I'm afraid...

MHE
Re: Problem with Sys_Context [message #178485 is a reply to message #178482] Wed, 21 June 2006 04:36 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
manwadkar wrote on Wed, 21 June 2006 11:33

It works on my machine.

And you are working with 8.1.5 too?

MHE
Re: Problem with Sys_Context [message #178486 is a reply to message #178485] Wed, 21 June 2006 04:37 Go to previous messageGo to next message
manwadkar
Messages: 104
Registered: September 2005
Location: Washington DC
Senior Member

I am on Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
Re: Problem with Sys_Context [message #178495 is a reply to message #178486] Wed, 21 June 2006 04:50 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
manwadkar wrote on Wed, 21 June 2006 11:37

I am on Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
There you go then. We were talking about version 8.1.5 where SYS_CONTEXT was just introduced as a replacement for the old USERENV function. Unfortunately this function didn't offer much more extra until Oracle 8.1.6. As of that version you can use OS_USER as a valid SYS_CONTEXT parameter. You can check the documentation yourself.

MHE
Previous Topic: Deploying on Linux
Next Topic: Sorting the Block after Querying values
Goto Forum:
  


Current Time: Fri Sep 20 09:30:49 CDT 2024