|
Online migration helps you to connect
to a source Sybase ASE database, fetch the required or all Sybase specific
database objects (Tables, Indexes, Views, Triggers, and Stored Procedures)
using the tool and then helps you migrate them to equivalents in SQL Server.
The main requirement for Online Migration is that the AdventNet SwisSQL
Sybase to SQL Server Edition should be installed in a system networked
with the system in which Sybase ASE is running. The connection to the
Sybase ASE database can be established either by using JDBC (Java Database
Connectivity) or ODBC (Open Database Connectivity).
Connecting to Sybase
ASE
- Invoking the wizard: Click on the Wizard button above
SQL Server T-SQL Files tree in product GUI. This opens up the
Wizard window used to connect and fetch the objects from the
Sybase database
- Specifying the Project Name: Whenever a connection is made,
and objects fetched from a Sybase database, the tool defines a Project
to store all the retrieved information. More on SwisSQL
Project organization can be learnt from here . You can specify a
desired Name for the Project in the first screen of the wizard.
The project by default will be stored under <product_install_dir>/AdventNet/SwisSQL/SybaseToSQLServer/Projects
directory by creating a folder in the name of the project specified
in the first screen. Click Next button to continue.

- Specifying the connection parameters: The second
screen helps in specifying the mode of connection with the Sybase ASE
database. As mentioned before, this could be either through JDBC or
ODBC. If you wish to connect using JDBC, click on the JDBC option
and click Next.
Specifying JDBC Connection parameters
To establish a connection using JDBC, you need
to specify the following details in the screen and click Next
to continue
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 by default.
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.
Note:
- You can also connect using any other Sybase ASE
JDBC driver
- This configuration screen is specific only for JDBC and will
not appear if you choose to connect using ODBC

- The next step involves specifying the database connection parameters
to connect to the Sybase database and this depends on whether you have
chosen JDBC or ODBC connection in the previous step. After configuring
the required parameters as explained below, click Next to continue.
Establishing a JDBC
Connection - Default and Advanced Settings
If JDBC is chosen, you can 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) will be used 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.
Default Settings Tab
- 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 of the machine.
- 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.
Default Settings Tab - screenshot

Advanced Settings Tab
- Connection URL : Specify the HostName replacing
localhost in the URL field jdbc:jtds:sybase://swissql-demo:2048/model
. You can specify domain name of the server or the IP address
of the machine, where Sybase ASE is running.
- User name : The User name using which the connection
needs to be established with the database
- Password : The Password corresponding the user
Advanced Settings Tab - screenshot

Establishing an ODBC
Connection
If ODBC option is chosen to connect to Sybase ASE
database then, to establish an ODBC connection, you need to have a
Data Source Name (DSN) configured in your local system to be associated
with the source Sybase database. To set up a data source name for
the Sybase database, navigate through Control Panel -> Administrative
Tools -> Data Sources in the Windows system and specify data
source name. To setup a DSN you need to have the Sybase ODBC driver
installed in your machine. Sybase ODBC driver is part of the Sybase
Development Kit (SDK). For more information on Sybase SDK follow the
link given below :
http://www.sybase.com/products/informationmanagement/softwaredeveloperkit
- Fetching Sybase ASE Objects: A
successful connection will be established only if the connection parameters
are correct. Once the connection is established, you can fetch the
required objects from the database. The wizard helps you to specifically
choose the required Sybase object types you want to fetch from the database.
By default all the object types viz. Tables, Indexes, Views, Procedures,
Triggers, and User Defined Data types are fetched from the Sybase database.
If you prefer not to fetch any of the object types, you can uncheck
the corresponding Check box in the table. After selecting the
final set of Sybase ASE objects, click Fetch button to fetch
the specified Sybase objects.

- Viewing the Fetched Objects: When the specified Sybase
ASE objects are fetched, a dialog pops with the information on the total
number of lines of Sybase T-SQL code fetched from the database along
with the location of the project where the retrieved information is
stored in the local file system. Click OK button to load all
the retrieved database objects in the Left hand side T-SQL tree
categorized based on the object types (i.e. Tables, Indexes, Triggers
etc.). You can click on any Sybase object loaded in the T-SQL tree and
click View T-SQL button to view the file.
When the tool fetches the database objects, it
writes the SQL code corresponding to the object as flat files in
the local file system under the corresponding project directory.
The tool creates one file per database object under a predefined
directory structure. The default file path is :
<product_install_home>/AdventNet/SwisSQL/SybaseToSQLServer(Version_Number)/Projects/<project_name>/TSQL/<object_type>/<object_name>.sql
Eg: You could view the the code corresponding
to a Table named EXAM_SCHEDULE in EXAM_SCHEDULE.sql file
in the following location
C:\AdventNet\SwisSQL\SybaseToSQLServer<Version_Number>\Projects\Project_1\TSQL\Table\EXAM_SCHEDULE.sql
- Migrating the Sybase objects
to SQL Server: After fetching the required objects from the Sybase
ASE database, the next step would be to migrate them to equivalents
in SQL Server. To migrate all the retrieved objects to SQL Server, click
on the Migrate button shown in the toolbar to migrate all the
loaded files in one go. You can also select a specific list of objects
from the tree and click on the Migrate Selected Files button
in the toolbar to perform a selective migration (i.e. migration for
required objects alone). When you invoke the Migrate option or
the Migrate Selected Files option, the tool pops up a Progress
Viewer window which shows the progress on the current migration.
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.

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 is 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.

Detailed Migration Reports
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 your
Internet Explorer window. 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 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(Version_Number)/Projects/<project_name>/ConvertedMSSQL/<object_type>/<object_name>_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.
- Viewing the Converted
Files: Users can view, compare, and analyze Sybase ASE source files
and the migrated SQL Server files to understand the conversion. After
the migration, the MSSQL Files tree is created with equivalent
objects of the TSQL Files tree. Users can traverse the TSQL
Files tree to select the required file and double-click on it or
click View TSQL to open the file in SQL Viewer. Users
can open the same file from the migrated MSSQL Files tree and
double-click on it or click View MSSQL to visually compare files.

- Compiling
the migrated objects in SQL Server database
- Loading SwisSQL projects for Repeated
Migration: AdventNet SwisSQL Sybase to SQL Server Edition helps
you save your complete migration environment with source files, migrated
files, logs, and reports as SwisSQL projects. With the migration environment
saved in projects, you can fine tune and refine the output with repeated
migration. SwisSQL projects are stored under
<Product Home \ Projects >
Eg: C: \AdventNet\SwisSQL\SybaseToSQLServer<Version_Number>\Projects
Loading an existing SwisSQL project
- Click on the Wizard button available above the MSSQL
tree. This invokes the Wizard
- The first screen in the Wizard prompts for Project Details,
with a option to open an existing project using the Open Project
button.
- Click Open Project and select the <your_project_name>.swissql
file in your local directory (this file can be located under <Product
Home/Project/project_name> directory), and click Load
to load the project into the tool.
- Once the project is loaded into the tool, you can view the Sybase
ASE objects in the T-SQL tree. Based on the status of the loaded project,
you can view the source and migrated files or just the source files
in the project.
- To view a particular Sybase ASE object, you can select the required
Sybase ASE object on the T-SQL tree and click View T-SQL. If
you find the MSSQL Tree loaded with converted SQL Server objects
too, you can select the required object and click View MSSQL
to view the file.
- You can make the required changes outside the tool and perform repeated
migration to match your requirements.
SwisSQL helps you effectively manage migration projects.
Refer Managing SwisSQL projects
for more information.
|