Redigera

Dela via


New-AzDataMigrationSyncSelectedDBObject

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

Syntax

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

Description

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

Examples

Example 1

$tableMap = New-Object 'system.collections.hashtable'
$tableMap.Add("dbo.TestTable1", "dbo.TestTable1")
$tableMap.Add("dbo.TestTable2","dbo.TestTable2")

$selectedDbs = New-AzDataMigrationSyncSelectedDBObject `
	-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:AzContext, 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
Aliases:Name
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

MigrateSqlServerSqlDbSyncTaskInput