Transfer.EnumScriptTransfer Method

Creates a Transact-SQL command batch script used to transfer database objects or database objects and data to another database instance.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

public IEnumerable<string> EnumScriptTransfer()

Return Value

Type: System.Collections.Generic.IEnumerable<String>
An IEnumerable string list interface that contains the script.

EnumScriptTransfer returns a script for the database as an enumerable interface. The returned IEnumerable can be used to iterate through each statement in the resulting script. This method will use ScriptData() to check if data should be included in the generated script.

Community Additions