You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Remove-DbaCustomError.ps1
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -108,13 +108,36 @@ function Remove-DbaCustomError {
108
108
109
109
if ($Pscmdlet.ShouldProcess($instance,"Removing server message with id $MessageID from $instance")) {
110
110
Write-Message-Level Verbose -Message "Removing server message with id $MessageID and language $Language from $instance"
111
+
112
+
# Use sp_dropmessage directly - more reliable than SMO Drop() method
113
+
# sp_dropmessage handles the proper drop order automatically
111
114
try {
112
-
# find the message using language or languageID or the 'session language' message if they specified 'all'. SMO will drop all related messages for an ID if the english message is dropped.
0 commit comments