Move Data - Different Schemas

Posted on 2010-01-12
Medium Priority
Last Modified: 2012-05-08
I have 2 SQL 2008 databases.  In database "A" I have a table that I want to extract data from and then import that data into a table within database "B".  The schema is a bit different and has different column names so it's not just a straight copy.  I need to have the data synced up only when it changes.  

Any thoughts on how I would do this?  I know I can use SSIS to move data but I'm wondering how to move the data and set it to run when the data changes.

Should I just create a job?  look at replication?
Question by:Westside2004
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 57

Expert Comment

by:Raja Jegan R
ID: 26299979
Kindly confirm whether both databases resides in a single server or not..
If so, then you can create a trigger to copy the records from Database A to Database B on specific events based with a Custom INSERT statement( since your columns are not matching)

Author Comment

ID: 26300096

Same server, different database.

LVL 17

Expert Comment

ID: 26300107
If both databases resides in a single server, then I suggest go by rrjegan17. If not,
you should setup distributed computing using four part name i.e. [server].[database].[schema/owner].[table] and then instead of remote table name in INSERT in trigger use this distributed name.
LVL 57

Accepted Solution

Raja Jegan R earned 2000 total points
ID: 26300132
Since both databases are in same server, trigger would work faster compared to the other options..
And let us know if you need any help in constructing triggers for this scenario..

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question