Oracle 11g用户修改密码及加锁解锁功能实例代码
1.运行 cmd.exe;
2.输入 sqlplus / as sysdba,以系统管理员(sysdba)身份连接数据库,进行数据库管理操作。
3.连接成功后执行
alter user identityName identified by password; ―C修改密码 alter user identityName account unlock; ―C解锁 alter user identityName account lock; ―C加锁 identityName:需要修改的用户; password:新设密码;
完成
PS: oracle 11g用户的解锁与加锁(hr模式)
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.
总结
相关推荐
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
iilegend 2020-10-19
EricRay 2020-10-16
zhuzhufxz 2020-09-16
dataminer 2020-08-17
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
Seandba 2020-08-16
Omega 2020-08-16
zjyzz 2020-08-16
yanghuatong 2020-08-16
ktyl000 2020-08-16
dbasunny 2020-08-16