Skip to content

Conversation

@niphlod
Copy link
Contributor

@niphlod niphlod commented Nov 27, 2017

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
  • Nunit test is included
  • Documentation
  • Build system

Purpose

Reissue of #2442, which is a reissue of #2030 . Please merge ASAP, keeping tracks is starting to be extremely difficult.


dbatools PowerShell module (https://dbatools.io, clemaire@gmail.com)
Copyright (C) 2016 Chrissy LeMaire
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update this to current license statement

@wsmelton
Copy link
Member

Just curious if the -Preview output should look like this...It didn't actual do any changes, but the way that output appears it looks like it did unless you pay close attention to the output:
image

Shouldn't that be using WhatIf instead of having a parameter for it called -Preview?

Just one more small thing...if an operation requires setting the database offline and that fails I don't think it is best to keep going with the changes and leaving "low hanging fruit" like "You are in charge of moving the files to the new location".
image

I obviously don't know how to use this one 😝
image

I think overall it is a good first round but believe it is going to be too easy for folks to dork up their databases with those placeholders. We will likely need a good blog post or something to point folks at starting out. Then as we get more folks using it figure out how (or if we can) fine tune it.

@wsmelton
Copy link
Member

I'm up for merging it but will leave that to @potatoqualitee ... I mean we have to start somewhere and just wait for feedback to come in on it.

@niphlod
Copy link
Contributor Author

niphlod commented Nov 28, 2017

yeah, apparently no better ideas came around during code review so we should hear from users pretty soon. The original requested feature-set is in. Lemme fix the license and try to figure out your issue, then I think it can be merged.

@potatoqualitee
Copy link
Member

I'd love to merge! Then we'll ask for some testers. @wsmelton - feel free to merge and ping me once you and niph are ready. then i'll add it to psd1

@wsmelton
Copy link
Member

I would say we push this one out as a "beta" type thing, get folks using it in their test environments and then have them offer feedback/suggestions. Especially since we cannot test for every possible scenario of file configurations in a database.

@niphlod
Copy link
Contributor Author

niphlod commented Nov 28, 2017

on the "leave the low hanging fruit" theme, unfortunately it's kinda chicken/egg problem: nothing can be moved until the db is put offline (files are locked if db is online), and there's no way to pre-check if a move can be done. Maybe it should try to rollback the changes, but it's not that simple.

@wsmelton : the error shown seems to point out you can't Get-DbaFile -sqlinstance matanarms\sql11 -path 'c:\program files\microsoft sql server\mssql11.sql11\mssql\data' , can you confirm ?

@potatoqualitee potatoqualitee merged commit 71962ca into dataplat:development Nov 29, 2017
@potatoqualitee
Copy link
Member

Yesssss thanks @niphlod ! Adding this and alerting Rob Volk who originally requested it.

@niphlod niphlod deleted the new/Rename-DbaDatabase branch April 5, 2018 18:16
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