I then waited 5 seconds and queried the CTIME column in SYS.USER$ for BLAH. This showed 16:11:05 on 27th May 2016 i.e. the date and time when the role was created:
SQL> select to_char(sysdate,'DD-MON-YY HH24:MI:SS')
2 date_and_time1
3 from dual
4 /
DATE_AND_TIME1
------------------
27-MAY-16 16:11:05
SQL> create role blah
2 /
Role created.
SQL> select to_char(sysdate,'DD-MON-YY HH24:MI:SS')
2 date_and_time2
3 from dual
4 /
DATE_AND_TIME2
------------------
27-MAY-16 16:11:05
SQL> exec dbms_lock.sleep(5);
PL/SQL procedure successfully completed.
SQL> select to_char(sysdate,'DD-MON-YY HH24:MI:SS')
2 date_and_time3
3 from dual
4 /
DATE_AND_TIME3
------------------
27-MAY-16 16:11:10
SQL> select to_char(ctime,'DD-MON-YY HH24:MI:SS')
2 role_created
3 from sys.user$
4 where name = 'BLAH'
5 /
ROLE_CREATED
------------------
27-MAY-16 16:11:05
SQL>
No comments:
Post a Comment