How to automate PCT real-time migrations through Deployment Solution
Updated On:03-10-2014 08:46
How can custom data tokens be used in Deployment Solution jobs to automate PCT real-time migrations?
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 real-time migrations. 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 real-time 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 Source_Computer_Name as the primary key for this table.
Save the new table as PCT_RTM_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>
Create a new job called PCT_RTM.
In the PCT_RTM job, add a Run Script task.
Enter the following for the script. This is case-sensitive, so it would be best to cut and paste. Remember to change ServerName to match the name of your server.
\\ServerName\express\PCT\PCTWiz.exe -rt:network=%#Custom*"select Destination_Computer_Name from PCT_Distribution_Map where Source_Computer_Name = '%COMPNAME%'"% -p:\\ServerName\express\PCT\EN\default.pbt -q
Note: Users may want to add additional switches such as -user: or -usermap: to make the migration more specific. This example uses the default.pbt template file that is included with the PCT install but the switch can be changed to point to any template file.
Now, open the PCT_RTM_Map 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 the PCT_RTM job on the source computer and it will perform the real-time migration to the destination computer that is setup in the PCT_RTM_Map table.