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

Make Expand-DbaDbLogFile question clearer (or remove) #5912

Closed
alevyinroc opened this issue Jul 18, 2019 · 1 comment · Fixed by #5923
Closed

Make Expand-DbaDbLogFile question clearer (or remove) #5912

alevyinroc opened this issue Jul 18, 2019 · 1 comment · Fixed by #5923
Assignees

Comments

@alevyinroc
Copy link
Contributor

Summary of new feature

If the TargetLogSize parameter passed into Expand-DbaDbLogFile matches the suggested target log size, don't prompt the user for an override.

Example:

PS C:\> Expand-DbaDbLogFile -SqlInstance $SQL16 -Database Movies -ShrinkLogFile -ShrinkSize 16 -TargetLogSize 1024 -IncrementSize 1024;
Choose increment value for database 'Movies':
The input value for increment size was 1024MB. However the suggested value for increment is 1024MB.
Do you want to use the suggested value of 1024MB insted of 1024MB
[Y] Yes [N] No [?] Help (default is "Yes"):

Proposed technical details (if applicable)

Perform an additional test in the if block starting on line 418 to check that the suggested and requested log sizes are different. If they are not different, don't prompt the user.

Also, I'm contractually obligated to point out that "instead" is misspelled here :)

Latest version of dbatools as of writing

1.0.22

@alevyinroc alevyinroc self-assigned this Jul 18, 2019
@wsmelton
Copy link
Member

Why do we even make a suggestion? I don't think the command should have that logic at all, it goes more into a test command.

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 a pull request may close this issue.

2 participants