Get-AzSqlDatabase

하나 이상의 데이터베이스를 가져옵니다.

Syntax

Get-AzSqlDatabase
   [[-DatabaseName] <String>]
   [-ExpandKeyList]
   [-KeysFilter <String>]
   [-ServerName] <String>
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Get-AzSqlDatabase cmdlet은 Azure SQL Database Server에서 하나 이상의 Azure SQL 데이터베이스를 가져옵니다. 또한 이 cmdlet은 Azure의 SQL Server Stretch Database 서비스에서도 지원됩니다.

예제

예제 1: 서버의 모든 데이터베이스 가져오기

Get-AzSqlDatabase -ResourceGroupName "resourcegroup01" -ServerName "server01"

ResourceGroupName				         : resourcegroup01
ServerName						           : server01
DatabaseName					           : master
Location						             : Central US
DatabaseId						           : a2a7f2db-7526-4d86-a7b2-36276ee10dc6
Edition							             : None
CollationName					           : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				         : 
MaxSizeBytes					           : 5368709120
Status							             : Online
CreationDate					           : 7/3/2015 7:32:44 AM
CurrentServiceObjectiveId		     : c99ac918-dbea-463f-a475-16ec020fdc12
CurrentServiceObjectiveName		   : System1
RequestedServiceObjectiveId		   : c99ac918-dbea-463f-a475-16ec020fdc12
RequestedServiceObjectiveName	   : 
ElasticPoolName					         : 
EarliestRestoreDate				       : 
Tags							               :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo

ResourceGroupName				         : resourcegroup01
ServerName						           : server01
DatabaseName                     : database01
Location						             : Central US
DatabaseId						           : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition							             : Standard
CollationName					           : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				         : 
MaxSizeBytes					           : 268435456000
Status							             : Online
CreationDate					           : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		     : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		   : S0
RequestedServiceObjectiveId		   : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	   : 
ElasticPoolName					         : 
EarliestRestoreDate				       : 
Tags							               :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo

이 명령은 server01이라는 서버의 모든 데이터베이스를 가져옵니다.

예제 2: 서버에서 이름으로 데이터베이스 가져오기

Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database02"

ResourceGroupName				         : resourcegroup01
ServerName						           : server01
DatabaseName					           : database02
Location						             : Central US
DatabaseId						           : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition							             : Standard
CollationName					           : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				         : 
MaxSizeBytes					           : 268435456000
Status							             : Online
CreationDate					           : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		     : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		   : S0
RequestedServiceObjectiveId		   : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	   : 
ElasticPoolName                  : 
EarliestRestoreDate				       : 
Tags							               :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo

이 명령은 Server01이라는 서버에서 Database02라는 데이터베이스를 가져옵니다.

예제 3: 필터링을 사용하여 서버의 모든 데이터베이스 가져오기

Get-AzSqlDatabase -ResourceGroupName "resourcegroup01" -ServerName "server01" -DatabaseName "database*"

ResourceGroupName				         : resourcegroup01
ServerName						           : server01
DatabaseName					           : database01
Location						             : Central US
DatabaseId						           : a2a7f2db-7526-4d86-a7b2-36276ee10dc6
Edition							             : None
CollationName				             : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				         : 
MaxSizeBytes					           : 5368709120
Status							             : Online
CreationDate					           : 7/3/2015 7:32:44 AM
CurrentServiceObjectiveId		     : c99ac918-dbea-463f-a475-16ec020fdc12
CurrentServiceObjectiveName		   : System1
RequestedServiceObjectiveId		   : c99ac918-dbea-463f-a475-16ec020fdc12
RequestedServiceObjectiveName	   : 
ElasticPoolName					         : 
EarliestRestoreDate				       : 
Tags							               : 
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo

ResourceGroupName				         : resourcegroup01
ServerName						           : server01
DatabaseName					           : database02
Location                         : Central US
DatabaseId					             : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition						               : Standard
CollationName					           : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				         : 
MaxSizeBytes					           : 268435456000
Status							             : Online
CreationDate					           : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		     : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		   : S0
RequestedServiceObjectiveId		   : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	   : 
ElasticPoolName					         : 
EarliestRestoreDate				       : 
Tags                             :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo

이 명령은 "database"로 시작하는 server01 서버의 모든 데이터베이스를 가져옵니다.

예제 4: 확장 키 매개 변수를 사용하여 서버에서 TDE AKV 키가 있는 데이터베이스를 가져옵니다.

Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database02" -ExpandKeyList

