共用方式為


Get-AzureRmSqlDatabaseActivity

取得資料庫作業的狀態。

警告

自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。

雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源

語法

Get-AzureRmSqlDatabaseActivity
   [-ServerName] <String>
   [-ElasticPoolName <String>]
   -DatabaseName <String>
   [-OperationId <Guid>]
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Get-AzureRmSqlDatabaseActivity Cmdlet 會取得 Azure SQL 資料庫 中的資料庫作業狀態。

範例

範例 1:取得所有 SQL 資料庫 實例的狀態

PS C:\>Get-AzureRmSqlDatabaseActivity -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ElasticPoolName "ElasticPool01"

此命令會傳回名為 ElasticPool01 之彈性集區中所有 SQL 資料庫 實例的作業狀態。

範例 2:取得所有 SQL 資料庫 作業的狀態

PS C:\>Get-AzureRmSqlDatabaseActivity -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"

此命令會傳回資料庫中所有 SQL 資料庫 作業的狀態。

參數

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-DatabaseName

指定這個 Cmdlet 取得狀態的資料庫名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ElasticPoolName

指定此 Cmdlet 取得狀態的彈性資料庫集區名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-OperationId

指定這個 Cmdlet 取得之作業的標識碼。

類型:Nullable<T>[Guid]
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

指定指派資料庫的資源群組名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ServerName

指定裝載資料庫的 Microsoft SQL Server 名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

Nullable<T>[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

輸出

AzureSqlDatabaseActivityModel