Transferring Data

The Transfer class is a utility class that provides tools to transfer objects and data.

Objects in the database schema are transferred by executing a generated script on the target server. Table data is transferred with a dynamically created DTS package.

The Transfer object contains all the functionality of the Transfer objects in DMO and additional SQL Server 2005 functionality. However, in SMO, the Transfer object uses DTS to transfer data. Also, the methods and properties that are used to perform data transfers reside on the Transfer object instead of the Database object. Moving functionality from the instance classes to utility classes is consistent with a lighter object model because the code for specific tasks is loaded only when it is required.

The Transfer object does not support data transfers to a target database that has a CompatibilityLevel less than the version of the instance of Microsoft SQL Server.

Specifically,

  • SQL Server 2005 does not support data transfer to databases with CompatibilityLevel property of Version80.
  • SQL Server 2005 does not support data transfer to databases running SQL Server version 7.0.