1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Schema path

Discussion in 'SQL PL/SQL' started by Madhu.R, Apr 23, 2019.

  1. Madhu.R

    Madhu.R Starter

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    California
    How to know what schemata are available to me in my session? When I login as MY_NAME, my MY_NAME would be my CURRENT SCHEMA (which I could change with SET CURRENT SCHEMA statement). SELECT * FROM ALL_OBJECTS would show all objects from 'all schema' that are available to me. But how can I find what schemata are available to me and in what order?
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    777
    Likes Received:
    148
    Trophy Points:
    830
    Location:
    Russian Federation
    1)
    for example:
    Code (SQL):

    SELECT sys_context('userenv','proxy_user'),sys_context('userenv','session_user') , sys_context('userenv','current_user') FROM dual;
     
    2) "But how can I find what schemata are available to me and in what order?"

    "ALL_OBJECTS describes all objects accessible to the current user."

    That's full of list of schemes accessibility to you.
    Code (SQL):

    SELECT DISTINCT owner FROM  all_objects;
     
     
    Last edited: Apr 24, 2019