1 Reply Latest reply on Jul 29, 2015 12:37 PM by thatJeffSmith-Oracle

    Error in Sqldev 4.1 when filtering objects among other users

    KarstenH-dk

      Hi

       

      Tried to look for users who has object_count>0 and found an error I think.

       

      What I did:

       

      Went to the entry "Other Users" (in the connection which I would investigate).

      Applied a filter object_count > 0 which gave me a list of users;  but missing some which were expected to have object_count>0

       

      Looking into it (statements-log )  I found the query which SQL*developer applies to find the users and it is

       

      select * from (select USERNAME

      FROM SYS.ALL_USERS au

      WHERE au.USERNAME != USER

      ) WHERE (select count(1) from all_objects where USERNAME = OWNER) > 0;

       

      i.e all the objects which the user has access  (not those to which the user actually owns) !!

       

      but I think it ought to bee

       

      select * from (select USERNAME

      FROM SYS.ALL_USERS au

      WHERE au.USERNAME != USER

      ) WHERE (select count(1) from dba_objects where USERNAME = OWNER) > 0;


      i.e all the objects which the user  actually owns)

       

       

      regards Karsten