Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ServerConnection.BatchSeparator Property

Gets or sets the string value used to separate batches in the referenced connection.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public string BatchSeparator { get; set; }

Property Value

Type: String
A String value that specifies the batch separator for the referenced connection. The default value is "GO".

The batch separator string contains a word that separates SQL statements into batches, typically "GO". This word is added if the NoCommandTerminator property is set to false.

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.BatchSeparator);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.BatchSeparator

Community Additions

Show:
© 2015 Microsoft