Pages

Monday, 18 November 2013

EMS scripting - How to execute a sequence of EMS commands

We can execute a sequence of EMS commands by writing a simple script file.
write EMS commands in txt file and save in some location for example   i saved my script file in the location C:\TEMP with name "script.scr" 
and its content is 

create queue prasanth
create topic  bandi

commit


in the script file every command must be contained on a single line (no line breaks within the command), and each command is separated by a line break

Now
open command prompt and go to the location C:\tibco\ems\5.1\bin and run the below command, it will execute the EMS commands

C:\tibco\ems\5.1\bin>
tibemsadmin -server "tcp://localhost:7222" -user admin -password "" -script C:\tibco\ems\5.1\bin\script.scr


just give the full path of the file with the extension(i.e C:\script.txt or C:\script.scr or C:\script.anything) in the command and run it.
Even if there is no file extension, it doesnt matter :-)...you just need to have a plain text file with all the ems commands. 


Syntax of the command is 

tibemsadmin -server <server-url> -user <user-name> -password  <password> -script C:\script.txt

No comments:

Post a Comment