< Back

New-AzureRmSqlDatabaseCopy

Tue Jan 29, 2019 10:09 pm

NAME New-AzureRmSqlDatabaseCopy



SYNOPSIS

Creates a copy of a SQL Database that uses the snapshot at the current time.





SYNTAX

New-AzureRmSqlDatabaseCopy [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> [-AsJob] -CopyDatabaseName <String>

[-CopyResourceGroupName <String>] [-CopyServerName <String>] [-DefaultProfile <IAzureContextContainer>] [-ElasticPoolName <String>]

[-ServiceObjectiveName <String>] [-Tags <Hashtable>] [-Confirm] [-WhatIf] [<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

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-CopyDatabaseName <String>

Specifies the name of the SQL Database copy.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CopyResourceGroupName <String>

Specifies the name of the Azure Resource Group in which to assign the copy.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CopyServerName <String>

Specifies the name of the SQL Server which hosts the copy.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DatabaseName <String>

Specifies the name of the SQL Database to copy.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ElasticPoolName <String>

Specifies the name of the elastic pool in which to assign the copy.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the Resource Group that contains the database to copy.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

Specifies the name of the SQL Server that contains the database to copy.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServiceObjectiveName <String>

Specifies the name of the service objective to assign to the copy.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Tags <Hashtable>

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"}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Sql.Replication.Model.AzureSqlDatabaseCopyModel

This cmdlet returns a Database object that represents the copied database.





NOTES









1:















RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... tabasecopy

New-AzureRmSqlDatabaseSecondary

SQL Database Documentation https://docs.microsoft.com/azure/sql-database/