Friday, 16 November 2012

How to find the date when a role was created?

The view DBA_ROLES doesn’t have the created date column to display when the role was created, but the information is stored in sys.user$ the underlying table. So using the following query one can find the date the role was created.

SQL >>  select name, to_char(ctime, ‘DD-MON-YYYY HH24:MI:SS’) from sys.user$ where name = ‘RESOURCE’;
——– —————————————–
RESOURCE 22-JUL-2005 00:42:50


select, to_char(a.ctime, 'DD-MON-YYYY HH24:MI:SS') ,a.*  from sys.user$ a order by ctime desc;

No comments: