New-AzureRmSqlDatabaseCopy
Creates a copy of a SQL Database that uses the snapshot at the current time.
Important
Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.
To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.
Syntax
New-AzureRmSqlDatabaseCopy
[-DatabaseName] <String>
[-ServiceObjectiveName <String>]
[-ElasticPoolName <String>]
[-Tags <Hashtable>]
[-CopyResourceGroupName <String>]
[-CopyServerName <String>]
-CopyDatabaseName <String>
[-AsJob]
[-LicenseType <String>]
[-ServerName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzureRmSqlDatabaseCopy
[-DatabaseName] <String>
[-Tags <Hashtable>]
[-CopyResourceGroupName <String>]
[-CopyServerName <String>]
-CopyDatabaseName <String>
[-AsJob]
-ComputeGeneration <String>
-VCore <Int32>
[-LicenseType <String>]
[-ServerName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzureRmSqlDatabaseCopy 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-AzureSqlDatabaseCopy cmdlet to create a one-time database copy. This cmdlet returns the Database object of the copy. Note: Use the New-AzureRmSqlDatabaseSecondary cmdlet to configure geo-replication for a database. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
Parameters
Run cmdlet in the background
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The compute generation to assign to the new copy.
| Type: | String |
| Aliases: | Family |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the SQL Database copy.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the Azure Resource Group in which to assign the copy.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the SQL Server which hosts the copy.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the SQL Database to copy.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the elastic pool in which to assign the copy.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The license type for the Azure Sql database.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the name of the Resource Group that contains the database to copy.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the SQL Server that contains the database to copy.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the service objective to assign to the copy.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies 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"}
| Type: | Hashtable |
| Aliases: | Tag |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The Vcore numbers of the Azure Sql Database copy.
| Type: | Int32 |
| Aliases: | Capacity |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |