New-AzureRmDataMigrationSyncSelectedDBObject

Creates a database info object specific to the sync scenario to be used for a migration task.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

New-AzureRmDataMigrationSyncSelectedDBObject
   -TargetDatabaseName <String>
   -SchemaName <String>
   -TableMap <Hashtable>
   [-MigrationSetting <Hashtable>]
   [-SourceSetting <Hashtable>]
   [-TargetSetting <Hashtable>]
   -SourceDatabaseName <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmDataMigrationSyncSelectedDB cmdlet creates a database info object specific to the sync scenario which contains information about source and target databases.

Examples

Example 1

PS C:\> $tableMap = New-Object 'system.collections.hashtable'
	$tableMap.Add("dbo.TestTable1", "dbo.TestTable1")
	$tableMap.Add("dbo.TestTable2","dbo.TestTable2")

	$selectedDbs = New-AzureRmDmsSyncSelectedDBObject 
		-TargetDatabaseName DatabaseName `
		-SchemaName dbo `
		-TableMap $tableMap `
		-SourceDatabaseName DatabaseName

This example creates a database metadata object describing the migrating settings for $DatabaseName to database $DatabaseName.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

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

-MigrationSetting

Migration settings which tune the migration behavior

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

-SchemaName

Schema name to be migrated

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

-SourceDatabaseName

The name of the source database.

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

-SourceSetting

Source settings to tune source endpoint migration behavior

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

-TableMap

Mapping of source to target tables

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

-TargetDatabaseName

The name of the target database

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

-TargetSetting

Target settings to tune target endpoint migration behavior

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

Inputs

None

Outputs

Microsoft.Azure.Management.DataMigration.Models.MigrateSqlServerSqlDbSyncTaskInput