Professional Documents
Culture Documents
Abstract
The complete deployment process involves identifying objects for deployment in a development environment, copying the objects to a test environment and validating the deployed objects, or rolling the objects back for modification. You can use a control file to provide parameters for deployment. You can use pmrep commands or scripts containing pmrep commands to complete a deployment.
Table of Contents
Overview ........................................................................................................................................................................... 2 Steps to Complete a Deployment ..................................................................................................................................... 3 Create the Object Query ................................................................................................................................................... 3 Deployment through pmrep Commands ........................................................................................................................... 3 Connect to the Repository ............................................................................................................................................ 3 Run the Object Query................................................................................................................................................... 4 Create the Deployment Group...................................................................................................................................... 4 Create the Deployment Control File ............................................................................................................................. 5 Deploy the Objects ....................................................................................................................................................... 6 Validate the Deployment .............................................................................................................................................. 6 Roll Back the Deployment ............................................................................................................................................ 7 Deployment through Scripts.............................................................................................................................................. 7 Run the Query .............................................................................................................................................................. 8 Create a Deployment Group......................................................................................................................................... 8 Deploy Objects ............................................................................................................................................................. 8 Validate the Objects ..................................................................................................................................................... 8 Roll Back Objects ......................................................................................................................................................... 9
Overview
After you create objects in the development repository you can deploy them to the test repository to test the objects. You can roll back the objects to the development repository in case of modification. You can use a deployment group to copy the objects in the development repository to the test repository. Before you copy a deployment group, you must identify the object types and the dependent objects that you want to deploy. To identify objects, you can use an associated object query with a dynamic deployment group. You can run the query and write the results to a persistent output file. Create a deployment control file depending on the operation and content of the deployment group that you want to copy and the target repository type. Use pmrep commands in the interactive mode or run executable scripts containing pmrep commands in the command line mode. For more information about pmrep command options and arguments, see the PowerCenter Command Reference.
The sample deployment control file and scripts are included as attachments to this article. You can download these files to the following directory:
<PowerCenter Installation Directory>\client\bin
AND Object Type Check-in Time Is Equal to Within Last (Days) Session 120
To run the pmrep Connect command: 1. At a command prompt, change to the directory where the pmrep executable is located. The pmrep executable is located in the <PowerCenter Installation Directory>\client\bin folder. For example, enter
Informatica\PowerCenter8.6.1\client\bin
2. 3.
Enter pmrep. Enter the Connect command and its options and arguments. For example, enter the following command:
connect r HR_85 d Development n joe x joe
The command line displays a message indicating that you connected to the repository successfully.
pmrep ExecuteQuery
The ExecuteQuery command uses the following syntax:
executequery -q <query_name> [-t <query_type (shared or personal)>] [-u <output_persistent_file_name>] [-a (append)] [-c <column_separator] [-r <end-of-record_separator>] [-l <end-of-listing_indicator>] [-b (verbose)]
To run pmrep ExecuteQuery: 1. At the pmrep command prompt enter the ExecuteQuery command options and arguments. For example, enter the following command:
executequery q ListOfValidObjects t Shared u list_of_valid_objects
The command line displays a message stating the total number of records returned as the results of a successful query. The persistent output file appears in the following directory:
<PowerCenter Installation Directory>\client\bin
pmrep CreateDeploymentGroup
The CreateDeploymentGroup command uses the following syntax:
createdeploymentgroup -p <deployment_group_name> [-t <deployment_group_type (static or dynamic)>] [-q <query_name>] [-u <query_type (shared or personal)>] [-c <comments>]
To run pmrep CreateDeploymentGroup: 1. At the pmrep command prompt, enter the CreateDeploymentGroup command options and arguments. For example, enter the following command:
createdeploymentgroup p HR_ListOfValidObjects t dynamic q ListOfValidObjects u Shared
The command line displays a message indicating that the CreateDeploymentGroup command completed successfully.
You can download sample dg.xml to use with the deployment process examples.
Note: If you include the VALIDATETARGETREPOSITORY attribute in the deployment control file, the Repository Service validates all objects in the target repository. To validate deployment group objects, use the pmrep Validate command.
pmrep DeployDeploymentGroup
The DeployDeploymentGroup command uses the following syntax:
deploydeploymentgroup -p <deployment_group_name> -c <control_file_name> -r <target_repository_name> [-n <target_repository_user_name> [-s <target_repository_user_security_domain>] [-x <target_repository_password> | -X <target_repository_password_environment_variable>] [-d <target_domain_name> | {-h <target_portal_host_name> -o <target_portal_port_number>}]] (only if target is in a differentdomain) [-l <log_file_name>]
To run pmrep DeployDeploymentGroup: 1. At the pmrep command prompt, enter the DeployDeploymentGroup command options and arguments. For example, enter the following command:
deploydeploymentgroup p HR_ListOfValidObjects c dg.xml r Samples_87 n joe x joe d Development l DeploymentLogFile
The command line displays the deployment output and states that the DeployDeploymentGroup command completed successfully.
pmrep Validate
The Validate command uses the following syntax:
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)]
To run pmrep Validate: 1. At the pmrep command prompt, enter the Validate command options and arguments. For example, enter the following command:
validate i list_of_valid_objects
The command line displays the validation summary and states that the validate command completed successfully.
pmrep RollbackDeployment
The RollbackDeployment command uses the following syntax:
rollbackdeployment -p <deployment_group_name> -t <nth_latest_deploy_run>
To run pmrep RollbackDeployment: 1. At the pmrep command prompt, enter the RollbackDeployment command options and arguments. For example, enter the following command:
rollbackdeployment p HR_ListOfValidObjects t 1
The command line displays the rollback information and states that the RollbackDeployment command succeeded.
When you run a script from the command line, information messages are written to action.txt and error messages are written to error.txt. You can find the information and message text files in the following location:
<PowerCenter Installation Directory>\client\bin
Deploy Objects
Create a script that invokes the pmrep Connect and pmrep DeployDeploymentGroup commands. For example, the sample script invokes the pmrep deploydeploymentgroup command and allows the -p <deployment_group_name>, -r < target_repository_name>, -n < target_repository_user_name>, -x < target_repository_password>, and -l < log_file_name> options to be entered in the command line. At the command prompt, enter the following text:
DeployDeploymentGroup HR_ListOfValidObjects Samples_87 joe joe DeploymentLogFile
Author
Radhika Singh Technical Writer