MSDN Library

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:
© 2016 Microsoft