Home » SQL & PL/SQL » SQL & PL/SQL » login user - user with actual db handle
login user - user with actual db handle [message #419254] Thu, 20 August 2009 13:21 Go to next message
webdino73
Messages: 15
Registered: August 2005
Junior Member
Hello,
can I read the connected user and server from a pl/sql procedure?
I want to read the user that connect the pl/sql procedure and execute it, for a decide in the procedure.
If it is user1 then the procedure should do an action, if it is user 2 then the procedure should do nothing.

Is there a system variable or a table to read from it?
Thanks for help
Re: login user - user with actual db handle [message #419255 is a reply to message #419254] Thu, 20 August 2009 13:23 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>Is there a system variable or a table to read from it?
V$SESSION

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.

2 or 3 tier application?

In some/many/most application the end user does not log into DB using his own schema.

So, it depends!
Re: login user - user with actual db handle [message #419256 is a reply to message #419254] Thu, 20 August 2009 13:27 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
If it is user1 then the procedure should do an action, if it is user 2 then the procedure should do nothing.

USER

Regards
Michel
Previous Topic: DBMS_UTILITY.FORMAT_ERROR_BACKTRACE returned value
Next Topic: ORA-08177
Goto Forum:
  


Current Time: Sat Dec 10 12:47:04 CST 2016

Total time taken to generate the page: 0.08905 seconds