We have shared with you a detailed tutorial with pictures and text on the detailed steps of Oracle 11g server installation. This article mainly introduces the example code of Oracle 11g users to change passwords and lock and unlock functions. Friends in need can refer to it. I hope it can help everyone. .
1. Run cmd.exe;
2. Enter sqlplus / as sysdba, connect to the database as the system administrator (sysdba), and perform database management operations.
3. After successful connection, execute
alter user identityName identified by password; —–修改密码 alter user identityName account unlock; —–解锁 alter user identityName account lock; —–加锁 identityName:需要修改的用户; password:新设密码;
PS: Unlocking and locking oracle 11g users (hr mode)
SQL> conn sys/sys as sysdba Connected. SQL> show user USER is "SYS" SQL> alter user hr account unlock;(解锁) User altered. SQL> alter user hr identified by *password*;(更改密码,这一步是必需的,否则hr模式还是不能使用的) User altered. 到这里hr模式就可以使用了,试试: SQL> conn hr/*password* Connected. SQL> show user USER is "HR" ---------------------------------- 相反的 SQL> alter user hr account lock;(上锁) User altered. SQL> alter user hr password expire;(密码失效) User altered. SQL> conn hr/*password* ERROR: ORA-28000: the account is locked Warning: You are no longer connected to ORACLE.
Oracle program development tips
##About Oracle 11g server installation detailed steps with pictures and text tutorialphp Detailed explanation of calling Oracle's stored procedureThe above is the detailed content of Tutorial on how to change the password and lock and unlock the Oracle 11g user. For more information, please follow other related articles on the PHP Chinese website!