I have a non-admin login to an Oracle database, and I'd like to check when my password expires. I've found a lot of information online about getting password expiration dates by querying on the DBA_USERS
table -- but I do not have privileges to view that table.
I'm hopeful that Oracle includes a way for me to check password expiration for my own login, but so far I've been unable to find any queries except those that reference the DBA_USERS
table.
Is there a way for me to determine when my own password expires without putting in a ticket to the DBA?
select * from USER_USERS; That will have a column name "expiry_date" which has the data you ask for.
PASSWORD_LIFE_TIME: -- The number of days the same password can be used for authentication. For a user to whom this profile is enforced for the 1st time , the password will have to be changed after a year. And then once changed, oracle will again ask after a year.
In order to get ACCOUNT_STATUS = EXPIRED(GRACE) you have to logon with this user, otherwise the status does not change. Then you should see it: SELECT ACCOUNT_STATUS FROM DBA_USERS WHERE USERNAME = 'RDJ7'; ACCOUNT_STATUS -------------------------------- EXPIRED(GRACE) 1 row selected.
You can see the current user details using
select * from USER_USERS;
That will have a column name "expiry_date" which has the data you ask for.
P.S. For almost every DBA_* there is an ALL_* (all the permitted records that the current user can see) and a USER_* (all the permitted records owned by the current user)
so DBA_TABLES has all the tables the systems has, ALL_TABLES has all the tables the current user has permissions to do something on (update, delete, insert, modify, etc), and USER_TABLES - all the tables the current user created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With