Saturday, July 17, 2021

Informatica Repository commands for daily administrative tasks

Informatica Repository commands is very useful in day to day activities. These commands are useful to perform adminitrative tasks

1. To Create Database Connection or Repository folder, Assign permission we can use the pmrep commnd

to create connection we need to connect the repository and then create connection.

a.  pmrep connect -r "Repository name" -d "domain name" -n Username -X Password

-r :  Informatica Power Center Repository Name
-d : Informatica Domain Name
-n : User Name
-X : Encrypt Password

To Create encrypted password we can use the pmpasswd 
  
 pmpasswd abc
Encrypted String --> xadffjjkjkvd=<---
will decrypt to -> abc<---

Once we connect to Repository we perform any tasks in Repositoy like Folder Creation, Connection Creation etc.

b.  pmrep  CreateConnection -s "type"  -n "name" -u "Username"  -p "Password" -c "Connection String"  -l MS1252

-s :  Connection type for example odbc,Teradata etc
-n : Connection  Name, This will be used in workflows
-u : Connection User Name
-p : Connection Password
-c: Connection String which is same as odbc or tns entry

To Delete Connection we can use deleteconnection in pmrep

c.  pmrep  deleteconnection -s "type"  -n "name" 

-s :  Connection type for example Relational ,Application, HTTP,MQ
-n : Connection  Name, This will be used in workflows

d.  pmrep AssignPermission -o "Object Type" -n "Connection name" -g "Group name"  -p "rwx"

-o :  Object Type for example Connection, folder etc
-n : Connection  Name
-g : Informatica Permission Group so that whoever part of this group will get the permission. We can use -u for the individual users.
-p : Connection Permission who can read,write and execute.

e.  pmrep ChangeOwner -o "Object Type" -n "Connection name" -u "Owner name" 

-o :  Object Type for example Connection, folder etc
-n : Connection  Name
-u : New Object Owner for this folder or Connection object

to create folder we need to connect the repository and then create connection. Once we connect Repository we can use CreateFolder command to create a folder and permission adding will be same as connection.

f.  pmrep  createfolder   -n "name" -d "Description"  -o "Owner"

-n :  Folder Name
-n : Connection  Name
-o : Owner Name 


To Delete Connection we can use deleteconnection in pmrep

g.  pmrep  deletefolder -n "name" 

-n : Folder name to delete in a Repository


2. To  Validate the Informatica Components like Workflow, Session, Mapping etc we can use the pmrep commands

we need to connect the repository and then validate objects

a.  pmrep connect -r "Repository name" -d "domain name" -n Username -X Password

Once connected use validate command

b.  pmrep Validate -n "Object name" -o "Object Type"  -f  "foldername" -s -k -m "Comments"

-n :  Object Name which can be mapping name or session name or workflow etc
-o : Object type which can be mapping or sesssion or workflow or mapplet
-m :  Comments for validating so that it will be have the details

3. To  update Sequnce generator in mapping we can use the pmrep commands

we need to connect the repository and then update sequnce generator.

a. pmrep connect -r "Repository name" -d "domain name" -n Username -X Password

Once connected use update sequence generator command

b. pmrep Updateseqgenvals -f "Foldername" -t "SQ name" -c "cur val"


-f :  Folder Name of the sequence generator
-t :  Sequence Generator name
-c :  The value that currently needs to set to replace previous value.

4. To  Export objects like mapping,session, workflows pmrep command can be used

we need to connect the repository and then export object from Repository

a. pmrep connect -r "Repository name" -d "domain name" -n Username -X Password

Once connected use objectexport command

b. pmrep objectexport -n "name"  -o "type" -m -s -b -r -u "objectname.xml"

-n :  Workflow or session name that needs to be exported
-o :  Object type can be workflow or session
-u :  Exported objectname to save in local folder.

Folders list also can be exported used pmrep using below command. This will help to compare and verify whether folder is already available in target repository

c. pmrep listobjects -o "folder"

5. To  Deploy the workflow or folder we can use pmrep

a. pmrep connect -r "Repository name" -d "domain name" -n Username -X Password

Once connected use deployfolder command

pmrep deployfolder -f "folder name" -c "control file" -r " Repository name" -n "username" -s "native" -X "password"

To deploy deployment group we can use deploymentgroup command

pmrep deploydeploymentgroup -p "deployment group name" -c "control file dtd" -r "remote repository name" -h "hostname"  -o "port number" -n " remote username" -x " remote password"

To remove deployment group we can use deletedeploymentgroup command

pmrep deletedeploymentgroup -p "groupname" -f

6. To  start the workflow we can use pmcmd command

To start workflow first we need to connect to repository and start the workflow.

a. pmrep connect -r "Repository name" -d "domain name" -n Username -x Password

b.pmcmd startworkflow -sv "Integration Service" -d "domain"  -u "username" -pv "password" -f "foldername" "workflow name"

To get the workflow status we can use the below command

c.pmcmd getworkflowdetails -service "Integration Service" -d "domain"  -u "username" -pv "password" -f "foldername" "workflow name"


7. To  Create User or assign permission to User we can use the infacmd command

we can use infacmd command to create user in informatica power center repository. infamd command is available in $INFAHOME/server/bin path.

a. infacmd.sh createuser -dn "domain name"  -un "admin user"  -pd "admin password" -ny "new user name" -np "new user passwd" -nf "new user folder"

once user created using infacmd command, permissions need to be provided to the user. It can be user permission or group permission

b. infacmd.sh addUserToGroup -dn "domain name"  -un "admin user"  -pd "admin password" -eu "user who needs permission" -gn "group that user required"

Similarly user can removed using removeuser

b. infacmd.sh removeuser -dn "domain name"  -un "admin user"  -pd "admin password" -eu "user who needs removed" 

To update the domainoptions we can use infacmd

c. infacmd.sh updatedomainoptions -dn "domain name" -un "Admin user" -pd "password" -do TLSMode=True

To switch the Gatewaynodes we can use infacmd

d. infacmd.sh isp SwitchtoGatewaynode -dn "domain" -un "admin user" -pd "admin passwd" -hp "host1:port"  "host2:port"  "host3:port" -Nodename "node01" -ld "node directory path"

To Covertlogfile to normal file to read session logs we can use infacmd

e. infacmd.sh Convertlogfile -in /var/opt/infa/cache/wofklow.log.bin -fm text -lo workflw.txt

8. To  start informatica services we need to user infaservice.sh command located in $INFAHOME/server/tomcat/bin

To start Informatica services, we can run the below command

infaservice.sh shutdown

To stop Informatica services, we can run the below command

infaservice.sh startup

9. To update informatica setup files like nodemetadata.xml or any domain console port etc we need to run infasetup command and restart the service. this setup files script is available in $INFAHOME/isp/bin

To setup domain after certificate update  with keystore and trust store we can use the below command

infasetup.sh updategatewaynode -dn "domain name" -hs "ssl port" -kf "old keystore file" -kp "old keystore password" -nk "new kestore" -nkp "new keystore password" -nt "new trust store" -nkp "new trust store password" 


To setup SSL port we can run the below command

infasetup.sh updategatewaynode -hs "port number"









No comments: