got the solution:changing sys and dba password
i have to automatically change the pasword of sys and dba in 100 servers with a command line script,i know their present password and ip address,i am using oracle database 10g how can i do this.
|
I don't know how your systems are configured, etc - but here is a skeleton script.
Code:
#!/bin/ksh |
in windows
hi there
i have a win 2000 runing 10g grid control i wanna use emctl config agent credentials emrep10.acme.com:oracle_database in my script to change the password of different servers so that my repository of the passwords is updated in my control database. can you help me do this. regards anirudh |
i want to run the DOS command as a bat file through web control page
emctl config agent credentials %hostname:%instancename this command works as follows in linux as $PROMPT>./emctl config agent credentials emrep10.acme.com:oracle_database Oracle Enterprise Manager 10g Release 10.1.0.2.0 Copyright (c) 2002, 2003 Oracle Corporation. All rights reserved. Name = emrep10.us.oracle.com, Type = oracle_database Want to change for "UserName" (y/n):n Want to change for "password" (y/n):y Enter the value for "password" :******* EMD reload completed successfully this command is in say d:/oracle/agent/bin directory windows2000 this has to run as a batch file and has to read the hostname and instancename from a file (there are 100 host and instance name) also the interactive part ie username and password has to be ('n','y') this has to be provided to the command when it ask for this from the file also the new password has to be read from the file and feed to the command and this has to be for all the host and instance name provided in the file it has to run on windows plz help :confused: |
set path=D:\oracle\product\10.1.0\agent\bin
# parameter $1 = textfile while read hostname instancename n y newpasswd do win32::Spawn (emctl config agent credentials, $hostname:$instancename,PID) expect "Want to change for \"UserName\" (y/n):" send "$n\r" expect "Want to change for \"password\" (y/n):" send "$y\r" expect "Enter the value for \"password\" :" send "$newpasswd\r" interact exit could some one help me to get this to work on the windows system as perl or batch |
hi there
i found a solution to the problem we could use the EM CLI (enterprise manager command line interpreter) it supports a verb modify_targets -credentials also it can take in argfile as input to execute the commands as >emcli argfile arg_file_name arg_file contains all the credentials like modify_target -name=<taget_name1> -type=<target_type such as oracle_database,host etc> - credentials="<>" modify_target -name=<taget_name2> -type=<target_type such as oracle_database,host etc> - credentials="<>" etc this arg file is a ascii file so we execute it through the command line inerpreter as refered above Thanx Anirudh |
All times are GMT -5. The time now is 02:32 PM. |