0

I have to insert some data in some SQL Server tables from a select in a DB2 system. It may need some mapping in between select-insert tables as well. The task will have to run frecuently on a linux server (SLES).

At the moment there aren't any tools/utilities in the SLES server to connect to any of the two database systems.

I am not sure if the best way to tackle this would be to do it in bash with the ODBC (or ODBC utilities like unixODBC or iODBC) from both DBMS's or go for a more high level solution in java o python.

If I were for a scripting bash solution, what dependecies would I need?

The program would affect only 4 to 7 tables but with a considerable volume of data. Performance is not critical because the load task will be run at night.

Watchmaker
  • 4,908
  • 1
  • 37
  • 38
  • if you have [tag:sql-server] than you can use SSIS to read data from [tag:DB2] and write it to [tag:sql-server] https://msdn.microsoft.com/en-us/library/ms169917.aspx –  Jun 02 '15 at 12:10
  • You can create a task (cron) that export to CSV (Comma separated values) from DB2 and then just import into SQL server. If you need something more structured you can use a ETL tool like Pentaho or similars. – AngocA Jun 02 '15 at 13:27
  • @VladimirOselsky Oselsky I don't have sql Server, I just have an endpoint and credentials to access it. At the moment I can see the tables and make sure of the field types by using SQL Server Management Studio. – Watchmaker Jun 03 '15 at 10:26
  • @AngocA at the moment I am not able to connect to db2 nor to sql server. I still need to install the neccesary packages/dependencies in SLES. That was actually part of my question. – Watchmaker Jun 03 '15 at 10:49
  • I think I am going for the [Microsoft® ODBC Driver 11 for SQL Server® - SUSE Linux Community Technology](https://www.microsoft.com/en-us/download/details.aspx?id=34687) because it includes also the `sqlcmd` for Linux. And I'll get the csv files from an ftp connection. I feel curious about Pentaho and creating a script in it to do the whole process with it, but I do not know the complexity of that and as always time is a constraint. – Watchmaker Jun 10 '15 at 12:19
  • Well, I can't access the server where the SQL Server is installed, just to to the db instance. So it is not possible to do a bulk insert from a .csv file. – Watchmaker Jun 11 '15 at 10:27

0 Answers0