Get-AzSqlInstance
Retorna informações sobre a instância gerenciada de Banco de Dados SQL do Azure.
Sintaxe
Get-AzSqlInstance
[-Name <String>]
[-ResourceGroupName <String>]
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePool] <AzureSqlInstancePoolModel>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePoolResourceId] <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-ResourceId] <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstance
[-InstancePoolName] <String>
-ResourceGroupName <String>
[-ExpandActiveDirectoryAdministrator]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlInstance retorna informações sobre uma ou mais Instâncias Gerenciadas de SQL do Azure. Especifique o nome de uma instância para ver as informações apenas dessa instância.
Exemplos
Exemplo 1: Obter todas as instâncias atribuídas a um grupo de recursos
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
ZoneRedundant : false
Esse comando obtém informações sobre todas as instâncias atribuídas ao grupo de recursos ResourceGroup01.
Exemplo 2: Obter informações sobre uma instância
Get-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "ResourceGroup01"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
ZoneRedundant : false
Esse comando obtém informações sobre a instância chamada managedInstance1.
Exemplo 3: Obter todas as instâncias atribuídas a um grupo de recursos usando filtragem
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "managedInstance*"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
ZoneRedundant : false
Esse comando obtém informações sobre todas as instâncias atribuídas ao grupo de recursos ResourceGroup01 que começam com "managedInstance".
Exemplo 4: Obter todas as instâncias em um pool de instâncias
Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -InstancePoolName "instancePool0"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Esse comando obtém informações sobre todas as instâncias dentro do pool de instâncias "instancePool0".
Exemplo 5: Obter todas as instâncias em um pool de instâncias usando o objeto do pool de instâncias
$instancePool = Get-AzSqlInstancePool -ResourceGroupName "ResourceGroup01" -Name "instancePool0"
Get-AzSqlInstance -InstancePool $instancePool
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Esse comando obtém informações sobre todas as instâncias dentro do pool de instâncias "instancePool0".
Exemplo 6: Obter todas as instâncias em um pool de instâncias usando o identificador de recurso do pool de instâncias
Get-AzSqlInstance -InstancePoolResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
DnsZone : ad35cna0mw
InstancePoolName : instancePool0
ZoneRedundant : false
Esse comando obtém informações sobre todas as instâncias dentro do pool de instâncias "instancePool0".
Exemplo 7: Obter uma instância gerenciada usando seu identificador de recurso
Get-AzSqlInstance -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1"
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
InstancePoolName :
ZoneRedundant : false
Esse comando obtém informações sobre a instância chamada managedInstance1.
Exemplo 8: Obter todas as instâncias atribuídas a um grupo de recursos com informações de administrador externo
$val = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance2
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance2
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance2.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin2
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
$val.Administrators
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy2
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
Esse comando obtém informações sobre todas as instâncias atribuídas ao grupo de recursos ResourceGroup01. .
Exemplo 9: Obter informações sobre uma instância com informações de administrador externo
$val = Get-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
Location : westcentralus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
IsGeneralPurposeV2 :
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : BasePrice
VCores : 8
StorageSizeInGB : 512
StorageIOps :
DnsZone : ad35cna0mw
Administrators : Microsoft.Azure.Management.Sql.Models.ManagedInstanceExternalAdministrator
ZoneRedundant : false
$val.Administrators
AdministratorType : ActiveDirectory
PrincipalType : Group
Login : Dummy
Sid : df7667b8-f9fd-4029-a0e3-b43c75ce9538
TenantId : 00001111-aaaa-2222-bbbb-3333cccc4444
AzureADOnlyAuthentication : True
Esse comando obtém informações sobre a instância chamada managedInstance1.
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para a comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ExpandActiveDirectoryAdministrator
Expanda Informações do Administrador do Active Directory no servidor.
Tipo: | SwitchParameter |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-InstancePool
O objeto pai do pool de instâncias.
Tipo: | AzureSqlInstancePoolModel |
Aliases: | ParentObject |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-InstancePoolName
O nome do pool de instâncias.
Tipo: | String |
Cargo: | 1 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | True |
-InstancePoolResourceId
O identificador de recurso do pool de instâncias.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-Name
Nome da instância SQL.
Tipo: | String |
Aliases: | InstanceName |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | True |
-ResourceGroupName
O nome do grupo de recursos.
Tipo: | String |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceId
O identificador de recurso de instância gerenciada.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
Entradas
None