How to Automate Capture and Deployment of PCT Packages in Deployment Server
Updated On:23-09-2013 09:46
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:
Open the SQL Server Enterprise Manager.
Connect to the SQL Server and create a database called eXpress_Custom.
Expand the eXpress_Custom database and create a new table with the following columns:
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.)
Set the Destination_Computer_Name as the primary key for this table since you will not want two entries for the same Destination.
Save the new table as PCT_Distribution_Map.
Open the DS Console.
Go to Tools > Options > Custom Data Sources.
Add a Database Source with the following information:
Server: <Your SQL Server Name>
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.
Create a new job called PCT_Distribution
In the PCT_Distribution job, add a Distribute Personality task.
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
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.