ResourceGroupName				 : resourcegroup01
ServerName						 : server01
DatabaseName					 : database02
Location						 : Central US
DatabaseId						 : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition							 : Standard
CollationName					 : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				 : 
MaxSizeBytes					 : 268435456000
Status							 : Online
CreationDate					 : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		 : S0
RequestedServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	 : 
ElasticPoolName                  : 
EarliestRestoreDate				 : 
Tags							 :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo
Identity                         : Microsoft.Azure.Management.Sql.Models.DatabaseIdentity
EncryptionProtector              : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
Keys                             : {[https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901, Microsoft.Azure.Management.Sql.Models.DatabaseKey], 
                                    [https://contoso.vault.azure.net/keys/contosokey2/09876543210987654321098765432109, Microsoft.Azure.Management.Sql.Models.DatabaseKey]}
FederatedClientId                :

이 명령은 데이터베이스에 구성된 모든 TDE AKV 키를 가져옵니다.

예제 5: 확장 키를 사용하여 서버에서 TDE AKV 키를 사용하여 데이터베이스 가져오기 및 날짜별 필터링

Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database02" -ExpandKeyList -KeysFilter "1/13/2022"

ResourceGroupName				 : resourcegroup01
ServerName						 : server01
DatabaseName					 : database02
Location						 : Central US
DatabaseId						 : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition							 : Standard
CollationName					 : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				 : 
MaxSizeBytes					 : 268435456000
Status							 : Online
CreationDate					 : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		 : S0
RequestedServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	 : 
ElasticPoolName                  : 
EarliestRestoreDate				 : 
Tags							 :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo
Identity                         : Microsoft.Azure.Management.Sql.Models.DatabaseIdentity
EncryptionProtector              : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
Keys                             : {[https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901, Microsoft.Azure.Management.Sql.Models.DatabaseKey], 
                                    [https://contoso.vault.azure.net/keys/contosokey2/09876543210987654321098765432109, Microsoft.Azure.Management.Sql.Models.DatabaseKey]}
FederatedClientId                :

이 명령은 TDE CMK 키로 구성된 데이터베이스를 가져옵니다.

예제 6: 확장 키 및 필터를 '현재'로 사용하여 서버에서 TDE AKV 키가 있는 데이터베이스 가져오기

Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database02" -ExpandKeyList -KeysFilter "current"

ResourceGroupName				 : resourcegroup01
ServerName						 : server01
DatabaseName					 : database02
Location						 : Central US
DatabaseId						 : a1e6bd1a-735a-4d48-8b98-afead5ef1218
Edition							 : Standard
CollationName					 : SQL_Latin1_General_CP1_CI_AS
CatalogCollation				 : 
MaxSizeBytes					 : 268435456000
Status							 : Online
CreationDate					 : 7/3/2015 7:33:37 AM
CurrentServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
CurrentServiceObjectiveName		 : S0
RequestedServiceObjectiveId		 : f1173c43-91bd-4aaa-973c-54e79e15235b
RequestedServiceObjectiveName	 : 
ElasticPoolName                  : 
EarliestRestoreDate				 : 
Tags							 :
CurrentBackupStorageRedundancy	 : Geo
RequestedBackupStorageRedundancy : Geo
Identity                         : Microsoft.Azure.Management.Sql.Models.DatabaseIdentity
EncryptionProtector              : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
Keys                             : 
FederatedClientId                :

이 명령은 필터가 'current'인 TDE CMK 키로 구성된 데이터베이스를 가져옵니다.

예제 7: 기본 enclave 형식을 VBS로 구성한 데이터베이스 가져오기

Get-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database02"

ResourceGroupName             : ResourceGroup01
ServerName                    : Server01
DatabaseName                  : Database02
Location                      : Central US
DatabaseId                    : 34d9d561-42a7-484e-bf05-62ddef8000ab
Edition                       : GeneralPurpose
CollationName                 : SQL_Latin1_General_CP1_CI_AS
CatalogCollation              :
MaxSizeBytes                  : 268435456000
Status                        : Online
CreationDate                  : 8/26/2015 10:04:29 PM
CurrentServiceObjectiveName   : GP_Gen5_2
RequestedServiceObjectiveName :
ElasticPoolName               :
EarliestRestoreDate           :
LicenseType                   : LicenseIncluded
Tags                          :
EnableLedger                  : False
PreferredEnclaveType          : VBS

이 명령은 VBS enclave로 구성된 데이터베이스를 가져옵니다.

매개 변수

-Confirm

cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseName

검색할 데이터베이스의 이름을 지정합니다.

Type:String
Aliases:Name
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

-DefaultProfile

Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpandKeyList

데이터베이스의 모든 AKV 키를 보는 데 사용할 플래그입니다.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeysFilter

AKV 키를 가져오는 타임스탬프 필터

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

데이터베이스 서버가 할당된 리소스 그룹의 이름을 지정합니다.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerName

데이터베이스가 할당된 서버의 이름을 지정합니다.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

입력

String

출력

AzureSqlDatabaseModel