Migrating SQLServer DBs to Sybase

  • Thread starter Thread starter iva lopes via .NET 247
  • Start date Start date
I

iva lopes via .NET 247

Hi there, i have to move a bunch of SQLServer DBs onto SYbase. My VB.NEt code uses all the functions in System.Data.SqlClient... do i need to change all my code now for sybase? And do I have to use ODBC? My expeerience here is limited!

thanx
iva
 
You are lucky :). Because Microsoft used Sybase database sources as a start
when they started coding Microsoft Sql Server, these two databases are very
close relatives. There are differences, but fewer than between any two
databases.



You will have problems in migrating related to:

- changing the code to work with a Sybase .NET provider (a better solution
than .NET provider for ODBC). How much you will have to change, it depends
on your code. If you used interfaces and factories, like me, it would be a
very easy task.

- changing the T-SQL code when it differ of Sybase T-SQL behavior. They
aren't so many differences. If you search with google, I'm sure you will
find a lot of links about T-SQL differences.

- any other quirks related to database schema, data types differences.

I hope I didn't forget anything :)



Dumitru


iva lopes via .NET 247 said:
Hi there, i have to move a bunch of SQLServer DBs onto SYbase. My VB.NEt
code uses all the functions in System.Data.SqlClient... do i need to change
all my code now for sybase? And do I have to use ODBC? My expeerience here
is limited!
 
Hi there, i have to move a bunch of SQLServer DBs onto SYbase.

As has been mentioned perviously, SQL Server and Sybase are about as similar
as two RDBMS could be so, chances are, you'll be fine. You will almost
certainly be able to migrate the databases using a combination of SQL
Server-generated scripts to create the structure in Sybase, and SQL Server
DTS to migrate the data into it.
My VB.NEt code uses all the functions in System.Data.SqlClient... do i need
to change all my code
now for sybase? And do I have to use ODBC? My expeerience here is limited!

You will need to change some code certainly, but how much largely depends on
how you've structured your app. If you've created a data abstraction class
which the rest of your app uses to communicate with SQL Server, then that's
all you'll need to change. However, if you've written direct database
connectivity in the code behind each of your aspx pages, then you will
obviously have a bit more work to do :-)

You can use ODBC if you want, but I would strongly suggest you use the
native Sybase .NET provider e.g.

using Sybase.Data.AseClient;

string strConnectionString = "Data
Source='myASEserver';Port=5000;Database='myDBname';UID='username';PWD='password';"
AseConnection objCon = new AseConnection();
objCon.ConnectionString = strConnectionString;
objCon.Open();

or

Dim strConnectionString As String = "Data
Source='myASEserver';Port=5000;Database='myDBname';UID='username';PWD='password';"
Imports System.Data.AseClient
Dim objCon As AseConnection = New AseConnection()
obCon.ConnectionString = strConnectionString
objCon.Open()
 
how much faster do personally you find the Sybase .NET
provider over odbc.net and what does it cost?
 
Back
Top