Vous êtes sur la page 1sur 7

Name of Solution:

Script: Enable/Disable Text Session Log Property

Business Requirement:
Generate a script that will either enable or disable the write backwards compatible logs
option at the folder level using the massupdate command.

Solution URL:
https://community.informatica.com/solutions/2075

Supported Versions:
PowerCenter 9.1 and 9.5

Description:
Customer sometimes adopt a policy to enable or disable the writing of backwards
compatible logs. PowerCenter will write 2 copies of the log files file system if the write
compatible session logs flag is enabled. One is a binary encrypted format and the other is
an ASCII text equivalent version of the file. File system sizing has to be duplicated to
accommodate this option.
This can be accomplished using the pmrep massupdate.
Use MassUpdate to update a session property across multiple sessions when a PowerCenter
version changes a default value.
This allows you to update session properties for a set of sessions that meet specified
conditions. You can update all sessions in a folder or a list of sessions. To update a list of
sessions, create a persistent input file. The list can contain a specific list of sessions, or it
can contain conditions such as a name pattern or a property value. Use ExecuteQuery to
generate a persistent input file.
Using the attached query example, you can generate pmrep command syntax to affect
massupdate on multiple folders in a repository to enable/disable Write Backward
Compatible Session Log File property.
Command Syntax
pmrep connect
Above command connects a user 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

Please rate this solution and share your feedback on Marketplace Website.

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:
connect
-r <repository_name>
{-d <domain_name> |
{-h <portal_host_name>
-o <portal_port_number>}}
[-n <user_name>
[-s <user_security_domain>]
[-x <password> |
-X <password_environment_variable>]]
[-t <client_resilience>]
pmrep massupdate
This command allows user to update session properties for a set of sessions that meet
specified conditions. You can update all sessions in a folder or a list of sessions. To update a
list of sessions, create a persistent input file. The list can contain a specific list of sessions,
or it can contain conditions such as a name pattern or a property value. Use ExecuteQuery
to generate a persistent input file.
When you run MassUpdate, you can view information such as the folder name, the number
of sessions that are successfully updated or failed, and the names of the sessions that are
updated. You can view the status of the update in the command line window or in a log file
that the command generates. You specify the name and path for the log file when you run
the command. By default, the log file is stored in the directory where you run the command.

Please rate this solution and share your feedback on Marketplace Website.

Use MassUpdate to update a session property across multiple sessions when a PowerCenter
version changes a default value.
Note: You cannot update dependent session properties.
pmrep massupdate
-t <session_property_type (session_property, session_config_property,
transformation_instance_attribute, session_instance_runtime_option)>
-n <session_property_name>
-v <session_property_value>
[-w <transformation_type>]
{-i <persistent_input_file> | -f <folder_name> }
[-o <condition_operator (equal, unequal, less, greater)>]
[-l <condition_value>]
[-g <update_session_instance_flag>]
[-m <test_mode>]
[-u <output_log_file_name>]
The MassUpdate command returns massupdate successfully completed or returns failed
to execute massupdate message. The update might fail for the following reasons:

A valid attribute value pertaining to the attribute name is not specified.

The correct session property name specified and the wrong session property type is
specified along with it.

The -w option is not specified while updating a transformation instance attribute.

The -g option is not specified while updating a session instance run-time option.

User does not have the Repository Services Administrator role.

Download file contents:


1. Script

Steps to implement the solution:


Folder Listing and Command Generation
1. Open Toad or your SQL editor of choice.
2. Connect to the schema that contains the repository you are wanting to disable the
property for.

Please rate this solution and share your feedback on Marketplace Website.

3. Execute the following query


SELECT A.SUBJ_NAME AS FOLDER_NAME FROM OPB_SUBJECT A ORDER BY 1
This will provide the list of folders inside of the repository in alphabetical order.

Please rate this solution and share your feedback on Marketplace Website.

4. Execute the following queries to generate the syntax needed for the massupdate
command
To Enable: Query present in Enable_Command_Generation.sql

To Disable: Query present in Disable_Command_Generation.sql

Note you may want to adjust the path for the results file associated with the u
argument
5. Copy the results into a text file or shell script.

PMREP Massupdate Execution


6. Ensure ALL Users are disconnected from the repository. Ensure ALL objects are
checked in. Open a command line window. Navigate to a directory containing the
910 pmrep command as below.
Default Server Path INFA_Server_Install Directory\server\bin
Default Client Path - C:\Informatica\9.1.0\clients\PowerCenterClient\client\bin

7. Issue a pmrep connect command to connect to the appropriate repository

Please rate this solution and share your feedback on Marketplace Website.

Example: pmrep connect -d Domain_vm -r Repository_Service -n Administrator -x


Administrator

8. Execute the pmrep commands for the massupdate generated inside of the SQL Editor
Timing Results 35 folders containing 141 sessions completed in 3.5 minutes

9. Once commands are fully finished open the log file and review the results. Ensure
results are what were expected.

9.

Open

Workflow

Manager

and

review

the

Please rate this solution and share your feedback on Marketplace Website.

sessions

properties.

YouTube Video on Importing and Configuring Workflows:


http://www.youtube.com/playlist?list=PLLRreK2jjjgWBQ4NPfp0QWTxYDvlnEqSJ

Other Useful links:


Mapping Bundles
Workflow Bundles
Informatica Tools Bundles
Informatica for Social Media Bundles
Debugging Tools Bundles
Visio Templates Bundles
B2B Templates and Projects Bundles
Data Quality Packs and Plans Bundles
Script Bundles

Please rate this solution and share your feedback on Marketplace Website.

Vous aimerez peut-être aussi