Informatica Command Line Reference
Informatica Command Line Reference
29/04/2011
pmcmd is a program you use to communicate with the Integration Service. With pmcmd, you can
perform some of the tasks that you can also perform in the Workflow Manager, such as starting and
stopping workflows and sessions.
Use pmcmd in the following modes:
• Command line mode. You invoke and exit pmcmd each time you issue a command. You
can write scripts to schedule workflows with the command line syntax. Each command you
write in command line mode must include connection information to the Integration Service.
• Interactive mode. You establish and maintain an active connection to the Integration
Service. This lets you issue a series of commands. You can use environment variables for
user names and passwords with pmcmd. You can also use environment variables to
customize the way pmcmd displays the date and time on the machine running the
Integration Service process. Before you use pmcmd, configure these variables on the
machine running the Integration Service process.
Command line mode invokes and exits pmcmd each time you issue a command. Command line
mode is useful if you want to run pmcmd commands through batch files, scripts, or other programs.
Use pmcmd commands with operating system scheduling tools like cron, or you can embed pmcmd
commands into shell or Perl scripts.
When you run pmcmd in command line mode, you enter connection information such as domain
name, Integration Service name, user name and password in each command. For example, to start
the workflow “wf_SalesAvg” in folder “SalesEast,” use the following syntax:
pmcmd startworkflow -sv MyIntService -d MyDomain -u seller3 -p jackson -f SalesEast
wf_SalesAvg
The user, seller3, with the password “jackson” sends the request to start the workflow.
If you omit or incorrectly enter one of the required options, the command fails, and pmcmd returns a
non-zero return code.
To run pmcmd commands in command line mode:
1.At the command prompt, switch to the directory where the pmcmd executable is located.
By default, the PowerCenter installer installs pmcmd in the \server\bin directory.
2.Enter pmcmd followed by the command name and its required options and arguments:
Return Codes
In command line mode, pmcmd indicates the success or failure of a command with a return code.
Return code “0” indicates that the command succeeded. Any other return code indicates that the
command failed.
Use the DOS or UNIX echo command immediately after running a pmcmd command to see the
return code for the command:
1
Informatica Training Day 3
29/04/2011
pmcmd
pmcmd> connect -sv MyIntService -d MyDomain -u seller3 -p jackson
pmcmd> setfolder SalesEast
pmcmd> startworkflow wf_SalesAvg
pmcmd> startworkflow wf_SalesTotal
1.At the command prompt, switch to the directory where the pmcmd executable is located.
By default, the PowerCenter installer installs pmcmd in the \server\bin directory.
2.At the command prompt, type pmcmd.
This starts pmcmd in interactive mode and displays the pmcmd> prompt. You do not have to type
pmcmd before each command in interactive mode.
3.Enter connection information for the domain and Integration Service. For example:
connect -sv MyIntService -d MyDomain -u seller3 -p Jackson
4.Type a command and its options and arguments in the following format:
command_name [-option1] argument_1 [-option2] argument_2...
pmcmd runs the command and displays the prompt again.
5.Type exit to end an interactive session.
Setting Defaults
After you connect to an Integration Service using pmcmd, you can designate default folders or
conditions to use each time the Integration Service executes a command. For example, if you want
to issue a series of commands or tasks in the same folder, specify the name of the folder with the
setfolder command. All subsequent commands use that folder as the default.
You can use the showsettings command to display the default settings.
In nowait mode, pmcmd returns to the shell or command prompt immediately. You do not have to
wait for one command to complete before running the next command.
2
Informatica Training Day 3
29/04/2011
For example, if you enter the following commands, pmcmd starts workflow “wf_SalesTotal” even if
workflow “wf_SalesAvg” is still running:
pmcmd startworkflow -sv MyIntService -d MyDomain -u seller3 -p jackson -f SalesEast
wf_SalesAvg
#!/usr/bin/bash
# Sample pmcmd script
# Check if the service is alivepmcmd pingservice -sv testService -d testDomain
if [ "$?" != 0 ]; then # handle error echo "Could not ping service" exitfi
# Get service propertiespmcmd getserviceproperties -sv testService -d testDomain
if [ "$?" != 0 ]; then # handle error echo "Could not get service properties" exitfi
# Get task details for session task "s_testSessionTask" of workflow# "wf_test_workflow" in folder
"testFolder"pmcmd gettaskdetails -sv testService -d testDomain -u Administrator -p adminPass
-folder testFolder -workflow wf_test_workflow s_testSessionTask
if [ "$?" != 0 ]; then # handle error echo "Could not get details for task s_testSessionTask" exitfi
If you use a password environment variable, precede the variable name with the -pv or
-passwordvar option:
-passwordvar PASSWORD
or
-pv PASSWORD
3
Informatica Training Day 3
29/04/2011
If a command option contains spaces, use single or double quotation marks to enclose the option.
For example, use single quotes in the following syntax to enclose the folder name:
To denote an empty string, use two single quotes ('') or two double quotes ("").
4
Informatica Training Day 3
29/04/2011
aborttask
Aborts a task. Issue this command only if the Integration Service fails to stop the task when you
issue the stoptask command.
The aborttask command uses the following syntax in the command line mode:
The aborttask command uses the following syntax in the interactive mode:
5
Informatica Training Day 3
29/04/2011
abortworkflow
Aborts a workflow. Issue this command only if the Integration Service fails to stop the workflow
when you issue the stopworkflow command.
The abortworkflow command uses the following syntax in the command line mode:
The abortworkflow command uses the following syntax in the interactive mode:
6
Informatica Training Day 3
29/04/2011
connect
Connects the pmcmd program to the Integration Service in the interactive mode. If you omit
connection information, pmcmd prompts you to enter the correct information. Once pmcmd
successfully connects, you can issue commands without reentering the connection information.
7
Informatica Training Day 3
29/04/2011
disconnect
Disconnects pmcmd from the Integration Service. It does not close the pmcmd program. Use this
command when you want to disconnect from an Integration Service and connect to another in the
interactive mode.
The disconnect command uses the following syntax in the interactive mode:
disconnect
8
Informatica Training Day 3
29/04/2011
exit
Disconnects pmcmd from the Integration Service and closes the pmcmd program.
The exit command uses the following syntax in the interactive mode:
exit
9
Informatica Training Day 3
29/04/2011
getrunningsessionsdetails
Returns the following details for all sessions currently running on an Integration Service:
The getrunningsessionsdetails command uses the following syntax in the command line mode:
The getrunningsessionsdetails command uses the following syntax in the interactive mode:
getrunningsessionsdetails
10
Informatica Training Day 3
29/04/2011
getservicedetails
Returns the following details about an Integration Service:
The getservicedetails command uses the following syntax in the command line mode:
The getservicedetails command uses the following syntax in the interactive mode:
getservicedetails[-all|-running|-scheduled]
11
Informatica Training Day 3
29/04/2011
getserviceproperties
Returns the following information about the Integration Service:
The getserviceproperties command uses the following syntax in the command line mode:
The getserviceproperties command uses the following syntax in the interactive mode:
getserviceproperties
12
Informatica Training Day 3
29/04/2011
getsessionstatistics
Returns session details and statistics. The command returns the following information:
• Folder name, workflow name, worklet or session instance, and mapping name
• Session log file name and location
• Number of source and target success and failure rows
• Number of transformation errors
• First error code and error message
• Task run status
• Name of associated Integration Service
• Grid and node names where the session runs
The command also returns the following information for each partition:
• Partition name
• For each transformation within a partition: transformation instance, transformation name,
number of applied, affected, and rejected rows, throughput, last error code, start and end
time
The getsessionstatistics command uses the following syntax in the command line mode:
The getsessionstatistics command uses the following syntax in the interactive mode:
13
Informatica Training Day 3
29/04/2011
gettaskdetails
Returns the following information about a task:
• Folder name, workflow name, task instance name, and task type
• Last execution start and complete time
• Task run status, first error code, and error message
• Grid and node names where the task runs
• Name of associated Integration Service
• Task run mode
If the task is a session, the command also returns the following details:
The gettaskdetails command uses the following syntax in the command line mode:
The gettaskdetails command uses the following syntax in the interactive mode:
14
Informatica Training Day 3
29/04/2011
getworkflowdetails
Returns the following information about a workflow:
The getworkflowdetails command uses the following syntax in the command line mode:
The getworkflowdetails command uses the following syntax in the interactive mode:
15
Informatica Training Day 3
29/04/2011
help
Returns the syntax for the command you specify. If you omit the command name, pmcmd lists all
commands and their syntax.
The help command uses the following syntax in the command line mode:
The help command uses the following syntax in the interactive mode:
help [command]
16
Informatica Training Day 3
29/04/2011
pingservice
Verifies that the Integration Service is running.
The pingservice command uses the following syntax in the command line mode:
The pingservice command uses the following syntax in the interactive mode:
pingservice
17
Informatica Training Day 3
29/04/2011
recoverworkflow
Recovers suspended workflows. To recover a workflow, specify the folder and workflow name. The
Integration Service recovers the workflow from all suspended and failed worklets and all suspended
and failed Command, Email, and Session tasks.
The recoverworkflow command uses the following syntax in the command line mode:
The recoverworkflow command uses the following syntax in the interactive mode:
18
Informatica Training Day 3
29/04/2011
scheduleworkflow
Instructs the Integration Service to schedule a workflow. Use this command to reschedule a
workflow that has been removed from the schedule.
The scheduleworkflow command uses the following syntax in the command line mode:
The scheduleworkflow command uses the following syntax in the interactive mode:
scheduleworkflow[<-folder|-f> folder]workflow
19
Informatica Training Day 3
29/04/2011
setfolder
Designates a folder as the default folder in which to execute all subsequent commands. After
issuing this command, you do not need to enter a folder name for workflow, task, and session
commands. If you enter a folder name in a command after the setfolder command, that folder name
overrides the default folder name for that command only.
The setfolder command uses the following syntax in the interactive mode:
setfolder folder
20
Informatica Training Day 3
29/04/2011
setnowait
You can run pmcmd in wait or nowait mode. In wait mode, pmcmd returns to the shell or command
prompt after the command completes. You cannot run subsequent commands until the previous
command completes. In nowait mode, pmcmd returns to the shell or command prompt immediately.
You do not have to wait for one command to complete before running the next command.
The setnowait command runs pmcmd in nowait mode. The nowait mode is the default mode.
The setnowait command uses the following syntax in the interactive mode:
setnowait
When you set nowait mode, use the pmcmd prompt after the Integration Service executes the
previous command.
21
Informatica Training Day 3
29/04/2011
setwait
You can run pmcmd in wait or nowait mode. In wait mode, pmcmd returns to the shell or command
prompt after the command completes. You cannot run subsequent commands until the previous
command completes. In nowait mode, pmcmd returns to the shell or command prompt immediately.
You do not have to wait for one command to complete before running the next command.
The setwait command runs pmcmd in wait mode. The pmcmd prompt is available after the
Integration Service completes the previous command.
The setwait command uses the following syntax in the interactive mode:
setwait
22
Informatica Training Day 3
29/04/2011
showsettings
Returns the name of the domain, Integration Service, and repository to which pmcmd is connected.
It displays the user name, wait mode, and default folder.
The showsettings command uses the following syntax in the interactive mode:
showsettings
23
Informatica Training Day 3
29/04/2011
starttask
Starts a task.
The starttask command uses the following syntax in the command line mode:
The starttask command uses the following syntax in the interactive mode:
-paramfile '$PMRootDir/myfile.txt'
For Windows command prompt users, the parameter file name cannot have beginning or trailing
spaces. If the name includes spaces, enclose the file name in double quotes:
When you write a pmcmd command that includes a parameter file located on another machine, use
the backslash (\) with the dollar sign ($). This ensures that the machine where the variable is
defined expands the process variable.
pmcmd starttask -sv MyIntService -d MyDomain -uv USERNAME -pv PASSWORD -f east -w
wSalesAvg -paramfile '\$PMRootDir/myfile.txt' taskA
24
Informatica Training Day 3
29/04/2011
startworkflow
Starts a workflow.
The startworkflow command uses the following syntax in the command line mode:
The startworkflow command uses the following syntax in the interactive mode:
When you start a workflow, you can optionally enter the directory and name of a parameter file. The
Integration Service runs the workflow using the parameters in the file you specify. For UNIX shell
users, enclose the parameter file name in single quotes. For Windows command prompt users, the
parameter file name cannot have beginning or trailing spaces. If the name includes spaces, enclose
the file name in double quotes.
Use parameter files on the following machines:
• Node running the Integration Service. When you use a parameter file located on the
Integration Service machine, use the -paramfile option to indicate the location and name of
the parameter file.
On UNIX, use the following syntax:
-paramfile '$PMRootDir/myfile.txt'
• Local machine. When you use a parameter file located on the machine where pmcmd is
invoked, pmcmd passes variables and values in the file to the Integration Service. When
you list a local parameter file, specify the absolute path or relative path to the file. Use the
-localparamfile or -lpf option to indicate the location and name of the local parameter file.
On UNIX, use the following syntax:
• Shared network drives. When you use a parameter file located on another machine, use the
backslash (\) with the dollar sign ($). This ensures that the machine where the variable is
defined expands the process variable.
paramfile '\$PMRootDir/myfile.txt'
25
Informatica Training Day 3
29/04/2011
stoptask
Stops a task.
The stoptask command uses the following syntax in the command line mode:
The stoptask command uses the following syntax in the interactive mode:
26
Informatica Training Day 3
29/04/2011
stopworkflow
Stops a workflow.
The stopworkflow command uses the following syntax in the command line mode:
The stopworkflow command uses the following syntax in the interactive mode:
27
Informatica Training Day 3
29/04/2011
unscheduleworkflow
Removes a workflow from a schedule.
The unscheduleworkflow command uses the following syntax in the command line mode:
The unscheduleworkflow command uses the following syntax in the interactive mode:
unscheduleworkflow[<-folder|-f> folder]workflow
28
Informatica Training Day 3
29/04/2011
unsetfolder
Removes the designation of a default folder. After you issue this command, you must specify a
folder name each time you enter a command for a session, workflow, or task.
The unsetfolder command uses the following syntax in the interactive mode:
unsetfolder
29
Informatica Training Day 3
29/04/2011
version
Displays the PowerCenter version and Informatica trademark and copyright information.
The version command uses the following syntax in the command line mode:
pmcmd version
The version command uses the following syntax in the interactive mode:
version
30
Informatica Training Day 3
29/04/2011
waittask
Instructs the Integration Service to complete the task before returning the pmcmd prompt to the
command prompt or shell.
The waittask command uses the following syntax in the command line mode:
The waittask command uses the following syntax in the interactive mode:
31
Informatica Training Day 3
29/04/2011
waitworkflow
Causes pmcmd to wait for a workflow to complete before it executes subsequent commands. Use
this command in conjunction with the return code when you run pmcmd from a script. For example,
you may want to check the status of a critical workflow before starting another workflow. Use the
waitworkflow command to wait for the critical workflow to complete, and then check the pmcmd
return code. If the return code is 0 (successful), start the next workflow.
The waitworkflow command returns the prompt when a workflow completes.
The waitworkflow command uses the following syntax in the command line mode:
The waitworkflow command uses the following syntax in the interactive mode:
32
Informatica Training Day 3
29/04/2011
Using pmrep
pmrep is a command line program that you use to update repository information and perform
repository functions. pmrep is installed in the PowerCenter Client and PowerCenter Services bin
directories.
Use pmrep to perform repository administration tasks such as listing repository objects, creating
and editing groups, restoring and deleting repositories, and updating session-related parameters
and security information in the PowerCenter repository.
When you use pmrep, you can enter commands in the following modes:
• Command line mode. You can issue pmrep commands directly from the system command
line. Use command line mode to script pmrep commands.
• Interactive mode. You can issue pmrep commands from an interactive prompt. pmrep does
not exit after it completes a command.
You can use environment variables to set user names and passwords for pmrep. Before you use
pmrep, configure these variables.
All pmrep commands require a connection to the repository except for the following commands:
• Help
• ListAllPrivileges
Use the pmrep Connect command to connect to the repository before using other pmrep
commands.
Command line mode invokes and exits pmrep each time you issue a command. Command line
mode is useful if you want to run pmrep commands through batch files, scripts, or other programs.
To run pmrep commands in command line mode:
1.At the command prompt, change to the directory where the pmrep executable is located.
2.Enter pmrep followed by the command name and its options and arguments:
Interactive mode invokes pmrep. You can issue a series of commands from a pmrep prompt without
exiting after each command.
To run pmrep commands in interactive mode:
33
Informatica Training Day 3
29/04/2011
The Repository Service runs in normal or exclusive mode. Run the Repository Service in exclusive
mode to perform tasks that permit only one user connection to the repository.
Run the Repository Service in exclusive mode to use the following pmrep commands:
• Create
• Delete
• Register
• RegisterPlugin
• Unregister
• UnregisterPlugin
You can use the Administration Console or infacmd to run the Repository Service in exclusive
mode.
Return Codes
pmrep indicates the success or failure of a command with a return code. Return code “0” indicates
that the command succeeded. Return code “1” indicates that the command failed. Some commands
perform multiple operations. For example, addToDeploymentgroup adds multiple objects to a
deployment group. In these cases, a Return code “0” indicates that the command was executed
successfully even if only some of the objects were deployed successfully.
Enter one of the following DOS or UNIX echo commands immediately after running the pmrep
command:
Some pmrep commands, such as CreateConnection and Restore, require a native connect string.
backupproduction.bat
REM This batch file uses pmrep to connect to and back up the repository Production on the server
ServerName
@echo off
echo Connecting to repository Production...
c:\PowerCenter\pmrep\pmrep connect -r Production -n Administrator -x Adminpwd -d MyDomain -h Machine -o
8080
34
Informatica Training Day 3
29/04/2011
Tips
Use the following tips when you create and run pmrep scripts:
• Include a Connect command as the first command called by the script file. This helps
ensure that you perform tasks on the correct repository.
• To run pmrep scripts that connect to different repositories simultaneously, set the
INFA_REPCNX_INFO environment variable in each environment to store the name and file
path for the repository connection file. This prevents a script from overwriting the
connection information used by another script.
35
Informatica Training Day 3
29/04/2011
AddToDeploymentGroup
Adds objects to a deployment group. Use AddToDeploymentGroup to add source, target,
transformation, mapping, session, worklet, workflow, scheduler, session configuration, and task
objects.
You cannot add checked out objects to a deployment group. You can specify objects using
command options or you can use a persistent input file. If you use a persistent input file, you can
enter the deployment group name option.
Use AddToDeploymentGroup to add reusable input objects. If you want to add non-reusable input
objects, you must use a persistent input file that contains encoded object IDs.
If AddToDeploymentGroup runs successfully, it either sends back no status information, or it returns
a list of objects that are already in the deployment group. If the command fails, it displays the
reason for failure.
The AddToDeploymentGroup command uses the following syntax:
36
Informatica Training Day 3
29/04/2011
ApplyLabel
Applies a label to an object or a set of objects in a folder. If you enter a folder name, all the objects
in the folder receive the label. You can apply the label to dependent objects. If you use the
dependency_object_types option, pmrep labels all dependent objects. To apply a label to selected
dependent objects, separate each object type name by a comma with no spaces between them on
the command line.
Use ApplyLabel to label reusable input objects. If you want to label non-reusable input objects, you
must use a persistent input file that contains encoded object IDs.
If ApplyLabel succeeds, pmrep displays either no status information or a list of objects that already
have the label. If the command fails, pmrep displays the reason for the failure.
The ApplyLabel command uses the following syntax:
37
Informatica Training Day 3
29/04/2011
AssignPermission
Assigns permissions on a global object.
Note: Only the administrator or the current owner of the object can assign permissions on the
object.
The AssignPermission command uses the following syntax:
38
Informatica Training Day 3
29/04/2011
BackUp
Backs up the repository to the file specified with the -o option. You must provide the backup file
name. Use this command when the repository is running. You must be connected to a repository to
use this command.
The BackUp command uses the following syntax:
backup -o <output_file_name> [-d <description>] [-f (overwrite existing output file)][-b (skip workflow
and session logs)] [-j (skip deploy group history)][-q (skip MX data)][-v (skip task statistics)]
39
Informatica Training Day 3
29/04/2011
ChangeOwner
Changes the owner name for a global object.
Only the administrator or current owner of the object has the permission to change ownership for an
object.
The ChangeOwner command uses the following syntax:
40
Informatica Training Day 3
29/04/2011
CheckIn
Checks in an object that you have checked out. When you check in an object, the repository creates
a new version of the object and assigns it a version number. The version number is one number
greater than the version number of the last checked-in version.
The CheckIn command uses the following syntax:
41
Informatica Training Day 3
29/04/2011
CleanUp
Cleans up any persistent resource created by pmrep. This command also cleans up any connection
information from previous sessions of pmrep. Calling CleanUp as the first command in a session
always returns an error.
If you call CleanUp in the interactive mode, pmrep disconnects any repository you are connected to.
The CleanUp command uses the following syntax:
Cleanup
42
Informatica Training Day 3
29/04/2011
ClearDeploymentGroup
Clears all objects from a deployment group. Use this command to retain the deployment group but
remove the objects.
The ClearDeploymentGroup command uses the following syntax:
43
Informatica Training Day 3
29/04/2011
Connect
Connects to a repository. The first time you use pmrep in either command line or interactive mode,
you must use the Connect command. All commands require a connection to the repository except
for the following commands:
• Exit
• Help
• ListAllPrivileges
In the command line mode, pmrep uses the information specified by the last call to connect to the
repository. If pmrep is called without a successful connection, it returns an error. In command line
mode, pmrep connects to and disconnects from the repository with every command.
To use pmrep to perform tasks in multiple repositories in a single session, you must issue the
Connect command each time you want to switch to a different repository. In the interactive mode,
pmrep retains the connection until you exit pmrep or connect again. If you call Connect again,
pmrep disconnects from the first repository and then connects to the second repository. If the
second connection fails, the previous connection remains disconnected and you will not be
connected to any repository. If you issue a command that requires a connection to the repository,
and you are not connected to that repository, pmrep uses the connection information specified in
the last successful connection made to the repository from any previous session of pmrep. pmrep
retains information from the last successful connection until you use the Cleanup command.
The Connect command uses the following syntax:
44
Informatica Training Day 3
29/04/2011
Create
Creates the repository tables in the database. Before you can create the repository tables, you must
complete these tasks:
You cannot use the Create command if the repository database already contains repository tables.
To use the Create command, you must have permission on the Repository Service in the domain.
The Create command uses the following syntax:
45
Informatica Training Day 3
29/04/2011
CreateConnection
Creates a source or target connection in the repository. The connection can be a relational or
application connection. Relational database connections for each relational subtype require a
subset of all CreateConnection options and arguments. For example, Oracle connections do not
accept the -z, -d, or -t options.
Use the -k option to specify attributes for application connections. The CreateConnection command
uses the following syntax:
When you create a new connection, you must enter a database type using the string associated
with that database type in pmrep. The strings are not case sensitive. Use quotes when entering a
string with spaces in an argument.
The -l option specifies the code page for the database connection. Enter the code page name you
want to assign to the database connection. For example, to assign the US-ASCII code page to the
database connection, enter the code page name “US-ASCII.”
Changing the database connection code page can cause data inconsistencies if the new code page
is not compatible with the source or target database connection code pages. Also, if you configure
the Integration Service for data code page validation, changing the database connection code page
can cause sessions to fail if the source database connection code page is not a subset of the target
database connection code page
46
Informatica Training Day 3
29/04/2011
CreateDeploymentGroup
Creates a deployment group. You can create a dynamic or static deployment group. To create a
dynamic deployment group, you must supply a query name, and indicate whether the query is
private or public.
The CreateDeploymentGroup command uses the following syntax:
47
Informatica Training Day 3
29/04/2011
CreateFolder
Creates a new folder in the repository. You cannot create a folder in a non-versioned repository.
The CreateFolder command uses the following syntax:
Assigning Permissions
You can assign owner, group, and repository permissions by entering three digits when you use the
-p option. The first digit corresponds to owner permissions, the second corresponds to the
permissions of the group that the user belongs to, and the third corresponds to all other
permissions.
Enter one number for each set of permissions. Each permission is associated with a number.
Designate 4 for read permission, 2 for write permission, and 1 for execute permission. To assign
permissions, you enter 4, 2, 1, or the sum of any of those numbers.
For example, if you want to assign default permissions, use the following command syntax:
-p 764
This gives the folder owner read, write, and execute permissions (7 = 4+2+1). The owner’s group
has read and write permissions (6 = 4+2). All others have read permission.
The command returns “createfolder successfully completed” or returns “createfolder failed”
message. The creation might fail for the following reasons:
48
Informatica Training Day 3
29/04/2011
CreateLabel
Creates a label that you use to associate groups of objects during development. You can associate
a label with any versioned object or group of objects in a repository.
The CreateLabel command uses the following syntax:
49
Informatica Training Day 3
29/04/2011
Delete
Deletes the repository tables from the repository database.
Before you use the Delete command, you must connect to the repository and provide a user name
and password or password environment variable.
When you use the Delete command, the Repository Service must be running in exclusive mode.
You can configure the Repository Service to run in exclusive mode in the Administration Console or
you can use the infacmd UpdateRepositoryService command.
The Delete command uses the following syntax:
50
Informatica Training Day 3
29/04/2011
DeleteConnection
Deletes a relational connection from the repository.
The DeleteConnection command uses the following syntax:
51
Informatica Training Day 3
29/04/2011
DeleteDeploymentGroup
Deletes a deployment group. If you delete a static deployment group, you also remove all objects
from the deployment group.
The DeleteDeploymentGroup command uses the following syntax:
52
Informatica Training Day 3
29/04/2011
DeleteFolder
Deletes an existing folder from the repository.
The DeleteFolder command uses the following syntax:
deletefolder -n <folder_name>
53
Informatica Training Day 3
29/04/2011
DeleteLabel
Deletes a label and removes the label from all objects that use it. If the label is locked, the delete
fails.
The DeleteLabel command uses the following syntax:
54
Informatica Training Day 3
29/04/2011
DeleteObject
Deletes an object. Use DeleteObject to delete a source, target, user-defined function, mapplet,
mapping, session, worklet or workflow.
The DeleteObject command uses the following syntax:
You can run the DeleteObject Command against a non-versioned repository. If you run the
DeleteObject Command against a versioned repository, pmrep returns the following error:
This command is not supported because the versioning is on for the repository <Repository
name>.Failed to execute DeleteObject
55
Informatica Training Day 3
29/04/2011
DeployDeploymentGroup
Deploys a deployment group. You can use this command to copy a deployment group within a
repository or to a different repository.
To use this command, you must create a control file with all the specifications that the Copy Wizard
requires. The control file is an XML file defined by the depcntl.dtd file.
If pmrep cannot immediately acquire object locks in the target repository, by default it waits
indefinitely to acquire the locks.
You can use the deployment control file parameters to specify a deployment timeout. The
deployment timeout is the period of time (in seconds) that pmrep waits to acquire locks. A value of 0
fails the deployment if pmrep cannot immediately acquire locks. The default value is -1, which
instructs pmrep to wait indefinitely to acquire the locks.
Press Ctrl+C to cancel the deployment during the deployment operation or while pmrep is waiting to
acquire object locks.
The DeployDeploymentGroup command uses the following syntax:
56
Informatica Training Day 3
29/04/2011
DeployFolder
Deploys a folder. You can use this command to copy a folder within a repository or to a different
repository.
To use this command, you must create a control file with all the specifications that the Copy Wizard
requires. The control file is an XML file defined by the depcntl.dtd file.
If pmrep cannot immediately acquire object locks in the target repository, by default it waits
indefinitely to acquire the locks.
You can use the deployment control file parameters to specify a deployment timeout. The
deployment timeout is the period of time (in seconds) that pmrep waits to acquire locks. A value of 0
fails the deployment if pmrep cannot immediately acquire locks. The default value is -1, which
instructs pmrep to wait indefinitely to acquire the locks.
Press Ctrl+C to cancel the deployment during the deployment operation or while pmrep is waiting to
acquire object locks.
The DeployFolder command uses the following syntax:
57
Informatica Training Day 3
29/04/2011
ExecuteQuery
Runs a query. You can choose to display the result or write the result to a persistent input file. If the
query is successful, it returns the total number of qualifying records.
Use this file as input to the ApplyLabel, AddToDeploymentGroup, and Validate commands.
The ExecuteQuery command uses the following syntax:
58
Informatica Training Day 3
29/04/2011
Exit
Exits from the pmrep interactive mode.
The command line mode invokes and exits pmrep each time you issue a command.
The Exit command uses the following syntax:
Exit
59
Informatica Training Day 3
29/04/2011
FindCheckout
Displays a list of checked out objects in the repository. The listing contains the checked-out items
unless you enter “all users.”
If you choose an object type, then you can list checked-out objects in a specific folder or across all
folders. If you do not specify an object type, pmrep returns all the checked-out objects in the
repository.
The FindCheckout command uses the following syntax:
60
Informatica Training Day 3
29/04/2011
GetConnectionDetails
Lists the properties and attributes of a connection object as name-value pairs.
To use the GetConnectionDetails command, you need read permission on the connection object.
The GetConnectionDetails command uses the following syntax:
61
Informatica Training Day 3
29/04/2011
Help
Returns the syntax for the command you specify. If you do not specify a command, then syntax for
all of the pmrep commands is displayed.
The Help command uses the following syntax:
help [command]
-or-
-help [command]
62
Informatica Training Day 3
29/04/2011
KillUserConnection
Terminates user connections to the repository. You can terminate user connections based on the
user name or connection ID. You can also terminate all user connections to the repository.
The KillUserConnection command uses the following syntax:
63
Informatica Training Day 3
29/04/2011
ListConnections
Lists all connection objects in the repository and their respective connection types. A connection
can be one of the following types:
• Application
• FTP
• Loader
• Queue
• Relational
64
Informatica Training Day 3
29/04/2011
ListGroupsForUser
Lists all groups that a user belongs to.
The ListGroupsForUser command uses the following syntax:
listgroupsforuser -n <user_name>
65
Informatica Training Day 3
29/04/2011
ListObjectDependencies
Lists dependency objects for reusable and non-reusable objects. If you want to list dependencies
for non-reusable objects, you must use a persistent input file containing object IDs. You can create
this file by running a query and choosing to create a text file.
ListObjectDependencies accepts a persistent input file and it can create a persistent output file.
These files are the same format. If you create an output file, use it as input to the ApplyLabel,
AddToDeployment Group, or Validate pmrep commands.
ListObjectDependencies returns the number of records if the command runs successfully.
The ListObjectDependencies command uses the following syntax:
66
Informatica Training Day 3
29/04/2011
ListObjects
Returns a list of objects in the repository. When you list objects, pmrep returns object metadata.
Use the following list operations:
Use ListObjects in a shell script to return the object metadata, parse the metadata, and then use the
parsed data in another pmrep command.
For example, use ListObjects to list all Sequence Generator transformations in the repository.
Create a shell script that uses ListObjects to return Sequence Generator transformation information,
parse the data ListObjects returns, and use UpdateSeqGenVals to update the sequence values.
pmrep returns each object in a record and returns the metadata of each object in a column. It
separates records by a new line by default. You can enter the characters to use to separate records
and columns. You can also enter the characters to indicate the end of the listing.
Tip: When you enter characters to separate records and columns and to indicate the end of the
listing, use characters that are not used in repository object names. This helps you use a shell script
to parse the object metadata.
The ListObjects command uses the following syntax:
Do not use the -f option if the object type you list is not associated with a folder. The deployment
group, folder, label, and query object types are not associated with folders. All other object types
require the -f option.
Use the object_type option to define the objects you want to list. The command lists the latest
versions or checked out versions of objects, including shortcuts.
Listing Folders
Use ListObjects to return each folder in the repository. When you enter folder for the object type,
pmrep ignores the subtype and folder name.
For example, to list all folders in the repository, use the following syntax:
listobjects -o folder
Alternatively, you can enter a different column separator and end of listing indicator:
Listing Objects
Use ListObjects to list reusable and non-reusable objects in the repository or in a folder. pmrep
does not include instances of reusable objects. When you list objects, you must include the folder
name for all objects that are associated with a folder.
67
Informatica Training Day 3
29/04/2011
pmrep returns the name of the object with the path when applicable. For example, when a
transformation is in a mapping or mapplet, pmrep returns mapping_name.transformation_name or
mapplet_name.transformation_name.
For example, to list all transformation types in a folder, enter the following text at the prompt:
To list all Stored Procedure transformations in a folder, enter the following text at the prompt:
To list all sessions in a folder, enter the following text at the prompt:
68
Informatica Training Day 3
29/04/2011
ListTablesBySess
Returns a list of sources or targets used in a session. When you list sources or targets, pmrep
returns source or target instance names to the window. Use ListTablesBySess in a shell script with
other pmrep commands. For example, you can create a shell script that uses ListTablesBySess to
return source instance names and uses Updatesrcprefix to update the source owner name.
When you use ListTablesBySess, pmrep returns source and target instance names as they appear
in the session properties. For example, if the mapping contains a mapplet with a source, pmrep
returns the source instance name in the following format:
mapplet_name.source_name
For example, to list all sources in a reusable session, enter the following text at the prompt:
ITEMS
mapplet1.ORDERS
Shortcut_To_ITEM_ID
listtablesbysess completed successfully.
When the mapping contains a mapplet with a source, pmrep includes the mapplet name with the
source, such as mapplet1.ORDERS.
For example, you can list all targets in a non-reusable session in a workflow
target1_inst
ORDERS_BY_CUSTID
Shortcut_To_tgt2_inst
listtablesbysess completed successfully
69
Informatica Training Day 3
29/04/2011
ListUserConnections
Lists information for each user connected to the repository.
The ListUserConnections command uses the following syntax:
Listuserconnections
70
Informatica Training Day 3
29/04/2011
ModifyFolder
Modifies folder properties. You modify a folder in a non-versioned repository.
The command returns “ModifyFolder successfully completed” or returns “ModifyFolder Failed”
message. The modification might fail for the following reasons:
71
Informatica Training Day 3
29/04/2011
Notify
Sends notification messages to users connected to a repository or users connected to all
repositories managed by a Repository Service.
The Notify command uses the following syntax:
notify -m <message>
The command returns “notify successfully completed” or returns “failed to execute notify” message.
The notification might fail for the following reasons:
72
Informatica Training Day 3
29/04/2011
ObjectExport
Exports objects to an XML file defined by the powrmart.dtd file. You export an object by name. If
you enter an object, you must enter the name of the folder that contains it. If you do not enter a
version number, you export the latest version of the object.
Use a persistent input file to specify different objects to export at one time. You can create this file
by using the ExecuteQuery, Validate, or ListObjectDependencies pmrep commands. If you use the
persistent input file, do not use the other parameters to specify objects.
If you export a mapping, by default PowerCenter exports the mapping and its instances. If you want
to include dependent objects, you must add the appropriate pmrep options. You can optionally
include reusable and non-reusable dependent objects, objects referenced by shortcuts, and related
objects in a primary key-foreign key relationship.
To export mapping dependencies, you must use the -b and -r options.
The ObjectExport command uses the following syntax:
Examples
The following example exports a mapping named “map,” which is located in folder1, to a file named
map.xml:
The following example exports the objects identified in a persistent input file named
persistent_input.xml to a file named map.xml:
73
Informatica Training Day 3
29/04/2011
ObjectImport
Imports objects from an XML file. This command requires a control file to specify the objects to
import and how to resolve conflicts. The control file is an XML file defined by the impcntl.dtd file.
The ObjectImport command uses the following syntax:
The ObjectImport command does not create a folder if the folder name you enter does not exist in
the repository
74
Informatica Training Day 3
29/04/2011
PurgeVersion
Purges object versions from the repository database. You can purge versions of deleted objects
and active objects. An object is a deleted object if the latest version is checked in and it has the
version status Deleted. Other objects are active objects.
When you purge versions of deleted objects, you purge all versions. The deleted objects must be
checked in. You can purge versions for all deleted objects or for objects deleted before a specified
end time. You can specify the end time as a date and time, a date only, or a number of days before
the current date.
When you purge versions of active objects, you can specify purge criteria. You can specify the
number of versions to keep and purge the previous versions, and you can purge versions that are
older than a specified purge cutoff time. You cannot purge a checked-out version or the latest
checked-in version.
If you purge versions of a composite object, you need to consider which versions of the dependent
objects are purged.
The PurgeVersion command uses the following syntax:
You can use the -n option and the -t option together. They are not mutually exclusive.
Examples
The following example purges all versions of all deleted objects in the repository:
For optimal performance, purge at the folder level or use purge criteria to reduce the number of
purged object versions. Avoid purging all deleted objects or all older versions at the repository level.
The following example purges all but the latest checked-in version of objects in the folder1 folder:
The following example previews a purge of all object versions that were checked in before noon on
January 5, 2005, and outputs the results to the file named purge_output.txt:
75
Informatica Training Day 3
29/04/2011
Register
Registers a local repository with a connected global repository. You must connect to the global
repository before you register the local repository.
Also, you must run the Repository Service for the local repository in exclusive mode. You can
configure the Repository Service to run in exclusive mode in the Administration Console or you can
use the infacmd UpdateRepositoryService command.
The command returns “register successfully completed” or returns “failed to execute register”
message. The registration might fail for the following reasons:
76
Informatica Training Day 3
29/04/2011
RegisterPlugin
Registers an external plug-in to a repository. Registering a plug-in adds its functionality to the
repository. Use the RegisterPlugin command to update existing plug-ins.
When you use this command, the Repository Service must be running in exclusive mode. You can
configure the Repository Service to run in exclusive mode in the Administration Console or you can
use the infacmd UpdateRepositoryService command.
The RegisterPlugin command uses the following syntax:
If you want to use an external directory service to maintain users and passwords for a repository,
you must register the security module with the repository. Use the Registerplugin command to
register the security plug-in.
Example
You administer PowerCenter for an organization that has a centralized LDAP NIS for user
authentication. When you upgrade PowerCenter, you decide to use the LDAP for user
authentication. The upgrade installs the LDAP security module in the repository security folder. After
connecting to the repository with the Connect command, the administrator runs the pmrep
command to register the new external module with the repository:
The -l login name and -w login password options contain the valid NIS login information for the user
running the pmrep command. After registration, you must use this login name and password to
access the repository.
The login name and password must be valid in the external directory, or the administrator cannot
access the repository using LDAP.
The -i option contains the XML file name that describes the security module.
77
Informatica Training Day 3
29/04/2011
Restore
Restores a repository backup file to a database. The target database must be empty.
The pmrep Restore command uses the following syntax:
Example
The following example restores a repository as a versioned repository and specifies the
administrator user name and password to retain the LDAP security module registration.
78
Informatica Training Day 3
29/04/2011
RollbackDeployment
Rolls back a deployment to purge a deployed version from the target repository or folder and revert
objects to a previous version of deployment. Use this command to roll back all the objects in a
deployment group that you deployed at a specific date and time. You cannot roll back part of the
deployment. To roll back, you must connect to the target repository.
To initiate a rollback, you must roll back the latest version of each object.
The RollbackDeployment command uses the following syntax:
For example, you have a deployment with five versions and want to rollback the last two versions.
You must first roll back the latest deployment. Enter the following text at the prompt to roll back
once to purge the last deployment:
rollbackdeployment -p Deploy_sales -t 1
Next, enter the following text to roll back the next to last deployment:
rollbackdeployment -p Deploy_sales -t 2
79
Informatica Training Day 3
29/04/2011
Run
Opens a script file containing multiple pmrep commands, reads each command, and runs them. If
the script file is UTF-8 encoded, you must use the -u option and the repository code page must be
UTF-8. If you run a UTF-8 encoded script file that includes the Connect command against a
repository that does not have a UTF-8 code page, the Run command will fail.
If the script file is not UTF-8 encoded, omit the -u option. If you use the -o option and the -u option,
pmrep generates the output file in UTF-8. If you use the -o option and omit the -u option, pmrep
generates the output file based on the system locale of the machine where you run pmrep.
The command returns “run successfully completed” or returns “run failed” message. The run might
fail if the Repository Service cannot open the script file or output file.
The Run command uses the following syntax:
80
Informatica Training Day 3
29/04/2011
ShowConnectionInfo
Returns the repository name and user information for the current connection.
Use the ShowConnectionInfo command in interactive mode. When you connect to a repository in
interactive mode, pmrep keeps the connection information in memory until you exit the repository or
connect to a different repository.
When you use the ShowConnectionInfo command in command line mode, a message indicating
failure to execute the command is given. pmrep does not keep connection information in command
line mode. The ShowConnectionInfo command does not connect to the repository.
The ShowConnectionInfo command uses the following syntax:
showconnectioninfo
81
Informatica Training Day 3
29/04/2011
SwitchConnection
Changes the name of an existing connection. When you use SwitchConnection, the Repository
Service replaces the relational database connections for all sessions using the connection in one of
the following locations:
• Source connection
• Target connection
• Connection Information property in Lookup transformations
• Connection Information property in Stored Procedure transformations
• $Source Connection Value session property
• $Target Connection Value session property
If the repository contains both relational and application connections with the same name and you
specified the connection type as relational in all locations in the repository, the Repository Service
replaces the relational connection.
For example, you have a relational and an application source, each called ITEMS. In a session, you
specified the name ITEMS for a relational source connection instead of Relational:ITEMS. When
you use SwitchConnection to replace the relational connection ITEMS with another relational
connection, pmrep does not replace any relational connection in the repository because it cannot
determine the connection type for the source connection entered as ITEMS.
The SwitchConnection command uses the following syntax:
82
Informatica Training Day 3
29/04/2011
TruncateLog
Deletes details from the repository. You can delete all logs, or delete logs for a folder or workflow.
You can also enter a date and delete all logs older than that date.
The command returns “truncatelog completed successfully” or returns “Failed to execute
truncatelog” message. The truncate operation might fail for the following reasons:
83
Informatica Training Day 3
29/04/2011
UndoCheckout
Reverses the checkout of an object. When you undo a checkout, the repository releases the write-
intent lock on the object and reverts to the most recently checked in version of the object. If you
want to modify the object again, you must check it out.
The UndoCheckout command uses the following syntax:
84
Informatica Training Day 3
29/04/2011
Unregister
Unregisters a local repository from a connected global repository.
To use this command, you must run the Repository Service for the local repository in exclusive
mode. You can configure the Repository Service to run in exclusive mode in the Administration
Console or you can use the infacmd UpdateRepositoryService command.
The command returns “unregister successfully completed” or returns “failed to execute unregister”
message. The registration might fail for the following reasons:
• The Repository Service for the local repository is not running in exclusive mode.
• The Repository Service failed to initialize information about the global repository.
• You failed to connect to the Repository Service.
85
Informatica Training Day 3
29/04/2011
UnregisterPlugin
Removes a plug-in from a repository. You can add and remove plug-ins to extend system
functionality. A plug-in is a software module that introduces new repository metadata.
When you use this command, the Repository Service must be running in exclusive mode. You can
configure the Repository Service to run in exclusive mode in the Administration Console or you can
use the infacmd UpdateRepositoryService command.
The UnregisterPlugin command uses the following syntax:
Use the UnregisterPlugin command to discontinue using an external security module with a
repository. If you unregister the external security module, PowerCenter switches to repository
authentication mode. All user passwords reset to the values in the repository instead of the values
in the external directory. When you unregister the security module, you do not lose the mapping
between the user names and the external security login names unless you enter the -g option. Use
the mapping again if you register a new security module.
Note: Although you can save the associations between external logins and user names, the
Repository Manager does not display the external logins while running under user authentication.
You must use the -w or -W option to create a new password when you unregister the security
module.
86
Informatica Training Day 3
29/04/2011
UpdateConnection
Updates the user name, password, connect string, and attributes for a database connection.
The command returns an “operation successfully completed” or returns “operation failed” message.
A failure might occur for the following reasons:
87
Informatica Training Day 3
29/04/2011
UpdateEmailAddr
Updates the session notification email addresses associated with the Email tasks assigned to the
session. If you did not previously enter a success or failure Email task for the session, the command
does not update the email addresses. You can update the email notification addresses for a non-
reusable session with a unique name in the folder. You can enter different addresses to receive
either success or failure notifications. This command requires you to connect to a repository.
The UpdateEmailAddr command uses the following syntax:
88
Informatica Training Day 3
29/04/2011
UpdateSeqGenVals
Updates one or more of the following properties for the specified Sequence Generator
transformation:
• Start Value
• End Value
• Increment By
• Current Value
You might want to update sequence values when you move a mapping from a development
environment to a production environment. Use the UpdateSeqGenVals command to update
reusable and non-reusable Sequence Generator transformations. However, you cannot update
values for instances of reusable Sequence Generator transformations or shortcuts to Sequence
Generator transformations.
The UpdateSeqGenVals command uses the following syntax:
89
Informatica Training Day 3
29/04/2011
UpdateSrcPrefix
Updates the owner name for session source tables. You can update the owner name for one or all
sources in a session. Updatesrcprefix updates the owner name for source tables at the session
level.
pmrep updates source table owner names if you previously edited the source table name in the
session properties.
The UpdateSrcPrefix command uses the following syntax:
90
Informatica Training Day 3
29/04/2011
UpdateStatistics
Updates statistics for repository tables and indexes.
The command returns “updatestatistics completed successfully” or returns “updatestatistics failed”
message.
The UpdateStatistics command uses the following syntax:
Updatestatistics
91
Informatica Training Day 3
29/04/2011
UpdateTargPrefix
Updates the table name prefix for session target tables. The table name prefix specifies the owner
of the table in the database. You can update the owner name for one or all targets specified in a
session. UpdateTargPrefix updates the target table name prefix at the session level.
pmrep updates table name prefixes if you previously edited the table name prefix at the session
level.
The UpdateTargPrefix command uses the following syntax:
92
Informatica Training Day 3
29/04/2011
Upgrade
Upgrades a repository to the latest version.
The Upgrade command uses the following syntax:
upgrade[-x <repository_password_for_confirmation> | -X
<repository_password_environment_variable_for_confirmation>]
93
Informatica Training Day 3
29/04/2011
Validate
Validates objects. You can output the results to a persistent output file or standard output. It also
displays a validation summary to stdout. The summary includes the number of valid objects, invalid
objects, and skipped objects. The persistent output file contains standard information, encoded IDs,
and a CRC check. You can save and check in the objects that change from invalid to valid.
You can validate the following types of objects:
• Mappings
• Mapplets
• Sessions
• Workflows
• Worklet objects
If you use another type of object in the input parameter, pmrep returns an error. If you use the
wrong type of object in a persistent input file, pmrep reports an error and skips the object.
The pmrep Validate command does not validate shortcuts.
When you run Validate, you can output information about object status:
validate {{-n <object_name> -o <object_type (mapplet, mapping, session, worklet, workflow)> [-v
<version_number>] [-f <folder_name>]} | -i <persistent_input_file>} [-s (save upon valid) [-k (check
in upon valid) [-m <check_in_comments>]]] [-p <output_option_types (valid, saved, skipped,
save_failed, invalid_before, invalid_after, or all)>[-u <persistent_output_file_name>] [-a (append)] [-
c <column_separator>] [-r <end-of-record_separator>] [-l <end-of-listing_indicator>] [-b (verbose)]
94
Informatica Training Day 3
29/04/2011
Version
Displays the PowerCenter version and Informatica trademark and copyright information.
The Version command uses the following syntax:
Version
95