5 Replies Latest reply on May 1, 2014 9:29 AM by Ramakrishna N

    Connection Name change for entire folder

    Ramakrishna N Active Member

      Hi,

       

      We have a folder and it contains ~250 worklfows and all sessions are using same source connection.

      The session are contains reusable mapplets and mapplets containes stored procedure.

       

      Now,we would like to change the source connections from "src_conn_1" to "src_conn_new" from repository tables.

       

      Other wise, each worklfow has change by manually.

       

      Informatica version: 9.0

       

      Can you please help us,How to change the connection name in all sessions and mapplets  using " pmrep massupdate" or any Sql queries to update the repository tables.

        • 1. Re: Connection Name change for entire folder
          vivekinfa Guru

          Exporting all the 250 workflows as an xml, changing the connection name and reimporting back could be an option too. I have to be honet here. I did not give it a try though.

           

          Also there is a limit on the size of the XML file which can be imported back inside PowerCenter and i believe it is 10MB.

           

          - Vivek

          1 of 1 people found this helpful
          • 2. Re: Connection Name change for entire folder
            rvanderk Guru

            You can import much larger files than 10 MB into PowerCenter, but it might take some time through the client utilities. Exporting/importing using the pmrep commandline utility is normally faster.

             

            Your recommended approach is OK, you can search and replace the connection names in the exported XML file. The workflow manager also provides the 'replace connection' option, but this works on repository-level instead of folder-level.

            • 3. Re: Re: Connection Name change for entire folder
              New Member

              One can use the Informatica Command Line to export the folder to xml.  Then do Find|Replace on the connection name then import the folder to the Repository.  Folder export (to my knowledge) can only be done via the Informatica Command line.

               

              This is the way to do it in Windows:

              ex:  %PMPATH%\pmrep.exe ObjectExport -f "%NAME%" -u "D:\software\Tools\Repo_Folder_Exports\%NAME%_Export.xml" -l "D:\software\Tools\Repo_Folder_Exports\%NAME%_Export.log"

              1 of 1 people found this helpful
              • 4. Re: Connection Name change for entire folder
                Guru

                pmrep massUpdate is the wrong tool here.

                If you're fine with changing all connections in the whole repository, you could also use "pmrep switchConnection" (this function has been designed specifically to replace every relational connection of a given name by a relational connection of a different name).

                So you could also go a different road:

                1. Set up a temporary repository.
                2. Copy the folder in question to this temporary repository.
                3. Define the new connection in the Workflow Manager within this temporary repository and in your "real" repository.
                4. Use "pmrep switchConnection" in this temporary repository.
                5. Copy the folder contents back to the "real" repository.
                6. Remove the temporary repository (first the contents, then the repository service).

                 

                Regards,

                Nico

                • 5. Re: Connection Name change for entire folder
                  Ramakrishna N Active Member

                  Thank you all.

                   

                  I have done with follwoing steps.

                   

                  1. Created a Unix script

                  2.find the list of worklfows in the folder

                  3.Export the Worklfow sml each worklfow and update the connection with unix script

                  4.Import to folder

                   

                  .