Skip to content

Commit

Permalink
Rename DbaServer -> DbaInstance (#5612)
Browse files Browse the repository at this point in the history
* Rename DbaInstance -> DbaServer

* fix formatting

* added to renames
  • Loading branch information
potatoqualitee authored May 27, 2019
1 parent 1ef2ab2 commit 7b0e95f
Show file tree
Hide file tree
Showing 37 changed files with 157 additions and 143 deletions.
28 changes: 14 additions & 14 deletions dbatools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@
'Copy-DbaAgentOperator',
'Copy-DbaAgentJob',
'Copy-DbaCustomError',
'Copy-DbaServerAuditSpecification',
'Copy-DbaInstanceAuditSpecification',
'Copy-DbaEndpoint',
'Copy-DbaServerAudit',
'Copy-DbaServerRole',
'Copy-DbaInstanceAudit',
'Copy-DbaInstanceRole',
'Copy-DbaResourceGovernor',
'Copy-DbaXESession',
'Copy-DbaBackupDevice',
'Copy-DbaServerTrigger',
'Copy-DbaInstanceTrigger',
'Copy-DbaRegServer',
'Copy-DbaSysDbUserObject',
'Copy-DbaAgentProxy',
Expand Down Expand Up @@ -119,8 +119,8 @@
'Test-DbaDbCompatibility',
'Test-DbaDbCollation',
'Test-DbaConnectionAuthScheme',
'Test-DbaServerName',
'Repair-DbaServerName',
'Test-DbaInstanceName',
'Repair-DbaInstanceName',
'Stop-DbaProcess',
'Find-DbaOrphanedFile',
'Get-DbaAvailabilityGroup',
Expand All @@ -142,13 +142,13 @@
'Get-DbaDbSnapshot',
'Remove-DbaDbSnapshot',
'Get-DbaDbRoleMember',
'Get-DbaServerRoleMember',
'Get-DbaInstanceRoleMember',
'Resolve-DbaNetworkName',
'Export-DbaAvailabilityGroup',
'Write-DbaDbTableData',
'New-DbaDbSnapshot',
'Restore-DbaDbSnapshot',
'Get-DbaServerTrigger',
'Get-DbaInstanceTrigger',
'Get-DbaDbTrigger',
'Get-DbaDbState',
'Set-DbaDbState',
Expand Down Expand Up @@ -215,8 +215,8 @@
'Get-DbaEndpoint',
'Get-DbaDbMasterKey',
'Get-DbaSchemaChangeHistory',
'Get-DbaServerAudit',
'Get-DbaServerAuditSpecification',
'Get-DbaInstanceAudit',
'Get-DbaInstanceAuditSpecification',
'Get-DbaProductKey',
'Get-DbatoolsLog',
'Restore-DbaDbCertificate',
Expand All @@ -231,7 +231,7 @@
'New-DbaConnectionString',
'Get-DbaAgentSchedule',
'Read-DbaTraceFile',
'Get-DbaServerInstallDate',
'Get-DbaInstanceInstallDate',
'Backup-DbaDbMasterKey',
'Get-DbaAgentJobHistory',
'Get-DbaMaintenanceSolutionLog',
Expand Down Expand Up @@ -306,7 +306,7 @@
'Remove-DbaAgentJobCategory',
'Set-DbaAgentJobCategory',
'Get-DbaDbRole',
'Get-DbaServerRole',
'Get-DbaInstanceRole',
'Find-DbaBackup',
'Remove-DbaXESession',
'New-DbaXESession',
Expand Down Expand Up @@ -582,7 +582,7 @@
'Get-DbaCmObject',
'Set-DbaStartupParameter',
'Get-DbaNetworkActivity',
'Get-DbaServerProtocol'
'Get-DbaInstanceProtocol'
'Watch-DbaUpdate',
'Uninstall-DbaWatchUpdate',
'Install-DbaWatchUpdate',
Expand All @@ -607,7 +607,7 @@
'Get-DbaClientProtocol',
'Get-DbaWindowsLog',
# WPF
'Show-DbaServerFileSystem',
'Show-DbaInstanceFileSystem',
'Show-DbaDbList',
# AD?
'Test-DbaWindowsLogin',
Expand Down
28 changes: 14 additions & 14 deletions dbatools.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ $script:xplat = @(
'Copy-DbaAgentOperator',
'Copy-DbaAgentJob',
'Copy-DbaCustomError',
'Copy-DbaServerAuditSpecification',
'Copy-DbaInstanceAuditSpecification',
'Copy-DbaEndpoint',
'Copy-DbaServerAudit',
'Copy-DbaServerRole',
'Copy-DbaInstanceAudit',
'Copy-DbaInstanceRole',
'Copy-DbaResourceGovernor',
'Copy-DbaXESession',
'Copy-DbaServerTrigger',
'Copy-DbaInstanceTrigger',
'Copy-DbaRegServer',
'Copy-DbaSysDbUserObject',
'Copy-DbaAgentProxy',
Expand Down Expand Up @@ -358,8 +358,8 @@ $script:xplat = @(
'Test-DbaDbCompatibility',
'Test-DbaDbCollation',
'Test-DbaConnectionAuthScheme',
'Test-DbaServerName',
'Repair-DbaServerName',
'Test-DbaInstanceName',
'Repair-DbaInstanceName',
'Stop-DbaProcess',
'Find-DbaOrphanedFile',
'Get-DbaAvailabilityGroup',
Expand All @@ -381,13 +381,13 @@ $script:xplat = @(
'Get-DbaDbSnapshot',
'Remove-DbaDbSnapshot',
'Get-DbaDbRoleMember',
'Get-DbaServerRoleMember',
'Get-DbaInstanceRoleMember',
'Resolve-DbaNetworkName',
'Export-DbaAvailabilityGroup',
'Write-DbaDbTableData',
'New-DbaDbSnapshot',
'Restore-DbaDbSnapshot',
'Get-DbaServerTrigger',
'Get-DbaInstanceTrigger',
'Get-DbaDbTrigger',
'Get-DbaDbState',
'Set-DbaDbState',
Expand Down Expand Up @@ -454,8 +454,8 @@ $script:xplat = @(
'Get-DbaEndpoint',
'Get-DbaDbMasterKey',
'Get-DbaSchemaChangeHistory',
'Get-DbaServerAudit',
'Get-DbaServerAuditSpecification',
'Get-DbaInstanceAudit',
'Get-DbaInstanceAuditSpecification',
'Get-DbaProductKey',
'Get-DbatoolsLog',
'Restore-DbaDbCertificate',
Expand All @@ -470,7 +470,7 @@ $script:xplat = @(
'New-DbaConnectionString',
'Get-DbaAgentSchedule',
'Read-DbaTraceFile',
'Get-DbaServerInstallDate',
'Get-DbaInstanceInstallDate',
'Backup-DbaDbMasterKey',
'Get-DbaAgentJobHistory',
'Get-DbaMaintenanceSolutionLog',
Expand Down Expand Up @@ -545,7 +545,7 @@ $script:xplat = @(
'Remove-DbaAgentJobCategory',
'Set-DbaAgentJobCategory',
'Get-DbaDbRole',
'Get-DbaServerRole',
'Get-DbaInstanceRole',
'Find-DbaBackup',
'Remove-DbaXESession',
'New-DbaXESession',
Expand Down Expand Up @@ -833,7 +833,7 @@ $script:windowsonly = @(
'Get-DbaCmObject',
'Set-DbaStartupParameter',
'Get-DbaNetworkActivity',
'Get-DbaServerProtocol'
'Get-DbaInstanceProtocol'
'Watch-DbaUpdate',
'Uninstall-DbaWatchUpdate',
'Install-DbaWatchUpdate',
Expand All @@ -858,7 +858,7 @@ $script:windowsonly = @(
'Get-DbaClientProtocol',
'Get-DbaWindowsLog',
# WPF
'Show-DbaServerFileSystem',
'Show-DbaInstanceFileSystem',
'Show-DbaDbList',
# AD?
'Test-DbaWindowsLogin',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Copy-DbaServerAudit {
function Copy-DbaInstanceAudit {
<#
.SYNOPSIS
Copy-DbaServerAudit migrates server audits from one SQL Server to another.
Copy-DbaInstanceAudit migrates server audits from one SQL Server to another.
.DESCRIPTION
By default, all audits are copied. The -Audit parameter is auto-populated for command-line completion and can be used to copy only specific audits.
Expand Down Expand Up @@ -54,25 +54,25 @@ function Copy-DbaServerAudit {
Requires: sysadmin access on SQL Servers
.LINK
https://dbatools.io/Copy-DbaServerAudit
https://dbatools.io/Copy-DbaInstanceAudit
.EXAMPLE
PS C:\> Copy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster
PS C:\> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster
Copies all server audits from sqlserver2014a to sqlcluster, using Windows credentials. If audits with the same name exist on sqlcluster, they will be skipped.
.EXAMPLE
PS C:\> Copy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster -Audit tg_noDbDrop -SourceSqlCredential $cred -Force
PS C:\> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster -Audit tg_noDbDrop -SourceSqlCredential $cred -Force
Copies a single audit, the tg_noDbDrop audit from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If an audit with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.
.EXAMPLE
PS C:\> Copy-DbaServerAudit -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
PS C:\> Copy-DbaInstanceAudit -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
Shows what would happen if the command were executed using force.
.EXAMPLE
PS C:\> Copy-DbaServerAudit -Source sqlserver-0 -Destination sqlserver-1 -Audit audit1 -Path 'C:\audit1'
PS C:\> Copy-DbaInstanceAudit -Source sqlserver-0 -Destination sqlserver-1 -Audit audit1 -Path 'C:\audit1'
Copies audit audit1 from sqlserver-0 to sqlserver-1. The file path on sqlserver-1 will be set to 'C:\audit1'.
#>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Copy-DbaServerAuditSpecification {
function Copy-DbaInstanceAuditSpecification {
<#
.SYNOPSIS
Copy-DbaServerAuditSpecification migrates server audit specifications from one SQL Server to another.
Copy-DbaInstanceAuditSpecification migrates server audit specifications from one SQL Server to another.
.DESCRIPTION
By default, all audits are copied. The -AuditSpecification parameter is auto-populated for command-line completion and can be used to copy only specific audits.
Expand Down Expand Up @@ -51,20 +51,20 @@ function Copy-DbaServerAuditSpecification {
Requires: sysadmin access on SQL Servers
.LINK
https://dbatools.io/Copy-DbaServerAuditSpecification
https://dbatools.io/Copy-DbaInstanceAuditSpecification
.EXAMPLE
PS C:\> Copy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster
PS C:\> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster
Copies all server audits from sqlserver2014a to sqlcluster using Windows credentials to connect. If audits with the same name exist on sqlcluster, they will be skipped.
.EXAMPLE
PS C:\> Copy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster -AuditSpecification tg_noDbDrop -SourceSqlCredential $cred -Force
PS C:\> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster -AuditSpecification tg_noDbDrop -SourceSqlCredential $cred -Force
Copies a single audit, the tg_noDbDrop audit from sqlserver2014a to sqlcluster using SQL credentials to connect to sqlserver2014a and Windows credentials to connect to sqlcluster. If an audit specification with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.
.EXAMPLE
PS C:\> Copy-DbaServerAuditSpecification -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
PS C:\> Copy-DbaInstanceAuditSpecification -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
Shows what would happen if the command were executed using force.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Copy-DbaServerTrigger {
function Copy-DbaInstanceTrigger {
<#
.SYNOPSIS
Copy-DbaServerTrigger migrates server triggers from one SQL Server to another.
Copy-DbaInstanceTrigger migrates server triggers from one SQL Server to another.
.DESCRIPTION
By default, all triggers are copied. The -ServerTrigger parameter is auto-populated for command-line completion and can be used to copy only specific triggers.
Expand Down Expand Up @@ -51,20 +51,20 @@ function Copy-DbaServerTrigger {
Requires: sysadmin access on SQL Servers
.LINK
https://dbatools.io/Copy-DbaServerTrigger
https://dbatools.io/Copy-DbaInstanceTrigger
.EXAMPLE
PS C:\> Copy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster
PS C:\> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster
Copies all server triggers from sqlserver2014a to sqlcluster, using Windows credentials. If triggers with the same name exist on sqlcluster, they will be skipped.
.EXAMPLE
PS C:\> Copy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster -ServerTrigger tg_noDbDrop -SourceSqlCredential $cred -Force
PS C:\> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster -ServerTrigger tg_noDbDrop -SourceSqlCredential $cred -Force
Copies a single trigger, the tg_noDbDrop trigger from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster. If a trigger with the same name exists on sqlcluster, it will be dropped and recreated because -Force was used.
.EXAMPLE
PS C:\> Copy-DbaServerTrigger -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
PS C:\> Copy-DbaInstanceTrigger -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force
Shows what would happen if the command were executed using force.
Expand Down
8 changes: 4 additions & 4 deletions functions/Export-DbaInstance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function Export-DbaInstance {
$fileCounter++
Write-Message -Level Verbose -Message "Exporting server roles"
Write-ProgressHelper -StepNumber ($stepCounter++) -Message "Exporting server roles"
$null = Get-DbaServerRole -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-serverroles.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
$null = Get-DbaInstanceRole -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-serverroles.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
Get-ChildItem -ErrorAction Ignore -Path "$Path\$fileCounter-serverroles.sql"
if (-not (Test-Path "$Path\$fileCounter-serverroles.sql")) {
$fileCounter--
Expand Down Expand Up @@ -264,7 +264,7 @@ function Export-DbaInstance {
$fileCounter++
Write-Message -Level Verbose -Message "Exporting System Triggers"
Write-ProgressHelper -StepNumber ($stepCounter++) -Message "Exporting System Triggers"
$null = Get-DbaServerTrigger -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-servertriggers.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
$null = Get-DbaInstanceTrigger -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-servertriggers.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
$triggers = Get-Content -Path "$Path\$fileCounter-servertriggers.sql" -Raw -ErrorAction Ignore
if ($triggers) {
$triggers = $triggers.ToString() -replace 'CREATE TRIGGER', "GO`r`nCREATE TRIGGER"
Expand Down Expand Up @@ -302,7 +302,7 @@ function Export-DbaInstance {
$fileCounter++
Write-Message -Level Verbose -Message "Exporting Audits"
Write-ProgressHelper -StepNumber ($stepCounter++) -Message "Exporting Audits"
$null = Get-DbaServerAudit -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-audits.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
$null = Get-DbaInstanceAudit -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-audits.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
Get-ChildItem -ErrorAction Ignore -Path "$Path\$fileCounter-audits.sql"
if (-not (Test-Path "$Path\$fileCounter-audits.sql")) {
$fileCounter--
Expand All @@ -313,7 +313,7 @@ function Export-DbaInstance {
$fileCounter++
Write-Message -Level Verbose -Message "Exporting Server Audit Specifications"
Write-ProgressHelper -StepNumber ($stepCounter++) -Message "Exporting Server Audit Specifications"
$null = Get-DbaServerAuditSpecification -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-auditspecs.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
$null = Get-DbaInstanceAuditSpecification -SqlInstance $server | Export-DbaScript -Path "$Path\$fileCounter-auditspecs.sql" -Append -BatchSeparator $BatchSeparator -ScriptingOptionsObject $ScriptingOption
Get-ChildItem -ErrorAction Ignore -Path "$Path\$fileCounter-auditspecs.sql"
if (-not (Test-Path "$Path\$fileCounter-auditspecs.sql")) {
$fileCounter--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Get-DbaServerAudit {
function Get-DbaInstanceAudit {
<#
.SYNOPSIS
Gets SQL Security Audit information for each instance(s) of SQL Server.
.DESCRIPTION
The Get-DbaServerAudit command gets SQL Security Audit information for each instance(s) of SQL Server.
The Get-DbaInstanceAudit command gets SQL Security Audit information for each instance(s) of SQL Server.
.PARAMETER SqlInstance
The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function
Expand Down Expand Up @@ -33,15 +33,15 @@ function Get-DbaServerAudit {
License: MIT https://opensource.org/licenses/MIT
.LINK
https://dbatools.io/Get-DbaServerAudit
https://dbatools.io/Get-DbaInstanceAudit
.EXAMPLE
PS C:\> Get-DbaServerAudit -SqlInstance localhost
PS C:\> Get-DbaInstanceAudit -SqlInstance localhost
Returns all Security Audits on the local default SQL Server instance
.EXAMPLE
PS C:\> Get-DbaServerAudit -SqlInstance localhost, sql2016
PS C:\> Get-DbaInstanceAudit -SqlInstance localhost, sql2016
Returns all Security Audits for the local and sql2016 SQL Server instances
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function Get-DbaServerAuditSpecification {
function Get-DbaInstanceAuditSpecification {
<#
.SYNOPSIS
Gets SQL Security Audit Specification information for each instance(s) of SQL Server.
.DESCRIPTION
The Get-DbaServerAuditSpecification command gets SQL Security Audit Specification information for each instance(s) of SQL Server.
The Get-DbaInstanceAuditSpecification command gets SQL Security Audit Specification information for each instance(s) of SQL Server.
.PARAMETER SqlInstance
The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function
Expand All @@ -27,15 +27,15 @@ function Get-DbaServerAuditSpecification {
License: MIT https://opensource.org/licenses/MIT
.LINK
https://dbatools.io/Get-DbaServerAuditSpecification
https://dbatools.io/Get-DbaInstanceAuditSpecification
.EXAMPLE
PS C:\> Get-DbaServerAuditSpecification -SqlInstance localhost
PS C:\> Get-DbaInstanceAuditSpecification -SqlInstance localhost
Returns all Security Audit Specifications on the local default SQL Server instance
.EXAMPLE
PS C:\> Get-DbaServerAuditSpecification -SqlInstance localhost, sql2016
PS C:\> Get-DbaInstanceAuditSpecification -SqlInstance localhost, sql2016
Returns all Security Audit Specifications for the local and sql2016 SQL Server instances
Expand Down
Loading

0 comments on commit 7b0e95f

Please sign in to comment.