views:

207

answers:

2

I am tasked with exporting the data contained inside a MaxDB database to SQL Server 200x. I was wondering if anyone has gone through this before and what your process was.

Here is my idea but its not automated.

1) Export data from MaxDB for each table as a CSV. 2) Clean the CSV to remove ? (which it uses for nulls) and fix the date strings. 3) Use SSIS to import the data into tables in SQL Server.

I was wondering if anyone has tried linking MaxDB to SQL Server or what other suggestions or ideas you have for automating this.

Thanks. AboutDev.

A: 

If this is a one time thing, you don't have to have it all automated.

I'd pull the CSVs into SQL Server tables, and keep them forever, will help with any questions a year from now. You can prefix them all the same, "Conversion_" or whatever. There are no constraints or FKs on these tables. You might consider using varchar for every column (or the ones that cause problems, or not at all if the data is clean), just to be sure there are no data type conversion issues.

pull the data from these conversion tables into the proper final tables. I'd use a single conversion stored procedure to do everything (but I like tsql). If the data isn't that large millions and millions of rows or less, just loop through and build out all the tables, printing log info as necessary, or inserting into exception/bad data tables as necessary.

KM
A: 

I managed to find a solution to this. There is an open source MaxDB library that will allow you to connect to it through .Net much like the SQL provider. You can use that to get schema information and data, then write a little code to generate scripts to run in SQL Server to create tables and insert the data.

MaxDb Data Provider for ADO.NET

AboutDev
If anyone knows of a way to copy the Triggers over too that would be most helpful. I can get the keys and data copying over but the triggers are giving me a headache. thx.
AboutDev