These pages cover SQL Monitor 10, which is not the latest version. Help for other versions is also available.
Get-SqlMonitorDatabase
Published 17 August 2020
Gets the details of all of the Databases for the given SQL Server Instance.
Syntax
- Get-SqlMonitorDatabase [-Instance] <Instance> [[-Name] <string>] [<CommonParameters>]
- Get-SqlMonitorDatabase [[-AzureSqlServer] <AzureSqlServer>] [[-Name] <string>] [<CommonParameters>]
- Get-SqlMonitorDatabase [[-AmazonRdsSqlServer] <AmazonRdsSqlServer>] [[-Name] <string>] [<CommonParameters>]
Description
The Get-SqlMonitorDatabase cmdlet gets details of Databases for the given SQL Server Instance from the SQL Monitor Server.
Parameters
-Instance
<Instance>
The Instance to get Databases from. For more information, see https://documentation.red-gate.com/sm/api/powershell-cmdlet-reference/get-sqlmonitorinstance.
Aliases | None |
Required? | true |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | True (ByValue) |
Accept Wildcard Characters | false |
-AzureSqlServer
<AzureSqlServer>
The Azure SQL Server to limit results to. For more information, see https://documentation.red-gate.com/sm/api/powershell-cmdlet-reference/get-sqlmonitorazuresqlserver
Aliases | None |
Required? | false |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | True (ByValue) |
Accept Wildcard Characters | false |
-AmazonRdsSqlServer
<AmazonRdsSqlServer>
The AmazonRds SQL Server to limit results to. For more information, see https://documentation.red-gate.com/sm/api/powershell-cmdlet-reference/get-sqlmonitorAmazonRdssqlserver
Aliases | None |
Required? | false |
Position? | 1 |
Default Value | None |
Accept Pipeline Input | True (ByValue) |
Accept Wildcard Characters | false |
-Name
<String>
The Database name to match.
Aliases | None |
Required? | false |
Position? | 2 |
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.
-
[Instance] See Get-SqlMonitorInstance. For more information, see https://documentation.red-gate.com/sm/api/custom-types#CustomTypes-Instance.
-
[AzureSqlServer] See Get-SqlMonitorAzureSqlServer. For more information, see https://documentation.red-gate.com/sm/api/custom-types#CustomTypes-AzureSqlServer.
Return values
The output type is the type of the objects that the cmdlet emits.
-
[Database] For more information, see https://documentation.red-gate.com/sm/api/custom-types#CustomTypes-Database.
Examples
-------------------------- EXAMPLE 1 --------------------------
- Get-SqlMonitorDatabase -Instance $instance
-------------------------- EXAMPLE 2 --------------------------
- Get-SqlMonitorDatabase -Instance $instance -Name "ExampleDatabaseName"
-------------------------- EXAMPLE 3 --------------------------
- Get-SqlMonitorDatabase -AzureSqlServer $azureSqlServer -Name "ExampleDatabaseName"
-------------------------- EXAMPLE 4 --------------------------
- Get-SqlMonitorDatabase -AmazonRdsSqlServer $amazonRdsSqlServer -Name "ExampleDatabaseName"