Solved

Oracle 10g - dba_users table

Posted on 2010-11-18
4
829 Views
Last Modified: 2012-06-27
Hi,

I have few users that connects to the database:

SQL> select username, user_id from dba_users;

USERNAME                          USER_ID
------------------------------ ----------
BOBJE                                  70
BOMDB                                  66
DPOWNERA_1A                            65
DPOWNERA                               64


I want to change the password of all of then.

How should I do it? Is it necessary to restart the database in order to the change to take effect?

Tks,
Joao
0
Comment
Question by:joaotelles
  • 2
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 total points
ID: 34169031
Brute force:
Alter user bobje identified by newpassord;
Repeat for all users.


No need to restart database

You can write a pl/sql loop and use execute immediate but itk4 probably overkill.

If you just want to keep them out, lock the accounts:
Alter user bobje account lock;
0
 

Author Comment

by:joaotelles
ID: 34169093
Tks for the reply.

Is it 'best practice' to lock the accounts before the changes?

Like:
Alter user bobje account lock;
Alter user bobje identified by newpassord;

Tks
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34169159
Two different things.  Locking the account keeps them from being able to log in.

Changing the password is just that.  If they know the new one, they can log in.

They do different things.  I just threw out locking accounts because I couldn't see a need to change passwords on ALL accounts.
0
 

Author Closing Comment

by:joaotelles
ID: 34169186
Tks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
execute immediate plsql block 5 57
Oracle SQL Select unique values from two columns 4 66
ORA-00923: FROM keyword not found where expected 3 80
oracle collections 2 20
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question