I am developing an application and i need to migrate data from netezza database into another database. For that i need to write an application in C++ or java to read from netezza database. Can anyone guide if there are any native API available for C++ or do we have to use ODBC. If ODBC is the way to go can anyone guide me how.
1 Answers
I don't think there is an API for your use case. There is a C++ API for Analytic Executables (user defined functions like special aggregates and table functions, but these aren't going to get you a result set by themselves). I've previously just made an ODBC connection to get to a Netezza instance and execute queries (albeit within C#, not C++). For data migration, especially between two disparate databases, I've typically written the data to a flat file of one sort or another (.csv, tab delimited text file, etc.) and then consumed that file again within my program and pushed that data to the table within the destination db (using a second ODBC connection, and with Bulk Copy (BCP) for SQL server if this is the destination db).
MSDN has some example code for connecting to a db via ODBC using C++ HERE.

- 3,173
- 2
- 14
- 18