Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

How to Set All Informatica

Workflows to Unscheduled
from a Script
So you have over 100 Informatica workflows and you need to stop them from running. Well,
you can set the Integration service to Safe mode, but doing so wont allow your developers
to go in and look at the workflows. As of version 8.6.1 of PowerCenter you can only go into
the workflows when in safe mode if you are assigned the Administrator role, and no one
wants to make their developers administrators (do you?)

Ok, so here is your solution, run the batch file bellow, and watch as your workflows get
uncheduled one at a time (note that i use SQLCMD, but you can use OSQL or ISQL, just
adjust the command bellow):

1
2
3
4
cd C:\Program Files\Microsoft SQL Server\90\Tools\Binn
5
6
sqlcmd -S sql1.server.com -U sql_user -P SQLpassword -Q "select workflow_name, scheduler_name
7
from rep_workflows where scheduler_name is not null" -o c:\workflows.txt -h -1
8
9
pause
1
0
cd C:\Informatica\PowerCenter8.6.1\Server\bin
1
1
type NUL > c:\unschedule.log
1
2
FOR /F "tokens=1-2 delims= " %%i in (c:\workflows.txt) do (
1
pmcmd stopworkflow -sv integration -d Domain -u Administrator -p Administrator %%i >>
3
c:\unschedule.log
1
pmcmd unscheduleworkflow -sv integration -d Domain -u Administrator -p Administrator %%i >>
4
c:\unsched2.log)
1
5

This piece of code should set your workflows to unscheduled, and your developers can still
have access to the workflows

This has worked well for me, specially when taking a production copy of a repository and
restoring it elsewhere for testing

You might also like