?
Solved

oracle password reset : from Windows 7 command to multiple oracle dataservers

Posted on 2013-11-14
4
Medium Priority
?
774 Views
Last Modified: 2013-11-15
in my firm periodical password reset is required and I have numbers of IDs on different Oracle dataservers. I would like to make simple windows script with sqlplus to reset each dataserver login password (from old same password to same new password).
on my PC oracle client is installed and I can login to dataserver via sqlplus.
but not sure how I can make windows script to make this happen, would you advice?
0
Comment
Question by:sleepingluke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 39649703
You should be able to create a simple BAT file with command line parameters.

Something like below (untested, just typed in.  Might have small syntax issues).

BAT file:
sqlplus %1/%2@DB1 @changepassword.sql %3
sqlplus %1/%2@DB2 @changepassword.sql %3
sqlplus %1/%2@DB3 @changepassword.sql %3

Open in new window


changepassword.sql file:
alter user someuser identified by &1;
exit;

Open in new window


Call the bat file:
doit.bat db_username db_password new_username


Just add the necesary database names from your tnsnames.ora file and change the SQL script for the correct username.
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 39650430
slight typo ... :)

doit.bat db_username db_password new_password
0
 

Author Closing Comment

by:sleepingluke
ID: 39650489
it works thank you very much for support!
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39652455
>>slight typo ... :)

hehe... oops.

>>it works thank you very much for support!

Glad to help.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Configuring Remote Assistance for use with SCCM
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

764 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