Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-SqlJob may be duplicating actions #135

Closed
dansqldba opened this issue Aug 16, 2016 · 2 comments
Closed

Copy-SqlJob may be duplicating actions #135

dansqldba opened this issue Aug 16, 2016 · 2 comments

Comments

@dansqldba
Copy link
Contributor

During testing for PR #133 I noticed the -Whatif output seemed to be duplicating.

What if: Performing the operation "Creating Job Some Report Job" on target "somesqlserver".
What if: Performing the operation "Creating Job Some Report Job" on target "somesqlserver".
What if: Performing the operation "Showing finished message" on target "console".

Without the WhatIf (still including -Verbose, easier to see when you remove the Write-Verbose $sql line, otherwise verbose outputs all the SQL used):

VERBOSE: Performing the operation "Creating Job Some Report Job" on target "somesqlserver".
Copying Job Some Report Job
VERBOSE: Performing the operation "Creating Job Some Report Job" on target "somesqlserver".
Disabling Some Report Job on somesqlserver
VERBOSE: Performing the operation "Showing finished message" on target "console".
Job migration finished

@MikeFal
Copy link
Contributor

MikeFal commented Aug 16, 2016

Something I observed when using Copy-SqlJob. I was using the -DisableOnDestination flag and when I used -WhatIf, I got two messages for each action. However, when I ran the actual migration, I only got one actual execution. So it might just be how the -WhatIf info is being displayed.

@MikeFal
Copy link
Contributor

MikeFal commented Aug 16, 2016

The issue was with the $Pscmdlet.ShouldProcess messaging for the Disable block. Fixed in #142.

@MikeFal MikeFal closed this as completed Aug 16, 2016
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

No branches or pull requests

2 participants