Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
SQL Server Migration Assistant (SSMA) includes sample files for user reference and use. This section describes how to customize these scripts to fit your needs.
Sample console script files
The following sample console script files cover different scenarios:
ServersConnectionFileSample.xml:This sample provides the different modes of connection available to the source and target database. Select any mode as per your requirement. This sample contains the server definitions.
- Connect to the required database by changing the values to the required source and target server definitions. In the example, all values are variable values that you find in
VariableValueFileSample.xml. Remove all other connection parameters from your working server connection file.
- Connect to the required database by changing the values to the required source and target server definitions. In the example, all values are variable values that you find in
For more information on connecting to the source and target server, see Create the server connection files.
VariableValueFileSample.xml: This file collates all variables that are used in the sample console script files andServersConnectionFileSample.xml. To execute the sample console scripts, replace the sample variable values with user defined ones and pass this file as an additional command line argument along with the script file.For more information on Variable Value File, see Create variable value files.
AssessmentReportGenerationSample.xml: Use this sample to generate an XML assessment report for analysis before you begin to convert and migrate data.In the
generate-assessment-reportcommand, change the variable value (referVariableValueFileSample.xml) in theobject-nameattribute to the database name you're using. Depending on the kind of object specified, you must also change theobject-typevalue.If you need to assess multiple objects or databases, specify multiple
metabase-objectnodes as illustrated in thegenerate-assessment-reportcommand's Example 4 of the sample console script file.For more information on generating reports, see Generate reports.
Pass the variable value file command line argument to the console application and update
VariableValueFileSample.xmlwith the user specified values.Pass the server connection file command line argument to the console application and update the
ServersConnectionFileSample.xmlwith correct server parameter values.
ConversionAndDataMigrationSample.xml: Use this sample to perform an end to end migration from conversion to data migration. Change the following mandatory attribute values:Command name Description Attribute map-schemaSchema mapping of source database to the target schema. source-schema: Specifies the source database that you want to convert.sql-server-schema: Specifies the target database that you want to migrate toconvert-schemaConverts the schema from source to the target schema.
If you need to assess multiple objects or databases, specify multiplemetabase-objectnodes as illustrated in theconvert-schemacommand's Example 4 of the sample console script file.object-name: Specify the source database or object name that you want to convert. Ensure that you change the correspondingobject-typebased on the type of object that you specify in theobject-namesynchronize-targetSynchronizes the target objects with the target database.
If you need to assess multiple objects or databases, specify multiplemetabase-objectnodes as illustrated in thesynchronize-targetcommand's Example 3 of the sample console script file.object-name: Specify the SQL Server database or object name that you want to create. Ensure that you change the correspondingobject-typebased on the type of object that you specify in theobject-namemigrate-dataMigrates the source data to the target.
If you need to assess multiple objects or databases, specify multiplemetabase-objectnodes as illustrated in themigrate-datacommand's Example 2 of the sample console script file.object-name: Specifies the source database or tables name that you want to migrate. Ensure that you change the correspondingobject-typebased on the type of object that you specify in theobject-name