Starting schema migration...
Total number of object collected: 35
Total elapsed time: 00:00:08.8905823
DDL triggers: 4
Full text catalogs: 2
Plan guides: 2
Roles: 1
Schemas: 5
Stored procedures: 5
Tables: 10
User defined functions: 4
Users: 2
The number of scripted objects: 55
Progress: 100%
Total elapsed time: 00:00:39.9983180
The number of deployed script batches: 110/110
Progress: 100%
Total elapsed time: 00:00:05.6789103
This command runs Run SqlServerSchema Migrations on given SQL Server using the connection string.
Example 2: Run Generate TSQL schema script from the source SQL Server using Parameters
Starting schema script generation...
Total number of object collected: 35
Total elapsed time: 00:00:07.3789860
DDL triggers: 4
Full text catalogs: 2
Plan guides: 2
Roles: 1
Schemas: 5
Stored procedures: 5
Tables: 10
User defined functions: 4
Users: 2
The number of scripted objects: 55
Progress: 100%
Total elapsed time: 00:00:40.9745837
This command runs Run Generate TSQL schema script on given SQL Server using the connection string.
Example 3: Run Deploy TSQL script to the target Azure SQL Database using Parameters
configfile.json example:
{
"Action": "GenerateScript",
"sourceConnectionString": "Server=;Initial Catalog=;User ID=;Password=",
"targetConnectionString": "Server=;Initial Catalog=;User ID=;Password=",
"inputScriptFilePath": "C:\OutputFolder\script.sql",
"outputFolder": "C:\OutputFolder\script.sql"
}
Starting schema deployment...
The number of deployed script batches: 110/110
Progress: 100%
Total elapsed time: 00:00:05.7519257
This command runs Run SqlServerSchema Command from the source Sql Servers to the target Azure Sql Servers using config file.
Parameters
-Action
Required.
Select one schema migration action.
The valid values are: MigrateSchema, GenerateScript, DeploySchema.
MigrateSchema is to migrate the database objects to Azure SQL Database target.
GenerateScript is to generate an editable TSQL schema script that can be used to run on the target to deploy the objects.
DeploySchema is to run the TSQL script generated from -GenerateScript action on the target to deploy the objects.
Optional.
Default: %LocalAppData%/Microsoft/SqlSchemaMigrations) Folder where logs will be written and the generated TSQL schema script by GenerateScript Action.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.