How to Automate Capture and Deployment of PCT Packages in Deployment Server


Article ID: 181512


Updated On:


Deployment Solution





How can custom data tokens be used in Deployment Server (DS) jobs to capture and deploy my PCT packages?


To use custom data tokens in the DS, create a custom database and table, add the credentials to access that custom database to the DS Options, and reference that custom database using tokens.

Here is an example of how to do the aforementioned process. This example will show how to create a custom data source to be used to map PCT Packages to new computers rather than to distribute them to the original computer that the package was taken from. Follow these guidelines, altering them slightly, to create a custom data source to do anything that is wanted.

Here are the step-by-step instructions on how to create a custom database that maps the source computer to the destination computer when doing PCT migrations:
  1. Open the SQL Server Enterprise Manager.
  2. Connect to the SQL Server and create a database called eXpress_Custom.
  3. Expand the eXpress_Custom database and create a new table with the following columns:
    • Destination_Computer_Name
    • Source_Computer_Name
  4. The data type for both columns must be char, and the length should be the number of characters in the longest computer name in the environment. (Windows XP will allow computer names of up to 64 characters.)
  5. Set the Destination_Computer_Name as the primary key for this table since you will not want two entries for the same Destination.
  6. Save the new table as PCT_Distribution_Map.
  7. Open the DS Console.
  8. Go to Tools > Options > Custom Data Sources.
  9. Add a Database Source with the following information:
    1. Alias: Custom
    2. Server: <Your SQL Server Name>
    3. Database: eXpress_Custom
    4. If you are trying to connect to remote SQL server do the following:

      To connect to remote SQL server(mentioned in custom data sources tab in tools option) from DS console there are two options, by using windows authentication or using SQL server authentication.

      1.     Windows authentication:

      a.      The check box Use integrated authentication should be checked in database source dialog in custom data source tab.

      b.     The user running the axengine should be domain user and have access to database on remote SQL server.

      2.     SQL server authentication:

      a.      The check box Use integrated authentication should be unchecked in database source dialog in custom data source tab.

      b.     The SQL server user credential should be provided in database source dialog in custom data source tab.
  10. Create a new job called PCT_Distribution
  11. In the PCT_Distribution job, add a Distribute Personality task.
  12. For the name, enter the following text. It is case-sensitive, so it would be best to cut and paste. Be sure to replace “PCT_Packages” with the location of your PCT Packages:

          .\PCT_Packages\%#Custom*"select Source_Computer_Name from PCT_Distribution_Map where Destination_Computer_Name = '%COMPNAME%'"%.exe
  13. Now, open the PCT_Distribution table that was just created and populate it with the names of the destination and source computers to migrate to and from, respectively. Then run a regular Capture Personality job followed by the new PCT_Distribution job just created. Remember, if you plan to schedule both jobs and leave for the evening, schedule both of them with enough time between them so that the Distribution jobs never run before all of the Capture jobs have completed.