Home > Database > Mysql Tutorial > body text

Tutorial on how to change the password and lock and unlock the Oracle 11g user

小云云
Release: 2017-12-11 14:29:02
Original
1557 people have browsed it

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:新设密码;
Copy after login


##Complete

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.
Copy after login


Have you all learned it? You can try it yourself.


Related recommendations:

Oracle program development tips

##About Oracle 11g server installation detailed steps with pictures and text tutorial

php Detailed explanation of calling Oracle's stored procedure

The 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template