A Data Transformation Services (DTS) package containing a specific configuration of DTS custom tasks, connection settings, and workflow is used to create a transformable subscription.
The connection from the DTS package to the Subscriber (destination connection) does not use the Microsoft SQL Server Replication OLE DB Provider for DTS; it uses whatever OLE DB provider is required to connect to the Subscriber. For example, you would use the Microsoft OLE DB Provider for SQL Server to send transformed data to a Microsoft® SQL Server™ 2000 Subscriber.
A DTS package created through replication is saved by default as a DTS SQL Server package (a DTS save option where the package is saved to local SQL Server tables in the msdb database); however, packages can also be saved as a DTS structured storage (.dts) file. Packages used with transformable subscriptions cannot be saved in the other available DTS save formats (repository, Microsoft Visual Basic® Script file, Visual Basic .bas file).
The DTS package can be read or overwritten only by a user operating under the sysadmin role, or by the package owner. Thus, Distribution Agents need to be run under the sysadmin account or the package owner account at the Distributor or Subscriber site. The optional package password is stored in MSDistribution_agents at the Distributor, or in the MSSubscription_properties table. If the package is stored at the Distributor, all the publication access list (PAL) users will have access to the package passwords defined for subscriptions on the publication. If the package is stored on the Subscriber, members of db_owner for the Subscriber database have access.
A DTS package used for transformable subscriptions consists of several DTS objects:
Main = DTSTransformStat_OK
Change Type | Value | Action |
---|---|---|
INSERT | 1 | Source data is from a row that was inserted at the source. |
UPDATE | 2 | Source data is from a row that was updated at the source. The data are values after the update. |
DELETE | 3 | Source data is from a row that was deleted at the source. |
BEFORE UPDATE | 4 | Source data is from a row that was updated at the source. The data are values before the update. This is used with horizontal partitions. |
Declaring the global variable is optional. When used, its value is set by the Distribution Agent. The global variable can be used with an ActiveX script or other transformation servers to determine the change type associated with the current row. Following is sample Microsoft Visual Basic code you might use to declare and use this global variable:
Dim oConnProperty As DTS.OLEDBProperty
Dim gVar As Integer
Dim oGlobal As DTS.GlobalVariable
Set oGlobal = goPackage.GlobalVariables.New("ReplicationChangeType")
oGlobal.Name = "ReplicationChangeType"
oglobal.Value = 0
goPackage.GlobalVariables.Add oGlobal
Set oGlobal = Nothing
You can debug ActiveX scripts in transformable subscription DTS packages. To debug your scripts:
For more information about how to debug scripts, see Debugging ActiveX Scripts.
To turn on just-in-time debugging
.