How to do it?
1. Logon to the database using SYSTEM or SYS account
2. Unlock the account alter user <username> account unlock;
Example:
SQL> conn scott/tiger@oradb13
ERROR:
ORA-28000: the account is locked
Warning: You are no longer connected to ORACLE.
SQL> conn system@oradb13
Enter password: ******
Connected.
SQL> select username, account_status from dba_users 2 where username = 'SCOTT';
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SCOTT EXPIRED & LOCKED
SQL> alter user scott account unlock;
User altered.
SQL> select username, account_status from dba_users
2 where username = 'SCOTT';
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SCOTT EXPIRED
SQL> conn scott/tiger@oradb13
ERROR:
ORA-28001: the password has expired
Finally
Changing password for scott
New password: *****
Retype new password: *****
Password changed
Connected.
SQL>
Ready to Work...
1. Logon to the database using SYSTEM or SYS account
2. Unlock the account alter user <username> account unlock;
Example:
SQL> conn scott/tiger@oradb13
ERROR:
ORA-28000: the account is locked
Warning: You are no longer connected to ORACLE.
SQL> conn system@oradb13
Enter password: ******
Connected.
SQL> select username, account_status from dba_users 2 where username = 'SCOTT';
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SCOTT EXPIRED & LOCKED
SQL> alter user scott account unlock;
User altered.
SQL> select username, account_status from dba_users
2 where username = 'SCOTT';
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SCOTT EXPIRED
SQL> conn scott/tiger@oradb13
ERROR:
ORA-28001: the password has expired
Finally
- Close Sql Application
- Reopen The application
- A screen will appear to change password
Changing password for scott
New password: *****
Retype new password: *****
Password changed
Connected.
SQL>
Ready to Work...
No comments:
Post a Comment