Remove-AzSqlElasticJobTarget
從目標群組移除目標
語法
Remove-AzSqlElasticJobTarget
[-ResourceGroupName] <String>
[-AgentServerName] <String>
[-AgentName] <String>
[-TargetGroupName] <String>
-ServerName <String>
-DatabaseName <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ResourceGroupName] <String>
[-AgentServerName] <String>
[-AgentName] <String>
[-TargetGroupName] <String>
-ServerName <String>
[-ElasticPoolName <String>]
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ResourceGroupName] <String>
[-AgentServerName] <String>
[-AgentName] <String>
[-TargetGroupName] <String>
-ServerName <String>
-ShardMapName <String>
-DatabaseName <String>
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentObject] <AzureSqlElasticJobTargetGroupModel>
-ServerName <String>
-DatabaseName <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentObject] <AzureSqlElasticJobTargetGroupModel>
-ServerName <String>
[-ElasticPoolName <String>]
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentObject] <AzureSqlElasticJobTargetGroupModel>
-ServerName <String>
-ShardMapName <String>
-DatabaseName <String>
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentResourceId] <String>
-ServerName <String>
-DatabaseName <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentResourceId] <String>
-ServerName <String>
[-ElasticPoolName <String>]
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzSqlElasticJobTarget
[-ParentResourceId] <String>
-ServerName <String>
-ShardMapName <String>
-DatabaseName <String>
[-RefreshCredentialName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Remove-AzSqlElasticJobTarget Cmdlet 會將目標資源移除至目標群組
範例
範例 1:移除伺服器目標
$tg = Get-AzSqlElasticJobTargetGroup -ResourceGroupName rg -ServerName elasticjobserver -Name tg1
$tg | Remove-AzSqlElasticJobTarget -ServerName s1 -RefreshCredentialName cred1
TargetGroupName TargetType TargetServerName TargetDatabaseName TargetElasticPoolName TargetShardMapName RefreshCredentialName MembershipType
--------------- ---------- ---------------- ------------------ --------------------- ------------------ --------------------- --------------
tg1 SqlServer s1 cred1 Include
範例 2:移除資料庫目標
$tg = Get-AzSqlElasticJobTargetGroup -ResourceGroupName rg -ServerName elasticjobserver -Name tg1
$tg | Remove-AzSqlElasticJobTarget -ServerName s1 -DatabaseName db2
TargetGroupName TargetType TargetServerName TargetDatabaseName TargetElasticPoolName TargetShardMapName RefreshCredentialName MembershipType
--------------- ---------- ---------------- ------------------ --------------------- ------------------ --------------------- --------------
tg1 SqlDatabase s1 db2 Include
範例 3:移除彈性集區目標
$tg = Get-AzSqlElasticJobTargetGroup -ResourceGroupName rg -ServerName elasticjobserver -Name tg1
$tg | Remove-AzSqlElasticJobTarget -ServerName s1 -ElasticPoolName ep1 -RefreshCredentialName cred1
TargetGroupName TargetType TargetServerName TargetDatabaseName TargetElasticPoolName TargetShardMapName RefreshCredentialName MembershipType
--------------- ---------- ---------------- ------------------ --------------------- ------------------ --------------------- --------------
tg1 SqlElasticPool s1 ep1 cred1 Include
範例 4:移除分區對應目標
$tg = Get-AzSqlElasticJobTargetGroup -ResourceGroupName rg -ServerName elasticjobserver -Name tg1
$tg | Remove-AzSqlElasticJobTarget -ServerName s1 -ShardMapName sm1 -DatabaseName db1 -RefreshCredentialName cred1
TargetGroupName TargetType TargetServerName TargetDatabaseName TargetElasticPoolName TargetShardMapName RefreshCredentialName MembershipType
--------------- ---------- ---------------- ------------------ --------------------- ------------------ --------------------- --------------
tg1 SqlShardMap s1 db1 sm1 cred1 Include
從目標群組中移除目標 (伺服器、彈性集區、資料庫和分區對應)
參數
-AgentName
SQL Database Agent 名稱。
類型: | String |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-AgentServerName
SQL Database Agent 伺服器名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DatabaseName
資料庫目標名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ElasticPoolName
彈性集區目標名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-ParentObject
目標組物件。
類型: | AzureSqlElasticJobTargetGroupModel |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ParentResourceId
目標群組資源標識碼。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-RefreshCredentialName
重新整理認證名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源組名
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServerName
伺服器目標名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ShardMapName
分區對應目標名稱
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-TargetGroupName
SQL Database Agent 名稱。
類型: | String |
Position: | 3 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | False |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
AzureSqlElasticJobTargetGroupModel