Export (0) Print
Expand All

Server.SystemMessages Property


Applies To: SQL Server 2016 Preview

Represents a collection of SystemMessage objects. Each SystemMessage object represents a system message defined on the instance of SQL Server.

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

	SfcContainerCardinality.ZeroToAny, typeof(SystemMessage))]
public SystemMessageCollection SystemMessages { get; }

Property Value

Type: Microsoft.SqlServer.Management.Smo.SystemMessageCollection

A SystemMessageCollection object that represents all the system messages defined on the instance of SQL Server.

The SystemMessages property points to the SystemMessageCollection object, which references the system messages on the instance of SQL Server. You can use the collection to reference the predefined system messages. Use the UserDefinedMessages property to access user-defined messages.

Legacy Code Example

Visual Basic

Code snippet is not found. Confirm that the code snippet name 'SMO How to' is correct.


$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$msg = $srv.SystemMessages.ItemByIdAndLanguage(14126, "us_english")
Write-Host $msg.ID, $msg.Text
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft