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

Managed Instance restores #5309

Merged
merged 6 commits into from
Mar 27, 2019
Merged

Managed Instance restores #5309

merged 6 commits into from
Mar 27, 2019

Conversation

Stuart-Moore
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes #)
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

Implements #5297 and prevents non compatible parameters being pushed through to a managed instance

In draft as there's be some other bits to come as people spot issues or come up with other use cases. But only expecting it to be around a day or so.

Approach

Check the DatabaseEngineEdition property of the restore server. If it's SqlManagedInstance then check parameters and stop if anything that MI won't touch aren't being used.

If withreplace is needed and specified then do a drop/restore as traditional WithReplace isn't supported

Commands to test

$op = Get-DbaBackupHistory -SqlInstance localhost -database mitest | Restore-DbaDatabase -SqlCredential $cred -SqlInstance dbatoolsmi.cus19c972e4513d6.database.windows.net -TrustDbBackupHistory -DatabaseName tes3t  -verbose

@Stuart-Moore Stuart-Moore self-assigned this Mar 26, 2019
@Stuart-Moore Stuart-Moore marked this pull request as ready for review March 27, 2019 12:04
@Stuart-Moore Stuart-Moore merged commit fb12ddb into development Mar 27, 2019
@Stuart-Moore Stuart-Moore deleted the mirest2 branch March 27, 2019 17:43
@Stuart-Moore
Copy link
Contributor Author

Merging as I need it for the Copy-DbaDatabase work

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.

1 participant