Creates a copy of a SQL Database that uses the snapshot at the current time.
Syntax DtuBasedDatabase (Default)New-AzSqlDatabaseCopy
[-DatabaseName] <String>
[-ServerName] <String>
[-ResourceGroupName] <String>
-CopyDatabaseName <String>
[-ServiceObjectiveName <String>]
[-ElasticPoolName <String>]
[-Tags <Hashtable>]
[-CopyResourceGroupName <String>]
[-CopyServerName <String>]
[-AsJob]
[-LicenseType <String>]
[-BackupStorageRedundancy <String>]
[-ZoneRedundant]
[-AssignIdentity]
[-EncryptionProtector <String>]
[-UserAssignedIdentityId <String[]>]
[-KeyList <String[]>]
[-FederatedClientId <Guid>]
[-EncryptionProtectorAutoRotation]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
VcoreBasedDatabase
New-AzSqlDatabaseCopy
[-DatabaseName] <String>
[-ServerName] <String>
[-ResourceGroupName] <String>
-CopyDatabaseName <String>
-ComputeGeneration <String>
-VCore <Int32>
[-Tags <Hashtable>]
[-CopyResourceGroupName <String>]
[-CopyServerName <String>]
[-AsJob]
[-LicenseType <String>]
[-BackupStorageRedundancy <String>]
[-ZoneRedundant]
[-AssignIdentity]
[-EncryptionProtector <String>]
[-UserAssignedIdentityId <String[]>]
[-KeyList <String[]>]
[-FederatedClientId <Guid>]
[-EncryptionProtectorAutoRotation]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzSqlDatabaseCopy cmdlet creates a copy of an Azure SQL Database that uses the snapshot of the data at the current time. Use this cmdlet instead of the Start-AzSqlDatabaseCopy cmdlet to create a one-time database copy. This cmdlet returns the Database object of the copy. Note: Use the New-AzSqlDatabaseSecondary cmdlet to configure geo-replication for a database. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
Examples Example 1Creates a copy of a SQL Database that uses the snapshot at the current time. (autogenerated)
New-AzSqlDatabaseCopy -CopyDatabaseName <String> -CopyResourceGroupName <String> -CopyServerName <String> -DatabaseName db1 -ResourceGroupName MyResourceGroup -ServerName s1
Example 2
Creates a copy of a SQL Database that uses the snapshot at the current time. (autogenerated)
New-AzSqlDatabaseCopy -CopyDatabaseName <String> -CopyResourceGroupName <String> -CopyServerName <String> -DatabaseName db1 -ResourceGroupName MyResourceGroup -ServerName s1 -ServiceObjectiveName 'S1'
Parameters -AsJob
Run cmdlet in the background
Parameter properties Type: SwitchParameter Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -AssignIdentityGenerate and assign a Microsoft Entra identity for this database for use with key management services like Azure KeyVault.
Parameter properties Type: SwitchParameter Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -BackupStorageRedundancyThe Backup storage redundancy used to store backups for the SQL Database. Options are: Local, Zone and Geo.
Parameter properties Type: String Default value: None Accepted values: Local, Zone, Geo, GeoZone Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -ComputeGenerationThe compute generation to assign to the new copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Aliases: Family Parameter sets VcoreBasedDatabase Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -ConfirmPrompts you for confirmation before running the cmdlet.
Parameter properties Type: SwitchParameter Default value: False Supports wildcards: False DontShow: False Aliases: cf Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -CopyDatabaseNameSpecifies the name of the SQL Database copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -CopyResourceGroupNameSpecifies the name of the Azure Resource Group in which to assign the copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -CopyServerNameSpecifies the name of the SQL Server which hosts the copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -DatabaseNameSpecifies the name of the SQL Database to copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 2 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -DefaultProfileThe credentials, account, tenant, and subscription used for communication with azure
Parameter properties Type: IAzureContextContainer Default value: None Supports wildcards: False DontShow: False Aliases: AzContext, AzureRmContext, AzureCredential Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -ElasticPoolNameSpecifies the name of the elastic pool in which to assign the copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets DtuBasedDatabase Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -EncryptionProtectorThe encryption protector key for SQL Database copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -EncryptionProtectorAutoRotationThe AKV Key Auto Rotation status
Parameter properties Type: SwitchParameter Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -FederatedClientIdThe federated client id for the SQL Database. It is used for cross tenant CMK scenario.
Parameter properties Type: Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -KeyListThe list of AKV keys for the SQL Database copy.
Parameter properties Type:String[]
Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -LicenseTypeThe license type for the Azure Sql database.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -ResourceGroupNameSpecifies the name of the Resource Group that contains the database to copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 0 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ServerNameSpecifies the name of the SQL Server that contains the database to copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 1 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ServiceObjectiveNameSpecifies the name of the service objective to assign to the copy.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets DtuBasedDatabase Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -TagsSpecifies the Key-value pairs in the form of a hash table to associate with the Azure SQL Database copy. For example: @{key0="value0";key1=$null;key2="value2"}
Parameter properties Type: Hashtable Default value: None Supports wildcards: False DontShow: False Aliases: Tag Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -UserAssignedIdentityIdThe list of user assigned identity for the SQL Database copy.
Parameter properties Type:String[]
Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -VCoreThe Vcore numbers of the Azure Sql Database copy.
Parameter properties Type: Int32 Default value: None Supports wildcards: False DontShow: False Aliases: Capacity Parameter sets VcoreBasedDatabase Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties Type: SwitchParameter Default value: False Supports wildcards: False DontShow: False Aliases: wi Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -ZoneRedundantThe zone redundancy to associate with the Azure Sql Database. This property is only settable for Hyperscale edition databases.
Parameter properties Type: SwitchParameter Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False CommonParametersThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs String Outputs AzureSqlDatabaseCopyModelRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4