Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Alter user identified by values in 11g

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. demand

When migrating some data to a new database, developers need to be consistent with the original database password, and it is troublesome for us to collect passwords one by one. What are we going to do at this time? The alter user statement of Oracle provides an identified by values clause that allows DBA to change the password directly using the password ciphertext stored in the database dictionary without knowing the plaintext.

2. Methods

Eg: for example, if the password of test1 is password2018, you can change the password of test2 to password2018, or create a password of password2018 for test3.

1. Query test1 password encryption ciphertext

Select s.spare4 from sys.user$ s where s.name = 'TEST1'

two。 Change the password of test2

Alter user test2 identified by values' S.SPARE4'

3. Create a test3 user

Alter user test3 identified by values' S.SPARE4'

4. Test test2 and test3 users

Conn test2/password2018;conn test3/password2018

Success

5. Create users in batch

Select 'create user' | | name | | 'identified by values''| | spare4 | |''; 'from sys.user$ where name like' TEST%'

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report