AdventNet SwisSQL Home SwisSQL Sybase to SQLServer AdventNet Home
 

Offline Migration

SwisSQL Help Home SwisSQL Help Previous SwisSQL Help Next

Users can migrate Sybase Transact SQL objects that are present as script files in the local file system using Offline Migration. . The scripts files containing the Sybase T-SQL code can be directly loaded and migrated. The SwisSQL migration engine uses the Metadata information (information about tables) of the Sybase database to perform an accurate conversion for some of the statements/syntaxes to SQL Server T-SQL. For an accurate conversion you have to fetch the Metadata information of the source Sybase database before loading and migrating the Sybase scripts. The Meta Data Wizard can help you load the Metadata information from the source database to be used for conversion. The sequence of steps to be performed as part of Offline Migration is given below :

  1. Invoking the Meta Data wizard

    You can load the required Metadata information from a Sybase database using the Meta Data Wizard invoked from the GUI. You can invoke the Meta Data Wizard in any one of the following ways

  • Directly Invoking the Meta Data Wizard:

You can invoke the Meta Data Wizard from the Product Menu. Select Action -> Get Meta Data or use the hot keys Ctrl+G to invoke the Meta Data wizard.

  • Meta Data Wizard prompted during migration of Sybase scripts

When the user loads the scripts by clicking ADD button, the tool prompts an option to fetch Metadata before conversion. By clicking on the YES option, users can invoke the Meta Data Wizard. You can turn off this option by checking the Don't show this option next time, if you prefer not connecting to source database to fetch Metadata. If you wish to proceed with the conversion without fetching Metadata click No to proceed.

SwisSQL-Sybase-to-SQLServer-Offline-Migration

  1. Using the Meta Data Wizard

The Meta Data Wizard is a simple three step wizard that helps you fetch Meta data from Sybase ASE database.

Specifying the JDBC Driver connection parameters: The Meta Data Wizard establishes a JDBC connection with the Sybase ASE database. The first screen prompts you to specify JDBC Driver Settings
SwisSQL-Sybase-to-SQLServer-Offline-Migration

Driver class name : This is the name of the Java Driver class (with fully qualified Package structure) that should be used to establish connection with the database. By default, the class named net.sourceforge.jtds.jdbc.Driver is used to connect to the database. This driver class file with other related resources is bundled in a Java Archive (JAR) file named jtds-1.0.3.jar. This JDBC driver is bundled with the SwisSQL Sybase To SQL Server Edition itself.

Loaded Libraries : This configuration is used to specify the path in the local file system where the JAR file can be located for usage. By default, the tool will point the <Product Home>/lib directory in which the jtds-1.0.3.jar driver can be found.

Click Next to proceed to specify the Sybase connection parameters.

  • Specifying Database Connection Parameters

Specify JDBC connection parameters either in the Default Settings tab or the Advanced Settings tab. When the Default Settings tab is used, the tool assumes the default JDBC driver (provided in jtds-1.0.3.jar mentioned above) to connect to the database. The Advanced Settings tab should be used when some other proprietary driver is used to connect to the Sybase database. In this case, the connection URL as expected by the proprietary driver should be specified in the Advanced Settings tab along with the User name and Password information. If the Default Settings is used, you need to specify the following connection parameters in the screen.

  • Database Host Name : The server machine name where the Sybase ASE database is running. This could either be the domain name of the server or the IP address.
  • Database name : The database name whose objects needs to be fetched for migration.
  • User name : The user name using which the connection needs to be established with the database
  • Password : The Password corresponding the user.

Click Next to Proceed

SwisSQL-Sybase-to-SQLServer-Offline-Migration

  • Fetching Metadata from Sybase ASE DB

Once the connection is established with specified Sybase ASE database, you can fetch the required Metadata information, The Fetch Meta Data Wizard, by default fetches all information based on the Catalog Name, Schema Name, Table name pattern, and Column name pattern specified. To denote that it fetches all the information, you will find an * (Asterisk) corresponding to all the fields.

