Monday, July 25, 2011

SQL Server: Extracting Data from OpenEdge Progress without OLE DB Driver

Importing data from OpenEdge’s Progress® data base is simple if you have OLE DB data provider. But if you don’t have OLE DB driver or unable to configure it properly then there are few simple steps to migrate data from OpenEdge’s Progress® to SQL Server.
(Worst thing in Progress ® database I found that you can only restore your database from backup file with only version with which this backup files was created i.e. you can’t restore Progress 9.1 backup file on Progress 10 or newer version)
We will achieve our data migration goal through two step, first to import table structures and import data from flat files to newly created tables.
Copying Table Structuer:
Once you have restored your required backup file, you can access it from “Data Administrator” by connecting your database file.
 Progress normally keep its databases with extension “db” at installation drive\Progress\WRK\YourDatabaseName.db
Once you are connected to your desired database, click on “ProgressDB to M SQL Server” through given path.
Provide necessary information for ProgressDB to ODBC Conversion. Type any name of your choice for “Name of schema holder database” and correct ODBC data source name.

On pressing OK button, it will create “.sql” file on “installation drive\Progress\WRK\”. This sql file contains create table query for all database tables. Open this .sql file in SQL Server and create tables.


Extracting Data
In next step we will extract table data to CSV files.
Select table of your choice.
 Provide file name with target folder path. Select “All (Max 255)” fields to export. You can provide WHERE clause to filter output rows. Press OK button to proced
 Provide any record start string. It will add given string at start of each row. Which you can remove, once data is imported in SQL Server.
 Now you have tables structure and data in text format. Execute simple Data Import process to import your desired data from text files to already created tables.

Sunday, July 24, 2011

SQL Server: Import Data from Sybase Advatage (adt Files) using SSIS


In last post, we have learned to free a Sybase Advantage table (“adt” file) from its data dictionary, so we can import its data to SQL Server.
To extract these “adt” files by using SSIS package first we need a “New OLE DB Connection”.

Select “Advantage OLE DB Provider” as provider and complete folder address in “Server or file name” section. Use “adssys”  as user name and leave password blank. Don't forget to change server type value to "ads_local_server", by clicking on "ALL" button on left of connection Manager. In Initial catalog provide “adt” file name and press “Test Connection ” to test newly created connection.


Drag a new OLE DB Source

Double click “OLE DB Source” to open it in editor and provide OLE DB connection manager and name of required table.

Open properties page for “OLE DB Source” and mark TRUE to “AlwaysUseDefaultCodePage

Now you are ready to import data from OLE DB Source to any type of destination. You can provide OLE DB Destination to insert data directly into a SQL Server database. In this demo we have use Flat File as destination.

Saturday, July 16, 2011

SQL Server: How to Import Data from Sybase Advantage (adt Files)


Sybase Advantage database create separate files for each table and its indexes. Table files are created with extension “adt”. One can import data from Sybase Advantage to SQL Server if she has
  • Access to adt files
  • Advantage OLE DB Provider
But import process is bit tricky because first you must free target “adt” files from its database dictionary, which can be achieved by using Advantage Data Architect. It can be downloaded from http://devzone.advantagedatabase.com/dz/content.aspx?Key=20&Release=16&Product=8&Platform=6 . Once you have install Advantage Data Architect, follow these step to free your target adt files.

1.       Click on new connection wizard

2.       Create a connection to a directory of existing tables

3.       Provide DatabaseName of your choice and then provide correct path of folder where adt files are located on your hard drive and press finish.

4.       Once you have created connection, it will start showing adt tables BUT still you can’t open or export these tables as these are bound to directory.

5.       To free these tables, click on Tools -- > Free Data Dictionary Bound Tables

6.       Provide adt file name with its complete path and press OK button.

7.       Your adt table is now free. Now you can open it in Data Architect. You can export or you can close Data Architect and import this table from SQL Server Import Wizard.
Note: In next post, we will explore a simple method to import adt files by using SQL Server Integration Services Package.

In next post: How to import adt files by using SSIS package