dbTalk Databases Forums  

Read username from OS

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Read username from OS in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: Read username from OS - 02-12-2004 , 11:01 AM






Kiko wrote:
Quote:
Only valid for Oracle 9.2 and latter versions?
My D.B. server has Oracle 8.0.6 versión.
I try to run:
SELECT sys_context('USERENV', 'USERNAME')
FROM dual;

with error.

----

¿Esta función solo es válida para la versión 9.2 de Oracle, y posteriores?
Mi servidor Oracle tiene la 8.0.6.

Intenté ejecutar :
SELECT sys_context('USERENV', 'USERNAME')
FROM dual;

dándome error.
If SYS_CONTEXT is not available in 8.0.6 ... first choice would be
to upgrade to something supported this century. If not possible
look at columns in v_$session.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
http://www.outreach.washington.edu/e...oa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)



Reply With Quote
  #12  
Old   
Niall Litchfield
 
Posts: n/a

Default Re: Read username from OS - 02-13-2004 , 08:30 AM






as it turns out Oracle8 USERENV doesn't identify the osuser anyway.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
"Bricklen" <bricklen-rem (AT) yahoo (DOT) comz> wrote

Quote:
Kiko wrote:

SQLWKS> SELECT SYS_CONTEXT ('USERENV', 'CURRENT_USER') from dual;
SELECT SYS_CONTEXT ('USERENV', 'CURRENT_USER') from dual
*
ORA-00904: nombre de columna no válido - I translate : (Column name not
valid)
SQLWKS
SQLWKS> SELECT SYS_CONTEXT ('USERENV', 'OS_USER') from dual;
SELECT SYS_CONTEXT ('USERENV', 'OS_USER') from dual
*
ORA-00904: nombre de columna no válido



read the rest of my post (and Niall's) about USERENV, and follow the
link I provided you.



Reply With Quote
  #13  
Old   
Bricklen
 
Posts: n/a

Default Re: Read username from OS - 02-13-2004 , 09:42 AM



Niall Litchfield wrote:

Quote:
as it turns out Oracle8 USERENV doesn't identify the osuser anyway.

Not to mention that that link stinks. If you actually follow it, you
have to do a search through that java popup for USERENV, then find it in
the expressions/functions section, then search the page for that term,
only to discover that it doesn't do what he/she wanted to in the first
place.





Reply With Quote
  #14  
Old   
Ahmed Baraka
 
Posts: n/a

Default Re: Read username from OS - 02-22-2004 , 06:05 AM



in what versions the function SYS_CONTEXT is available? can it be used in
Oracle8?

"Daniel Morgan" <damorgan@x.washington.edu> wrote

Quote:
Sybrand Bakker wrote:

On Wed, 11 Feb 2004 13:06:36 +0100, "Kiko" <kiko (AT) terra (DOT) es> wrote:


Anybody can help me?


Check out the sys_context function in the SQL reference manual.


--
Sybrand Bakker, Senior Oracle DBA

SYS_CONTEXT function information can be found at
http://tahiti.oracle.com and at
http://www.psoug.org/reference/library.html.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
http://www.outreach.washington.edu/e...oa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.