New-​Azure​Rm​Sql​Database​Copy

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

Syntax

New-AzureRmSqlDatabaseCopy
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-DatabaseName] <String>
   [-ServiceObjectiveName <String>]
   [-ElasticPoolName <String>]
   [-Tags <Hashtable>]
   [-CopyResourceGroupName <String>]
   [-CopyServerName <String>]
   -CopyDatabaseName <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-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.

Examples

1:

Required Parameters

-CopyDatabaseName

Specifies the name of the SQL Database copy.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DatabaseName

Specifies the name of the SQL Database to copy.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the Resource Group to which this cmdlet assigns the copied database.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

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

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

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
-CopyResourceGroupName

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
-CopyServerName

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
-ElasticPoolName

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
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServiceObjectiveName

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
-Tags

Specifies the tags to associate with the Azure SQL Database copy.

Type:Hashtable
Aliases:Tag
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Inputs

Outputs