Académique Documents
Professionnel Documents
Culture Documents
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:
The correct session property name specified and the wrong session property type is
specified along with it.
The -g option is not specified while updating a session instance run-time option.
Please rate this solution and share your feedback on Marketplace Website.
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
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.
Please rate this solution and share your feedback on Marketplace Website.
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.
Please rate this solution and share your feedback on Marketplace Website.