Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Location
    BA [ARG]
    Posts
    137

    Unanswered: Get altered username

    Is there a view or something like 'show user' to get the username after I altered the user?

    For example:
    Code:
    connect user1/***
    alter session set current_schema=user2
    Can I retrieve "user1" from within user2?

    I searched but couldn't find anything (all_users doesn't work for me).

    Thanks in advance!
    Saludos!!
    Last edited by DKG; 09-22-04 at 11:04. Reason: Mistake

  2. #2
    Join Date
    Apr 2004
    Posts
    246
    v$session.schemaname

    or

    SYS_CONTEXT ('userenv', 'current_schema')
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  3. #3
    Join Date
    May 2004
    Location
    BA [ARG]
    Posts
    137
    Thanks, shoblock!

    v$session.schemaname is not good for me, because user doesn't have privs for that view.

    What I didn't know is this marvellous line...

    SYS_CONTEXT ('userenv', 'current_schema')

    Thanks!

Posting Permissions

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