DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Difference between user and login_user ?

  1. #1
    Join Date
    May 2001
    Posts
    8
    Hi,

    what is the difference between
    the use of the keyword user and
    the select of the sys.login_user ?

    Thanks in advance
    O. Oelsner

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    USER --> this is oracle function that return USER_NAME (or USERNAME)

    column sys.login_user --> not exists on oracle dictionary:

    SQL> select table_name, COLUMN_NAME from dba_tab_columns where COLUMN_NAME like '%LOGIN_USER%';
    no rows selected

    login_user as function -->
    function login_user return varchar2 ;
    pragma interface (C, login_user);
    pragma restrict_references (login_user, WNPS, RNPS, WNDS);

    u can use in external procedures on c (c++).

    [Edited by Shestakov on 05-13-2002 at 03:12 PM]

  3. #3
    Join Date
    Nov 2024
    Posts
    2
    Quote Originally Posted by OOelsner View Post
    Hi,
    what is the difference between
    the use of the keyword user and
    the select of the sys.login_user ?
    The latter works through database links, e.g.

    Code:
    SQL> SELECT user, sys.login_user@dblink_name remuser FROM dual;
    
    USER      REMUSER
    --------- -------
    SCOTT     SOMEONE

  4. #4
    Join Date
    Apr 2011
    Location
    Largo, FL.
    Posts
    47
    NOTE: This thread was started 22 YEARS ago.

  5. #5
    Join Date
    Nov 2024
    Posts
    2
    > NOTE: This thread was started 22 YEARS ago.

    Nonetheless, google still finds this topic if you search for "Oracle user vs sys.login_user", so it can be useful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width