Skip to content

Commit

Permalink
0.9.797 (#5306)
Browse files Browse the repository at this point in the history
* add additional exclusion tag

excluding Solution Provided tag

* fixes #5287

* Set-DbaStartupParameter - getting 1.0 ready (#5298)

* Merge pull request #5157 from SQLGB/patch-1

Update Get-DbaAgentJobHistory.ps1

* format, add catch for call to get cmd

* change parameter to singular

* correct parameter names in test

* updating parameter reference

* adjust appveyor reference

* quick fix for copy startup proc

format and spelling

* Update issue templates

Updating template on bug reports

* Update issue templates

adding wrapper command to gather info and allow them to paste it

* fixing owned job comparison (#5301)

* 0.9.797
  • Loading branch information
potatoqualitee authored Mar 26, 2019
1 parent 5abd2e5 commit 758ed02
Show file tree
Hide file tree
Showing 13 changed files with 278 additions and 264 deletions.
35 changes: 23 additions & 12 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
---
name: "Bug report \U0001F41B"
about: Found errors or unexpected behavior using dbatools module
title: "[Bug]"
labels: ''
assignees: ''

---

### Before submitting a bug report:

- [ ] Ensure you are able to reproduce it on the latest released version (_we release often_)
- [ ] Verified this bug is not already reported in an issue
**Collect output of following command and paste below:**

```
& {"### PowerShell version:`n$($PSVersionTable | Out-String)"; "`n### dbatools Module version:`n$(gmo dbatools -List | select name, path, version | fl -force | Out-String)"}
```

- [ ] *Running latest release of dbatools*
- [ ] Verified errors are not related to permissions
- [ ] Can reproduce in a clean PowerShell session (_clean = `powershell -NoProfile`_)
- [ ] If issue is with `Copy-DbaDatabase`, using `Backup-DbaDatabase | Restore-DbaDatabase` still does not work
- [ ] If issue is with `Copy-DbaDatabase`, replicate issue using `Backup-DbaDatabase ... | Restore-DbaDatabase ...`

> Note that we do not have the resources to make `Copy-DbaDatabase` work in every environment. Instead, we try to ensure Backup & Restore work in your environment.
## Environmental data
```
<!-- Paste out of above command here -->
```

### SQL Server:
<!-- Paste output of `SELECT @@VERSION` -->
```sql

Note that we do not have the resources to make `Copy-DbaDatabase` work in every environment. Instead, we try to ensure Backup & Restore work in your enviornment.
```

## Steps to Reproduce

Expand All @@ -39,10 +57,3 @@ Sample output or detail explanation if possible
<!--
Output or detailed explanation if possible
-->

## Environmental data

<!-- Provide output of the following two commands -->

- PowerShell: <!-- $PSVersionTable output -->
- - SQL Server: <!-- SELECT @@VERSION output -->
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/Support_Question.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name: Support Question ❓
about: If you have a question you may try asking on StackExchange network or dbatools
channel in sqlcommunity.slack.com
title: ''
labels: ''
assignees: ''

---

Expand Down
1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ issues:
- Documentation
- Question
- Confirmed
- Solution Provided
# Label to use when marking an issue as stale
staleLabel: stale
238 changes: 118 additions & 120 deletions allcommands.ps1

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions bin/dbatools-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5057,7 +5057,7 @@
],
[
"Procedure",
"The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedrues will be processed.",
"The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedures will be processed.",
"",
false,
"false",
Expand Down Expand Up @@ -39184,7 +39184,7 @@
"CommandName": "Set-DbaStartupParameter",
"Availability": "Windows only",
"Links": null,
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser\nWill configure the SQL Instance server1\\instance1 to startup up in Single User mode at next startup\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents\nWill configure the SQL Instance sql2016 to IncreasedExtents = True (-E)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents:$false -WhatIf\nShows what would happen if you attempted to configure the SQL Instance sql2016 to IncreasedExtents = False (no -E)\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -TraceFlags 8032,8048\nThis will append Trace Flags 8032 and 8048 to the startup parameters\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagsOverride\nThis will remove all trace flags and set SingleUser to false\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -TraceFlags 8032,8048 -TraceFlagsOverride\nThis will set Trace Flags 8032 and 8048 to the startup parameters, removing any existing Trace Flags\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagsOverride -Offline\nThis will remove all trace flags and set SingleUser to false from an offline instance\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline\nThis will attempt to change the ErrorLog path to c:\\sql\\. However, with the offline switch this will not happen. To force it, use the -Force switch like so:\nSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline -Force\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$StartupConfig = Get-DbaStartupParameter -SqlInstance server1\\instance1\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -NoLoggingToWinEvents\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice\r\nPS C:\\\u003e #Do Some work\r\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -StartUpConfig $StartUpConfig\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice and you\u0027re back to normal\nIn this example we take a copy of the existing startup configuration of server1\\instance1\nWe then change the startup parameters ahead of some work\nAfter the work has been completed, we can push the original startup parameters back to server1\\instance1 and resume normal operation",
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser\nWill configure the SQL Instance server1\\instance1 to startup up in Single User mode at next startup\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents\nWill configure the SQL Instance sql2016 to IncreasedExtents = True (-E)\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -IncreasedExtents:$false -WhatIf\nShows what would happen if you attempted to configure the SQL Instance sql2016 to IncreasedExtents = False (no -E)\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -TraceFlag 8032,8048\nThis will append Trace Flags 8032 and 8048 to the startup parameters\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagOverride\nThis will remove all trace flags and set SingleUser to false\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -TraceFlag 8032,8048 -TraceFlagOverride\nThis will set Trace Flags 8032 and 8048 to the startup parameters, removing any existing Trace Flags\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -SingleUser:$false -TraceFlagOverride -Offline\nThis will remove all trace flags and set SingleUser to false from an offline instance\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003eSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline\nThis will attempt to change the ErrorLog path to c:\\sql\\. However, with the offline switch this will not happen. To force it, use the -Force switch like so:\nSet-DbaStartupParameter -SqlInstance sql2016 -ErrorLog c:\\Sql\\ -Offline -Force\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$StartupConfig = Get-DbaStartupParameter -SqlInstance server1\\instance1\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -SingleUser -NoLoggingToWinEvents\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice\r\nPS C:\\\u003e #Do Some work\r\nPS C:\\\u003e Set-DbaStartupParameter -SqlInstance server1\\instance1 -StartupConfig $StartupConfig\r\nPS C:\\\u003e #Restart your SQL instance with the tool of choice and you\u0027re back to normal\nIn this example we take a copy of the existing startup configuration of server1\\instance1\nWe then change the startup parameters ahead of some work\nAfter the work has been completed, we can push the original startup parameters back to server1\\instance1 and resume normal operation",
"Params": [
[
"SqlInstance",
Expand Down Expand Up @@ -39235,7 +39235,7 @@
""
],
[
"TraceFlags",
"TraceFlag",
"A comma separated list of TraceFlags to be applied at SQL Server startup\r\nBy default these will be appended to any existing trace flags set",
"",
false,
Expand Down Expand Up @@ -39315,16 +39315,16 @@
"False"
],
[
"TraceFlagsOverride",
"TraceFlagOverride",
"Overrides the default behaviour and replaces any existing trace flags. If not trace flags specified will just remove existing ones",
"",
false,
"false",
"False"
],
[
"StartUpConfig",
"Pass in a previously saved SQL Instance startup config\r\nusing this parameter will set TraceFlagsOverride to true, so existing Trace Flags will be overridden",
"StartupConfig",
"Pass in a previously saved SQL Instance startup config\r\nusing this parameter will set TraceFlagOverride to true, so existing Trace Flags will be overridden",
"",
false,
"false",
Expand Down Expand Up @@ -39371,7 +39371,7 @@
""
]
],
"Syntax": "Set-DbaStartupParameter [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-MasterData] \u003cString\u003e] [[-MasterLog] \u003cString\u003e] [[-ErrorLog] \u003cString\u003e] [[-TraceFlags] \u003cString[]\u003e] [-CommandPromptStart] [-MinimalStart] [[-MemoryToReserve] \u003cInt32\u003e] [-SingleUser] [[-SingleUserDetails] \u003cString\u003e] [-NoLoggingToWinEvents] [-StartAsNamedInstance] [-DisableMonitoring] [-IncreasedExtents] [-TraceFlagsOverride] [[-StartUpConfig] \u003cObject\u003e] [-Offline] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
"Syntax": "Set-DbaStartupParameter [-SqlInstance] \u003cDbaInstanceParameter\u003e [[-SqlCredential] \u003cPSCredential\u003e] [[-Credential] \u003cPSCredential\u003e] [[-MasterData] \u003cString\u003e] [[-MasterLog] \u003cString\u003e] [[-ErrorLog] \u003cString\u003e] [[-TraceFlag] \u003cString[]\u003e] [-CommandPromptStart] [-MinimalStart] [[-MemoryToReserve] \u003cInt32\u003e] [-SingleUser] [[-SingleUserDetails] \u003cString\u003e] [-NoLoggingToWinEvents] [-StartAsNamedInstance] [-DisableMonitoring] [-IncreasedExtents] [-TraceFlagOverride] [[-StartupConfig] \u003cObject\u003e] [-Offline] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]"
},
{
"Name": "Set-DbaTcpPort",
Expand Down
2 changes: 1 addition & 1 deletion dbatools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '0.9.795'
ModuleVersion = '0.9.797'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'
Expand Down
12 changes: 6 additions & 6 deletions functions/Copy-DbaStartupProcedure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Copy-DbaStartupProcedure {
Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)
.PARAMETER Procedure
The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedrues will be processed.
The startup procedure(s) to process. This list is auto-populated from the server. If unspecified, all startup procedures will be processed.
.PARAMETER ExcludeProcedure
The startup procedure(s) to exclude. This list is auto-populated from the server.
Expand Down Expand Up @@ -89,7 +89,7 @@ function Copy-DbaStartupProcedure {
try {
$sourceServer = Connect-SqlInstance -SqlInstance $Source -SqlCredential $SourceSqlCredential -MinimumVersion 9
} catch {
Stop-Function -Message "Error occurred while establishing connection to $instance" -Category ConnectionError -ErrorRecord $_ -Target $Source
Stop-Function -Message "Error occurred while establishing connection to $Source" -Category ConnectionError -ErrorRecord $_ -Target $Source
return
}
# Includes properties: Name, Schema (both as strings)
Expand Down Expand Up @@ -163,9 +163,9 @@ function Copy-DbaStartupProcedure {
$sql = $header + $body
Write-Message -Level Verbose -Message $sql
$null = Invoke-DbaQuery -SqlInstance $destServer -Query $sql -Database master -EnableException
$startupsql = "EXEC SP_PROCOPTION '$currentProcName', 'STARTUP', 'ON'"
Write-Message -Level Verbose -Message $startupsql
$null = Invoke-DbaQuery -SqlInstance $destServer -Query $startupsql -Database master -EnableException
$startupSql = "EXEC SP_PROCOPTION '$currentProcName', 'STARTUP', 'ON'"
Write-Message -Level Verbose -Message $startupSql
$null = Invoke-DbaQuery -SqlInstance $destServer -Query $startupSql -Database master -EnableException

$copyStartupProcStatus.Status = "Successful"
$copyStartupProcStatus | Select-DefaultView -Property DateTime, SourceServer, DestinationServer, Name, Type, Status, Notes -TypeName MigrationObject
Expand All @@ -178,4 +178,4 @@ function Copy-DbaStartupProcedure {
}
}
}
}
}
Loading

0 comments on commit 758ed02

Please sign in to comment.