Solved

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

Posted on 2013-11-14
4
737 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 500 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 37

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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

719 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