ScriptingOptions.BatchSize Property
Applies To: SQL Server 2016 Preview
Gets or sets the number of statements after which to script batch terminator.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
public int BatchSize { get; set; }
public:
property int BatchSize {
int get();
void set(int value);
}
member BatchSize : int with get, set
Public Property BatchSize As Integer
Property Value
Type: System.Int32
A Int32 value that indicates the number of insert statements that are scripted before a batch terminator is inserted.
Remarks
The default for this property is 1.
Examples
Legacy Code Example
The following code example sets the scripts batch size to 10.
Visual Basic
Dim scOps As New ScriptingOptions()
scOps.BatchSize = 10
PowerShell
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.BatchSize = 10
See Also
ScriptingOptions Class
Microsoft.SqlServer.Management.Smo Namespace
Scripting
Return to top