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**$$$$$$$
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.
291 Total Views, 1 Views Today
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?
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!