Command Reference > pmrep Command Reference > Using pmrep
  

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:
You can use environment variables to set user names and passwords for pmrep. Before you use pmrep, configure these variables. The environment variables apply to pmrep commands that run on the node.
All pmrep commands require a connection to the repository except for the following commands:
Use the pmrep Connect command to connect to the repository before using other pmrep commands.

Running Commands in Command Line Mode

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:
    pmrep command_name [-option1] argument_1 [-option2] argument_2...

Running Commands in Interactive Mode

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:
    1. At the command prompt, enter pmrepto invoke interactive mode.
    This starts pmrep in interactive mode and displays a pmrep> prompt. You do not have to type pmrep before each command in interactive mode.
    2. Enter a command and its options and arguments.
    At the prompt, enter:

    command_name [-option1] argument_1 [-option2] argument_2...
    pmrep runs the command and displays the prompt again.
    3. Type exit to end an interactive session.

Running Commands in Normal Mode and Exclusive Mode

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:
You can use the Administrator tool or infacmd to run the Repository Service in exclusive mode.

pmrep 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:

Using Native Connect Strings

Some pmrep commands, such as CreateConnection and Restore, require a native connect string.
The following table describes the native connect string syntax for each supported repository database:
Database
Connect String Syntax
Example
IBM DB2
dbname
mydatabase
Microsoft SQL Server
servername@dbname
sqlserver@mydatabase
Oracle
dbname.world (same as TNSNAMES entry)
oracle.world
Sybase ASE
servername@dbname
sambrown@mydatabase

Scripting pmrep Commands

When you use pmrep, you might use some commands with specific options and arguments on a regular basis. For example, you might use pmrep to perform a daily backup of a production repository. In this case, you can create a script file to call one or more pmrep commands including its options and arguments.
For example, the following Windows batch file, backupproduction.bat, connects to and backs up a repository called Production:
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
echo Backing up repository Production...
c:\PowerCenter\pmrep\pmrep backup -o c:\backup\Production_backup.rep
You can run script files from the command interface. You cannot run pmrep batch files in interactive mode.

Tips for Scripting pmrep Commands

Use the following tips when you create and run pmrep scripts:

Connection Subtypes

When you list or update a connection, you can specify the connection subtypes based on the associated connection type. Based on the repository plugins, the pmrep command lists the connection subtypes in the repository, by default.
The following table shows the list of connection subtypes for the associated type of connection:
Type of Connection
Connection Subtype
Relational
Sybase
Relational
Informix (Obsolete)
Relational
Microsoft SQL Server
Relational
DB2
Relational
ODBC
Relational
Teradata
Relational
Netezza
Relational
Vertica
Relational
PowerChannel for DB2
Relational
PowerChannel for Oracle
Relational
PowerChannel for MS SQL Server
Relational
PowerChannel for ODBC
Relational
PWX DB2zOS
Relational
PWX DB2i5OS
Relational
PWX DB2LUW
Relational
PWX Oracle
Relational
PWX MSSQLServer
Relational
PWX NRDB Lookup
Relational
Teradata PT Connection
Application
SAP BW
Application
SAP R3
Application
PeopleSoft Oracle
Application
PeopleSoft Sybase
Application
PeopleSoft Informix
Application
PeopleSoft MsSqlserver
Application
PeopleSoft Db2
Application
Siebel Oracle
Application
Siebel Sybase
Application
Siebel Informix
Application
Siebel MsSqlserver
Application
Siebel Db2
Application
SAP_ALE_IDoc_Reader
Application
SAP Type A
Application
SAP_BWOHS_READER
Application
SAP_ALE_IDoc_Writer
Application
SAP RFC/BAPI Interface
Application
JNDI Connection
Application
JMS Connection
Application
webMethods Broker
Application
webMethods Integration Server
Application
Web Services Consumer
Application
PWX NRDB Batch
Application
PWX NRDB CDC Change
Application
PWX NRDB CDC Real Time
Application
PWX DB2zOS CDC Change
Application
PWX DB2zOS CDC Real Time
Application
PWX DB2i5OS CDC Change
Application
PWX DB2i5OS CDC Real Time
Application
Http Transformation
Application
PWX Oracle CDC Change
Application
PWX Oracle CDC Real Time
Application
LMAPITarget
Application
Teradata FastExport Connection
Application
PWX MSSQL CDC Change
Application
PWX MSSQL CDC Real Time
Application
PWX DB2LUW CDC Change
Application
PWX DB2LUW CDC Real Time
Application
Salesforce Connection
Application
Hadoop HDFS Connection
FTP
FTP
External Loader
Teradata Mload External Loader
External Loader
Teradata Tpump External Loader
External Loader
DB2 EE External Loader
External Loader
DB2 EEE External Loader
External Loader
Teradata FastLoad External Loader
External Loader
Teradata Warehouse Builder External Loader
External Loader
HP NeoView Java Transporter
Queue
Message Queue
Queue
MSMQ