Click here to Skip to main content
15,887,338 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to transform between two different database schemas the same data. For example i have one table in old schema looking like this:

OLD EMPLOYEE TABLE
USER_ID - NUMBER (PRIMARY KEY)
FIRST_NAME - VARCHAR(50), (NOT NULL)
LAST_NAME - VARCHAR(50), (NOT NULL)
CITY - VARCHAR(50), (NOT NULL)

and i need to transform it to new tables like these:

NEW EMPLOYEE TABLE
USER_ID - NUMBER (PRIMARY KEY)
FIRST_NAME - VARCHAR(50), (NOT NULL)
LAST_NAME - VARCHAR(50), (NOT NULL)
CITY_ID - NUMBER, (NOT NULL, FOREIGN KEY)

NEW CITY TABLE
CITY_ID - NUMBER (PRIMARY KEY)
CITY_NAME - VARCHAR(50), (NOT NULL)

So I have two questions to ask:

  1. Does exist software that can migrate data between these two schemas (Without or with little usage of SQL)?
  2. If it exist, can this software migrate even between two platforms (I.e. MSSQL to Oracle)?


Thanks!

What I have tried:

I've tried to find some utility like this but without success.
Posted
Updated 12-May-16 6:04am
Comments
PIEBALDconsult 12-Mar-16 13:31pm    
There are plenty of ETL packages out there. If you have SQL Server, you have SSIS.

A trick you could use is something like:

SELECT * INTO Schema2.NewTable FROM Schema1.OldTable


But I think you already have the tools to migrate data between two schema's, take a look at the Bulk Copy utility (BCP) that's included with SQL Server.
With BCP you can export and import the data in CSV format, or even better TSV format (TAB separated values).
This won't allow you to convert to Oracle if you have any binary fields however.

I wrote a conversion program that can convert SQL Server databases including binary fields to PostgreSQL, maybe you can learn something from it:
Convert SQL Server Database to PostgreSQL[^]

Good luck, whahahaaaa !
 
Share this answer
 
Start the SQL Server Import and Export Wizard

In your start menu SQL Server section you have a program which makes connections to both schemas and transfers the data between them with a wizard. Easy!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900