User in dba_role_privs column

Oracle 11.2.0.1

Windows

SQL > show user;

The USER is 'SCOTT '.

SQL > dba_role_privs desc;

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

DEALER VARCHAR2 (30)

GRANTED_ROLE NOT NULL VARCHAR2 (30)

ADMIN_OPTION VARCHAR2 (3)

DEFAULT_ROLE VARCHAR2 (3)

SQL > select * from dba_role_privs where user = 'SCOTT ';

DEALER GRANTED_ROLE SMA DEF

------------------------------ ------------------------------ --- ---

SYS YES YES XDB_SET_INVOKER

SYS YES YES XDBADMIN

..

..

DEALER GRANTED_ROLE SMA DEF

------------------------------ ------------------------------ --- ---

SCOTT PLUSTRACE NO YES

SCOTT CONNECT NO YES

IX SELECT_CATALOG_ROLE NO YES

IX AQ_USER_ROLE NO YES

147 selected lines.

My question is where Oracle become user column, when there is no user mode dba_role_privs column.

Thank you.

The USER is a pseudo-column that identifies the currently logged in user.  If a "user ="SCOTT"will always return TRUE any table you are querying."

Hemant K Collette

Tags: Database

Similar Questions

  • List of tables of objects or the user-defined type columns

    Hello

    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    I have n number of tables in my db, since I have several
    tables containing "user defined type columns.
    so, how can I get/list db objects that contains the user-defined type columns only.
    Please suggest me on this

    Kind regards
    Faiz

    Dear Sir

    I have n number of tables in my db,from that i have several
    tables which contains"user defined type columns"
    so how could i get/list the db objects which contains user defined type columns only.
    Kindly suggest me on this
    

    Use this

    select
          tab.table_name
        , tab.column_name
        , tab.data_type
    from
        user_tab_columns tab
      , user_types typ
    where
        tab.data_type = typ.type_name
    order by
        tab.table_name
        ;
    

    Best regards

    Mohamed Houri

  • Restict read only users in some columns

    Hi guys,.

    I want to restrict read-only users to read only some of the columns on the table. How can I go on the limitation?

    Always include the following information when you ask a question:


    • Full version of APEX

    • Complete operating system DB, version, edition, host

    • Architecture of Web server (EPG, SST or APEX listener/host operating system)

    • Browser (s) and version (s) used

    • Theme

    • Model (s)

    • Region/item (s)

    935462 wrote:
    Hi guys,.

    I want to restrict read-only users to read only some of the columns on the table. How can I go on the limitation?

    Who are the users of readonly? How are they determined?

    What exactly are you talking about?

    Is this a report, if so which report interactive or classic?

    In one of them, you can make a conditional display of column with the same login

    Look at this for options http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_att.htm#BCEBDIFA

  • How to enable protection of the status of link column of calendar user session level

    I activated the user session level State protection in my application. Attributes column report, link to the column, page checksums, I choose "reusable level-link current per user.
    However for the link column calendar, there is no option for me to choose and by default is using "session-level". Is there a way to change session level protection at the level of the user to link column of calendar?

    Cheng-Lu,

    Please ask about this, it is a very good question. When we implemented this feature in version 2.0 of the product, us does not control over the type of checksum in the links (3 types) but for two situations: 1) declare links, as you noted, and links 2) dynamically generated as you can produce in your SQL report or in a region of PL/SQL. For the latter case, you must use the apex_util.prepare_url function to generate a link, passing the type of checksum by the signature of the function:

    FUNCTION PREPARE_URL RETURNS VARCHAR2
     Argument Name                  Type                    In/Out Default?
     ------------------------------ ----------------------- ------ --------
     P_URL                           VARCHAR2               IN
     P_URL_CHARSET                   VARCHAR2               IN     DEFAULT
     P_CHECKSUM_TYPE                 VARCHAR2               IN     DEFAULT
    

    It wouldn't be a bad idea for us to treat the calendar links as we do report links. However, until we come back, it's a possible workaround solution: tell your link to calendar for the current application, page 10 and assigns to P10_ITEM with a value & P1_ITEM... Edit this link to access a new page of 100 with the same session state settings, when the 100 page requires a checksum. On page 100, create a process before heading to do this:

    owa_util. REDIRECT_URL (apex_util.prepare_url (p_url =>'f? p =' |: APP_ID |)) ' : 10 :' || : APP_SESSION. '::NO::' || P10_ITEM | ':' || ((: P1_ITEM, p_checksum_type => 'PRIVATE_BOOKMARK'));

    So if the user clicks on the link to the calendar, the visible URL in the location window should be in the form:

    http://host/pls/dad/f? p = app_id:10:session:NO:P10_ITEM: cs & some-value = 26A9030462248D4723CF46ABD4F5AA10A

    This link contains a checksum of the user level and can be bookmarked and reused later by the same user.

    Please let me know if it works for you.

    Scott

    Published by: sspadafo on May 16, 2009 09:49 to prove the use of p_checksum_type in prepare_url

  • Sorting of columns controlled user

    Hello

    I would like to create a dashboard that allows the user to change the sort order on the columns, as they wish without going into the design. For example, I would like the user to be able to sort on the columns of the pivot table quantity and totalamount. Is this possible in OBIEE? If so, how? I can't find it in the documentation.

    Thank you!

    You can do this in a table view (click the properties icon in the design of the Table), but allowing users to sort columns in Table Pivot mode is not allowed. I'm sorry.

  • How to find the ROLE of all 10 GB DB users

    Is there a way to discover the ROLE of all users in the database. Is there any DISPLAY for it.

    THX

    Hello

    Some scripts:

    PROMPT
    PROMPT
    PROMPT ******************************************** ROLES AND PRIVILEGES
    PROMPT
    PROMPT ******************************************** USER ROLES
    
    SELECT grantee user, granted_role, admin_option, default_role
    FROM dba_role_privs
    WHERE grantee IN (SELECT username FROM dba_users) AND
          grantee NOT LIKE '%SYS%' AND
          grantee NOT IN ('DBSNMP','OUTLN')
    ORDER BY grantee;
    
    PROMPT
    PROMPT ******************************************** USER PRIVILEGES
    
    SELECT grantee user, privilege, admin_option
    FROM dba_sys_privs
    WHERE grantee IN (SELECT username FROM dba_users) AND
          grantee NOT LIKE '%SYS%' AND
          grantee NOT IN ('DBSNMP','OUTLN')
    ORDER BY grantee;
    
    set pages 58
    column role         format a19 heading 'User or Role'
    column admin_option format a3  heading 'Ad?'
    column owner        format a7 heading 'Owner'
    column table_name   format a26 heading 'Table name'
    column privilege    format a21 heading 'Priv, Grant or Role'
    column r_ord noprint
    break on role
    start titel132 'ORACLE ROLES REPORT'
    select
      2 r_ord, b.role role, b.owner owner, b.table_name,
      b.privilege privilege, b.grantable admin_option
    from
      sys.role_tab_privs b
    union
    select
      1 r_ord, a.role role, 'N/A' owner, 'N/A' table_name,
      a.privilege privilege, a.admin_option admin_option
    from
      sys.role_sys_privs a
    union
    select
      3 r_ord, c.role role, 'N/A' owner, 'N/A' table_name,
      c.granted_role privilege, c.admin_option admin_option
    from
       sys.role_role_privs c
    order by
       role,r_ord;
    set flush on term on pagesize 22  linesize 80
    clear columns
    clear breaks
    ttitle off
    pause Press enter to continue
    

    I hope this will help you.

    See you soon,.

    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • 5.4 ACS import users with date field expiration

    Hello

    between the fields of import model file (add or update) for internal users is no column for expiration date)

    ( http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.4/user/guide/my_wkspc.html#wp1057769). This field is also set for the export file.

    My question is: (how) is it possible existing import new users (or update) internal db with expiration date field?

    --

    Martin

    Don't know if it's any consolation, but there is only a CDETS open on this issue

    CSCuf16224: no Import / Export for user internal "disable account if Date is:

    I'm not aware of any planning closed again to solve this problem

  • Display the column name of the column more recently updated

    I wonder if it is possible to display the name of the column in the column most recently updated in a table.

    Example:

    Emp table

    Name

    Height

    Weight

    Age

    Update_Date

    Update_Column

    Original record (03/20/14)

    Name size weight Age Update_date Update_Column

    John                                                 03/20/14          Name

    Then someone comes and update the height on 22/03/14:

    Name size weight Age Update_date Update_Column

    John 5'9 03/22/14 height

    And the Update_date and the Update_column would change again if someone came and put a value for the age. And so on.

    Is this possible?

    Also, if the above is possible, would it be possible to display the name of extreme right column if a user updated several columns at the same time?

    Example:

    User updates the sub-folder:

    Name size weight Age Update_date Update_Column

    John 5'9 03/22/14 height

    And adds weight and age at the same time on 24-03-14:

    Name size weight Age Update_date Update_Column

    John 5'9 150 31 03/24 / 14

    The Update_Column would display age because it is the furthest to the right. (Think by reading from left to right, the column that has been updated if the extreme right)

    So to sum things, I need to be able to display Updated_date (which will be the date of the day when the record is the last updated) and Updated_Col (which is the column name of the column was last updated, and if multiple columns are updated then display that value has been updated last in)

    I hope that the examples help to clarify things.

    Thank you

    Steven

    I think I found a solution.

    delimiter //
    create table a (
      id int (10) unsigned auto_increment,
      a int(10),
      b int(10),
      update_date datetime NULL,
      update_column varchar(16) NULL,
      primary key (id)
    )//

    create trigger bu_a before update on a for each row begin
      set NEW.update_date = NOW();
      set NEW.update_column = NULL;
      -- you need to start with the rightmost column if you want
      -- that matched with the highest priority
      if OLD.b != NEW.b then
       set NEW.update_column = "b";
      elseif OLD.a != NEW.a then
       set NEW.update_column = "a";
      end if;
    end //

    TEST

    insert into a (id,a,b) values (1,1,1), (2,1,1), (3,1,1), (4,1,1)[
    update a set b = 2 where id = 2;
    update a set a = 2 where id = 3;
    update a set a = 2 where id = 4;
    update a set b = 2 where id = 4;
    select * from a;

    DISPLAY

    ID  A   B   UPDATE_DATE                    UPDATE_COLUMN
    1   1   1   (null)                          (null)
    2   1   2   March, 24 2014 23:22:33+0000      b
    3   2   1   March, 24 2014 23:22:33+0000      a
    4   2   2   March, 24 2014 23:22:33+0000      b

  • Dynamic columns to fit the APEX 4.2 screens

    Hello

    I developed an interactive report in APEX 4.1 that displays data as a table with three columns (see query below). I want to dynamically set the number of columns depending on the size of the screen. For example, a smart phone should probably only display a single column and a 20 "+ monitor could hold five or six columns."
    create table photo
    (id number,
    last_modified date);
    
    select   trunc(last_modified, 'hh') hour_modified,
             -- Groups rownumbers into 3-columns-per-row         
             max(decode(mod(rn, 3), 1, last_modified, null)) modified1, 
             max(decode(mod(rn, 3), 2, last_modified, null)) modified2, 
             max(decode(mod(rn, 3), 0, last_modified, null)) modified3,
             max(decode(mod(rn, 3), 1, id, null)) id1, 
             max(decode(mod(rn, 3), 2, id, null)) id2, 
             max(decode(mod(rn, 3), 0, id, null)) id3
    from     (select   p.id,
                       p.last_modified,
                       row_number() over (partition by trunc(p.last_modified, 'hh') order by p.last_modified) rn
              from     photo p)
    group by trunc(last_modified, 'hh'),
             -- Groups rownumbers into 3-columns-per-row
             ceil(rn/3)
    order by hour_modified,
             modified1;
    As you can see, I'm currently hardcode the number of columns using the decoding functions and mod. thanks for the help!

    Yes

    I don't think you can use an instance of interactive report in this situation.

    In addition to needing a different report for each #columns you want to host.
    A lot of the interactive report features must be switch of.
    For example the column selection. Do not want users of the column Photo1. Because then the photo 1, 4, 7 are not shown.

    The column break actualy breeze your go see [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTIR & c = VANBAREN] this example
    The report should be ordered on the family name and Department

    I've implemented for examples that shows grouped by Department employees where the number of employees next to each other depends on the room that is available.
    [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTGENERIC & c = VANBAREN] The first uses a generic and breaking definend by the report model.
    [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:FLUENTNAMED & c = VANBAREN] The second one uses a named column model and uses the condition of models for breaking.

    This approach allows you to control not only on your go. You can display more information. It becomes possible screen time that the picture was taken under the photo by simply adding the column to the statement select source.
    And you have more control over the design, because decide you the used attributes and CSS classes.

    Nicolette

    Published by: Nicolette on 15-dec-2012 22:06
    Change the url of the demo application. After the alias of application not being not only more.

  • What SYS tables (not seen) contains the value NULL spec /not/ column definition?

    What SYS (or tables) store the value of a spec /not/ NULL columns? (It doesn't seem to be COL$)

    NOTE: This is NOT a trick question - although it seems to be.

    Test configuration:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Test configuration:
    1. a table is created by SCOTT in the SCOTT schema with a NULLABLE column.

    2. a primary key constraint is added using only the NULLABLE column

    3. Requests for information on USER_TAB_COLS, ALL_TAB_COLS, DBA_TAB_COLS and SYS. COL$ see NOT NULL for the column NULLABLE
    as necessary for a primary key constraint. Views derive their data from the column of $ NULL the sys. Table of $ COL
    using
    'DECODE (SIGN (c.null$), -1, 'D', 0, 'Y', 'N'),
    and the table of $ COL shows a numerical value of '0' before you add the primary key and a value of "1" later.

    4. a query on the DDL metadata table shows the specification for column NULLABLE of origin involved.

    Question - where this original specification NULLABLE is stored?

    This question is based on a question asked by another user in this thread
    Columns becoming nullable after a fall of primary key?

    I created the following specially for that matter test case
    -- scott ensures table does not exist
    DROP TABLE tbl_test CASCADE CONSTRAINTS;
    
    -- scott creates a table
    CREATE TABLE tbl_test ( col_1 NUMBER,
    col_2 NUMBER NOT NULL);
    
    -- scott queries to check the the column nullable status
    SELECT table_name, column_name, nullable 
    FROM user_tab_cols
    WHERE table_name = 'TBL_TEST';
    
    -- TABLE_NAME | COLUMN_NAME | NULLABLE
    -- TBL_TEST   | COL_1       | Y 
    -- TBL_TEST   | COL_2       | N 
    
    -- Scott addes a primary key constraint using only the nullable column
    ALTER TABLE tbl_test ADD CONSTRAINT tbl_test_pk PRIMARY KEY(col_1);
    
    -- scott queries to check the the column nullable status
    SELECT table_name, column_name, nullable 
    FROM user_tab_cols
    WHERE table_name = 'TBL_TEST';
    
    TABLE_NAME,COLUMN_NAME,NULLABLE
    TBL_TEST,COL_1,N
    TBL_TEST,COL_2,N
    
    -- scott queries to get the table DDL
    select dbms_metadata.get_ddl('TABLE', 'TBL_TEST', 'SCOTT') FROM DUAL;
    
    DBMS_METADATA.GET_DDL('TABLE','TBL_TEST','SCOTT')
    
      CREATE TABLE "SCOTT"."TBL_TEST" 
       (     "COL_1" NUMBER,                   <------ where is this NULLABLE spec stored? 
         "COL_2" NUMBER NOT NULL ENABLE, 
          CONSTRAINT "TBL_TEST_PK" PRIMARY KEY ("COL_1")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOCOMPRESS LOGGING
      TABLESPACE "USERS"  ENABLE
       ) SEGMENT CREATION DEFERRED 
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" 
    The DOF shows that Oracle keeps the original spec NULLABLE for the column and uses it to generate the DDL orginal, even if there is a primary key on the table and the system views (and COL$) show the column non NULLABLE.

    So where is the original information NULLABLE actually stored?

    rp0428 wrote:
    What SYS (or tables) store the value of a spec /not/ NULL columns? (It doesn't seem to be COL$)

    I think that it becomes a bit messy depending on order of activity:

    You can see Col. .null$ is set to a non-zero when the desrcibe command displays the column as not null, but it can happen for two reasons:
    (a) user sets the column as not null - in which case you get a line in cdef$ with type # = 7
    (b) the user adds a primary key to table - in which case you get a line in cdef$ with type # = 2

    If you declare null AND add a primary key, you get two lines - that's why it is possible for Oracle to determine if he should remove the flag not null when you remove the primary key and also allows dbms_metadata show the create statement of table without a NOT NULL even when describe it the watch with a NOT NULL - dbms_metadata can respond to the presence of the type # = 2 and absence of the type # = 7.

    Concerning
    Jonathan Lewis

    By the way: by a strange coincidence, it seems to me answering the previous post, three days before it was asked: http://jonathanlewis.wordpress.com/2012/04/19/drop-constraint/#comment-46140 (on the doubts, this isn't - it answers a different question on the removal of constraints).

    Published by: Jonathan Lewis April 23, 2012 11:07

  • Sum of columns using Formcalc

    I created a form with 12 columns and 23 fixed lines. In line 1 of table is a value, the 22 remaining lines allow the user to enter a number, what I would like task is in the footer line power add up the figures in 22 columns and then multiple that by rank value for a total 1.

    Any help would be appreciated.

    Hi Steve,.

    for now, I'll send your pdf with the calculation script.

    You must use the following script in each column in the total field

    -Sterling is the objectname in the user input in column 1 in each row field

    -Various is the objectname in the user input in column 1 in each row field

    - ...

    Column $ = Sum(Row1[*].Sterling)* Row1.TTValue
    Columns $ = Sum(Row1[*].Other)* Row1.OtherValue
    Column $ = Sum(Row1[*].Banking)* Row1.BankingValue
    

    You understand that?

    You must use the [*] the repeated thing, in your, this is the Row1. You can see on the Row1 [0]... Row1 [1). And your amount, for example 4 oder 7.50 needs a static cross reference by column.

    I hope I could help?

    Mandy

  • Get the columns returned by the query without running

    I have a table that stores SELECT queries in a column. I developed a .net application where the interesting thing for the user is what columns of the following SELECT statement returns. Currently, I load the sql as an OracleCommand object CommandText and fill a DataTable using an OracleDataAdapter object. I then read the names of the columns of the table filled. The data is not fully used. Requests can take up to 15 seconds to run. Because I do not used the data, I was hoping to eliminate the actual recovery of data and reduce the time needed to retrieve the records. Is it possible to analyze the statement for the colunm names with it makes the request for enforcement? Thank you.

    I imagine that there is a way you can search in the data dictionary, but you can also try to add 'WHERE 1 = 0' If you want the metadata.

    It will be useful,
    Greg

  • How to capture the users of information fromRPD

    Hi Experts,

    I have x, user Y z in RPD. They're back writing. How to capture their username in the responses. \


    Thnaks
    V

    You can assign the variable user to session system in a column where the writeback is used
    put VALUEOF (NQ_SESSION. The USER) in fx of the column. so when X the user connects, the column is filled with the value 'X' and this value can be rewritten to db.

  • What is the user of the table of contant of the LTS

    Hi all

    can we create a measurement base shaved with hierarchies?

    What is the user of the column option (global content group by) on the content tab

    When I select the option column, under table I can find at any table and logical column section all the columns in the table

    It is only for the aggregation tables (content tab (content global group, by)?)
    or any other use of it?

    Thank you
    Françoise

    Françoise,

    Example of creating Sources for each level of aggregate data is

    In addition to creating the source of the table of facts together, you create sources table logical dimension corresponding to the same levels of aggregation.

    NOTE: If already exist sources at each level, you need not create new ones. You must have a source at each level specification total contained at least referenced.

    For example, you might have a monthly sales table containing a precalculated amount of revenue for each product in each store each month. You must have the other three sources, one for each of the logical dimension referenced in the example tables:

    Another for the logical table produced with one of the following contained specifications:
    o by logical level: ProductDimension.ProductLevel
    o by column: Product.Product_Name
    * A source for the logical table of store with one of the following contained specifications:
    o by logical level: StoreDimension.StoreLevel
    o by column: Store.Store_Name
    * A source for logical time table with one of the following contained specifications:
    o by logical level: TimeDimension.MonthLevel
    o by column: Time.Month

    Source: http://download.oracle.com/docs/cd/E12103_01/books/admintool/admintool_BusModSetup14.html#wp1028871
    Fix? ;)

    Thank you
    saichand.v

  • Get a variable name for a connected user

    My application displays dynamic elements based on the value of a variable userid i.e. If userid is 1, all the items in my collection of table with 1 user ID will be displayed in a tilelist component.

    What I want to do, is to have a log in the system which will connect users but also to get the ID for this specific user and set it as my userid variable in my application, so the app knows what the user is connected and can display information related to that user.

    My mysql table that stores all users has the columns user ID (the value I want which is specific to each user) user name and password.

    I've been using this tutorial that lets the user open a session and if the connection is successful, a message is displayed, but this solution does not have the application store that the user is connected through userid: -.

    http://cookbooks.Adobe.com/post_Create_a_login_system_with_Flex_and_PHP-7243.html

    Can someone give me advice on how to do or what I need to do to change this example to get the user ID for the user that is logged into my userid variable in my application please or recommend something similar?

    This is the PHP code. Let me know if you need Flex code as well. I tried to comment as much as possible. Let me know if you need clarification on any room.

    \n";
         $xmlOutput .= "\n";
         $xmlOutput .= "$message\n";
         $xmlOutput .= "$data\n";
         $xmlOutput .= "$function\n";
         $xmlOutput .= "\n";
    
         echo $xmlOutput;
    }
    
    ?>
    

    Sorry for the late response. I had to attend a workshop.

Maybe you are looking for