Arrange the Source Code

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

SQLServer has many versions and each version of the database has different versions of the SQL Server Management Studio (SSMS).

We have notice that the export for each version may vary significantly. Also a lot of artifacts are added to the scripts, like checks to validate if the database or table is created prior to migration. Those pieces of code are not really needed for migration.

In order to clean up the code we provide a the functionality called Prepare my code. This functionality will prepare your code, getting rid of this added scripts and only focusing on the code to be migrated.

Also, we include some options that will help you arrange the code in a better way. The options for preparing the code for migration are:

Pretty Print (format your source code)

When this option is used, the processed code will be printed in a Sql-Standard way. When this option is not used, the code is printed just as the input is created.

CREATE TABLE MYDB1.Example1(COL1 VARCHAR (MAX),COL2 VARCHAR (50),COL3 VARCHAR,COL4 NVARCHAR (MAX),COL5 NVARCHAR (50),COL6 NVARCHAR);l

Maintain the input folder structure

When arranging the information, multiple files might be created, this occurs because we extract each Top Level Object (Tables, Views, Procedures, Functions) into a separate file. Also, we are able to separate those files between TLO so each one is grouped in a folder.

When this option is checked, we will make sure the input folder structure is maintained as much as we can, without forgetting the rules mentioned before.

Generate errors report

This will generate errors report for all the processed code, sometimes we found code that cannot be processed correctly, so the information about those errors will be reported here. The report will contain information about the file where the error occurred, the folder where it is being stored, the count of instances of this error and a small description of it.

NOTE: After running the tool generates an summary of the extracted files in the root of the output folder. This file is called arrange.csv. After running the tool it is good to check this file to make sure that no objects were ignored during the arrangement process.

Last updated