Using Informatica Environment Variables
If you frequently use scripts to run PowerCenter commands pmrep and pmcmd, make sure you are using server environment variables for repetitive command parameters.
Benefits of using environment variables:
- Eliminate the need to change scripts when migrating from test to production.
- Reduce need to change scripts when upgrading to new version of PowerCenter.
- Better security: user id and passwords will not be in clear text. Of course you will want to restrict who can edit the server's environment variables and limit who can place scripts on your server.
This article will present the material from a Windows server point of view and will cover:
- Common environment variables for PowerCenter
- Encrypting Passwords
- Example usage in scripting
Common environment variables for PowerCenter
Here are some example env. variables you could define:Variable | Description |
---|---|
INFA_DEFAULT_DOMAIN | Domain Name |
INFA_PM_PASSWORD | encrypted password for workflow user |
INFA_PM_USER | user id of |
INFA_SERVICE | Integration service name |
INFA_PATH | path to PowerCenter server folders x:\Informatica\PowerCenterx.x.x |
INFA_DEFAULT_DATABASE_PASSWORD | encrypted password for repository database login |
INFA_REPOSITORY | repository name |
The PowerCenter command reference guide has a chapter on configuring environment variables and a complete list of the variables you can use but you can add any number of variables to suit your specific needs.
Note, you may have to restart the PowerCenter services (or system) before new environment variables will be available.
Encrypting Passwords
Before you create an environment variable for a password, you should create an encrypted version of it using the PowerCenter command pmpasswd.exe. The pmpasswd command creates an encrypted password that will be decrypted by the pmcmd and pmrep commands.The command syntax is:
pmpasswd yourpassword -e CRYPT_SYSTEMthe returned "password" will look similar to: f/wRb5PZsZnqESTDPeos7Q==
To encrypt a password, open a command window on your server, then navigate to the PowerCenter \server\bin folder and execute the pmpasswd command. Copy the resulting encrypted password from the command window and paste it into the value field of the Environment Variable dialog. Now it can be referenced in a script without being exposed (as shown in the example below).
Example usage in scripting
Here is an example using environment variables in a simple "start workflow" script. The environment variables are highlighted in bold.First, this example sets the path for the script, then pmcmd command is called using the startworkflow function.
Notice some of the variables require the %varname% syntax but the user id and password variables do not. When using the -uv and -pv options (as opposed to -u and -p), the pmcmd startworkflow function assumes the user id and password are stored in environment variables and knows now to retrieve them and decrypt the encrypted password.
SET PATH=%INFA_PATH%\server\bin;%PATH% pmcmd.exe startworkflow -sv %INFA_SERVICE% -d %INFA_DEFAULT_DOMAIN% -uv INFA_PM_USER -pv INFA_PM_PASSWORD -f MyFolder -wait wf_Test_MyWorkFlow
Conclusion
I hope you will give consideration to using environment variables. I also recommend you review PowerCenter's command reference guide and search the Informatica Knowledge base for more information.If you would like to share your experiences or have questions about this topic, please leave a comment.
Thank you for your support
or |
IMPORTANT, YOU are responsible for backing up your systems before trying or implementing any suggestions from this blog. I do not guarantee 100% accuracy in any code examples. I do not presume to know your system environment(s) or Security requirements; all code examples from this blog should be throughly tested before any attempted use on a production system.
"Notice some of the variables require the %varname% syntax but the user id and password variables do not. When using the -uv and -pv options (as opposed to -u and -p), the pmcmd startworkflow function assumes the user id and password are stored in environment variables and knows now to retrieve them and decrypt the encrypted password."
Digital Marketing Training in Chennai
Digital Marketing Course in Chennai
ataşehir toshiba klima servisi
maltepe alarko carrier klima servisi
maltepe daikin klima servisi
kartal toshiba klima servisi
ümraniye toshiba klima servisi
kartal beko klima servisi
beykoz lg klima servisi
üsküdar lg klima servisi
betpark
canlı poker siteleri
canlı slot siteleri
kıbrıs bahis siteleri
deneme bonusu
betmatik
kralbet
kars
mardin
samsun
urfa
14LT
tokat
samsun
yozgat
zonguldak
ET8WM