--- a/oracle.rst Thu Apr 05 19:30:23 2018 +0300
+++ b/oracle.rst Mon Apr 09 23:22:54 2018 +0300
@@ -529,3 +529,32 @@
https://dba.stackexchange.com/questions/173540/generate-insert-statements-for-each-entry-in-a-table
Generate ``insert`` statements for each entry in a table.
+
+Unlock expired password
+=======================
+
+Connect as sysdba to the database and reset password and unlock user::
+
+ alter user <USER> identified by <PASSWORD>;
+ alter user <USER> account unlock;
+
+ alter user <LUSER> identified by <PASSWORD> account unlock;
+
+To make password lasts infinitely check which profile is used assigned::
+
+ select USERNAME, PROFILE from DBA_USERS;
+
+and check settings for this prifile::
+
+ select * from DBA_PROFILES where PROFILE = 'SA';
+
+and reset limits for password lifetime::
+
+ alter profile DEFAULT limit PASSWORD_LIFE_TIME UNLIMITED;
+
+You may create separate profile with its own settings::
+
+ create profile MY;
+ alter profile MY PASSWORD_LIFE_TIME UNLIMITED;
+ alter user <USER> profile MY;
+