Skip to content

Better error handling and verbosity - #16

Merged
potatoqualitee merged 1 commit into
dataplat:masterfrom
sqlslinger-zz:master
Apr 6, 2016
Merged

Better error handling and verbosity#16
potatoqualitee merged 1 commit into
dataplat:masterfrom
sqlslinger-zz:master

Conversation

@sqlslinger-zz

Copy link
Copy Markdown

Fixes a bug where previous script could error and not process rest of commands. Now processes each process and account singly and indicates if already exists. Also more correctly supports Verbose and Confirm switches.

Fixes a bug where previous script could error and not process rest of
commands.  Now processes each process and account singly and indicates
if already exists.  Also more correctly supports Verbose and Confirm
switches.
@potatoqualitee
potatoqualitee merged commit 484b4cb into dataplat:master Apr 6, 2016
@potatoqualitee

Copy link
Copy Markdown
Member

Thanks @sqlslinger !

@sqlslinger-zz

Copy link
Copy Markdown
Author

Sure, Chrissy. Love how fast you respond to these pull requests. This is
my first time using GitHub and I'm marveling at the efficiency.

Vince

On Wed, Apr 6, 2016 at 5:35 PM, Chrissy LeMaire notifications@github.com
wrote:

Thanks @sqlslinger https://github.com/sqlslinger !


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#16 (comment)

potatoqualitee pushed a commit that referenced this pull request Jul 21, 2026
Invoke-DbaDbMirroring creates a "Mirroring" database-mirroring endpoint on BOTH
instances to establish the session. Both suites tore down the mirrors and the
databases but never the endpoints, so every run left them behind on the Multi
pair. specs/lab-requirements.md requires those instances to be endpoint-free and
LAB-12 enforces it, so preflight failed chronically - and a check that is always
red is a check everyone learns to ignore, which is how the LAB-02 constants drift
survived 14 days (#5).

Measured: both sqldev and sqlcluster carried a leaked "Mirroring" endpoint with 0
mirrored databases in use. Dropped them; they came back on the next mirror run,
which is what made this issue #16 rather than one-off cruft.

Adds endpoint teardown as the third cleanup step, following the pattern
Copy-DbaEndpoint.Tests.ps1:60-61 already uses. In Get-DbaDbMirrorMonitor it goes
in the existing finally so it survives a throwing mirror teardown.

Swept all three suites that call Invoke-DbaDbMirroring; Invoke-DbaDbMirroring's
own suite already removed its endpoints (on the Copy pair).

NOT yet verified end to end: #16 asks that LAB-12 be green AFTER the suites run.
Get-DbaDbMirrorMonitor currently hard-kills the PowerShell process mid-suite (#19),
so its AfterAll never executes and the endpoints still leak from that suite. The
teardown here is correct but unreachable until #19 is fixed.

(do Get-DbaDbMirror, Get-DbaDbMirrorMonitor)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants