SQL Monitor 13

Update-SqlMonitorMonitoredObjectSelectedDatabase

Updates the selected database for Azure SQL Server

Syntax

Update-SqlMonitorMonitoredObjectSelectedDatabase [-AzureSqlServer] <AzureSqlServer> [[-AutoDiscoveryEnabled] <bool>] [[-Databases] <string[]>] [<CommonParameters>]

Description

The Update-SqlMonitorMonitoredObjectSelectedDatabase cmdlet updates the monitored databases for Azure SQL Server and Automatic database discovery setting on a SQL Monitor Server.

Parameters

-AzureSqlServer <AzureSqlServer>

The object to be updated.

Aliases None
Required? true
Position? 1
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-AutoDiscoveryEnabled <Boolean>

Flag to set automatic database discovery.

Aliases None
Required? false
Position? 2
Default Value False
Accept Pipeline Input False
Accept Wildcard Characters false

-Databases <String[]>

List of database names that need to be monitored, required if AutoDiscoveryEnabled is false.

Aliases None
Required? false
Position? 3
Default Value @()
Accept Pipeline Input False
Accept Wildcard Characters false

-ProgressAction <ActionPreference>

{{ Fill ProgressAction Description }}

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.
    You cannot pipe input to this cmdlet.

Examples

-------------------------- EXAMPLE 1 --------------------------

Update-SqlMonitorMonitoredObjectSelectedDatabase -AzureSqlServer $AzureSqlServer -Databases "db1", "db2"

-------------------------- EXAMPLE 2 --------------------------

$Databases = Get-SqlMonitorDetectedDatabase $azureCredentials |  Where-Object { ("db1", "db2") -eq $_.Name }
Update-SqlMonitorMonitoredObjectSelectedDatabase -AzureSqlServer $AzureSqlServer -Databases $Databases.Name -AutoDiscoveryEnabled $false


Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?