()

How to Find Role Creation Date in Oracle


In this article, we will prepare an SQL command for How to Find ROLE Creation Date in Oracle. View DBA_ROLES doesn’t have a column for ROLE creation date however we fetch other information about ROLE after creation. To achieve it we use the base table SYS.USER$ of DBA_ROLES. Table SYS.USER$ has column CTIME to fulfill this requirement.


TYPE#:
0 for ROLE, 1 for USER.
NAME: Name of USER or ROLE
CTIME: Creation date.


Execute the below command to find the ROLE creation date timestamp.

COL NAME FORMAT A25
COL CREATE_TIME FORMAT A25
SELECT TYPE#, NAME, TO_CHAR(CTIME,'DD-MON-YYYY HH24:MI:SS') CREATE_DATE_TIME FROM SYS.USER$ WHERE NAME = 'USER_GRANT_READ_ONLY';
prompt$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$
     TYPE# NAME                      CREATE_DATE_TIME
---------- ------------------------- -----------------------------
         0 USER_GRANT_READ_ONLY      03-JUN-2021 12:08:30

SQL>
$$$$$$$**Welcome to DBsGuru!**Share Learn Grow**$$$$$$$


Click here to know more about How to Grant READ ONLY Access on Schema Using ROLE in Oracle.


We always encourage the technical person to visit 
section SCRIPTS to get more daily usage SQL commands.


Hope so you like this Script
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the latest update. Click here to know more about our pursuit.


Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

DBsGuru

Hello and welcome to DBsGuru,DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!Share Learn Grow!