Parameters to fetch Meta data :

  • Catalog Name: Specify the Catalog Name you want to fetch or use default * (Asterisk) option to fetch all Catalog Names.
  • Schema Name: Specify the Schema Name you want to fetch or use default * (Asterisk) option to fetch all Schema Names.
  • Table name pattern: This parameter refers to the pattern in which Metadata information will be fetched from the tables. If tableNamePattern is given as EMP%, then Metadata information is retrieved only for the tables whose names start with the pattern EMP.You can use the default * (Asterisk) option to fetch all Table name pattern.
  • Column name pattern: This parameter refers to the pattern in which Metadata information will be fetched from the columns. If ColumnNamePattern is given as NAME%, then Metadata information is retrieved only for those columns whose names start with the pattern NAME. You can use the default * (Asterisk) option to fetch all Column name patterns.

Click Fetch to get all the specified Metadata from the specified Sybase database.

SwisSQL-Sybase-to-SQLServer-Offline-Migration

  1. Loading Source Sybase T-SQL Scripts

You can load individual Sybase ASE database scripts such as Tables, Indexes, Views, Triggers, and Stored Procedures available as SQL files. Before loading the files it is important to have the Metadata to ensure accurate conversion. You can still proceed to migrate the files without fetching Metadata.

  • Click Add button in the Import TSQL Files section. An information box appears prompting you to fetch the Metadata information. It is recommended to fetch the Metadata information before proceeding with the migration.
  • Click Yes invoke the Meta Data Wizard
  • To proceed with your migration without Fetching the Metadata, click No
  • A File Load dialog appears, you can browse to specify the location of the file(s) you want to load for conversion
  • Choose the file you want to load from the dialog. To load multiple files hold the SHIFT key down and select multiple files and click Load
  • The files are immediately loaded in the T-SQL files tree. You can migrate selected files or all the files.
  • Migrating the sybase objects to SQL Server.
  1. Migrating the Sybase ASE objects to SQL Server

To migrate all the Sybase ASE objects to SQL Server, click on the Migrate button shown in the toolbar. When you invoke the Migrate option, the tool pops up a Progress Viewer window which shows the progress made on the migration by the tool. The various options like View Report and Close are disabled when the migration is in progress. Once the migration for all the objects are complete, both these options are enabled for the user. The View Report button can be used to view a brief report on the migration performed by the tool.

SwisSQL-Sybase-to-SQLServer-Offline-Migration

The brief report contains the following information :

The Summary Report contains the following information :
  • Time taken for migration : This indicates the total time taken for the migration process (for all the input objects)
  • Migration success percentage : This corresponds to the success level of migration to a scale of 100. The migration percentage is calculated as

(Total number of objects taken for migration - Total number of objects successfully migrated)


(Total number of objects taken for migration)

 

X 100

NOTE : The objects existing in files that were not parsed by the tool will not be considered for computation of migration percentage.

  • Total number of files : Total number of files considered for migration.
  • Number of files not parsed : Total number of files that could not be parsed by the tool
  • Output directory : The migrated files are saved to the specified Output Directory
  • Reports directory : The directory in which reports pertaining to the currently concluded migration are stored
  • Conversion summary table :This table presents a count of total number of various objects taken up for migration along with the count of the number of objects which were successfully migrated by the tool. A difference in these two counts presents the total number of objects which were not converted by the tool.

To view a detailed report on the migration, click on the View Detailed Report button in the reports window. This will open up a html report in a browser window.

SwisSQL-Sybase-to-SQLServer-Offline-Migration

Once you close the Report window and the Progress Viewer window, you can see the migrated files loaded in the Right hand side MSSQL tree. As in the sybase objects, the migrated objects are also written to flat files in the local file system under a pre-defined directory structure. The default output file path is : "<product_install_home>/AdventNet/SwisSQL/SybaseToSQLServer/Projects/<project_name>/ConvertedMSSQL/<object_type>/<object_name>_T.sql"

Eg: Viewing converted EXAM_SCHEDULE.sql file under the Table directory

C:\AdventNet\SwisSQL\SybaseToSQLServer<Version_Number>\Projects\Project_1\ConvertedMSSQL\Table\EXAM_SCHEDULE_T.sql

You can view the contents of the output file (migrated object) by selecting the required object from the right hand side tree and invoking the View MSSQL button from the GUI.

  1. Compiling the migrated objects in SQL Server database
 
SwisSQL Help Home SwisSQL Help Previous SwisSQL Help Next

© Copyright 1996-2006 AdventNet, Inc Trademarks | Privacy Policy SwisSQL - Sybase to SQL Server