Solved

Replication

Posted on 2011-09-13
6
208 Views
Last Modified: 2012-05-12
I want to do replication, table names and column names in source and destination database is different. is this possible?
0
Comment
Question by:asrithap
6 Comments
 
LVL 5

Expert Comment

by:Brian Chan
ID: 36534126
My understanding is, No. it is not going to happen. That's because how replication works is by creating a snapshot of the replicated articles and copy to the other side (That is snapshot replication) and clearly the schema will be the same because of the snapshot mechanism. On the other hand, said transactional replication will reapply the log delta to the subscription. So again, schema need to be the same or the log transactions will not successful because object is not existed then.

Anyone else have a different idea with this?
0
 
LVL 9

Expert Comment

by:mimran18
ID: 36534300
0
 
LVL 4

Expert Comment

by:rbride
ID: 36534571
I must disagree with bpnchan. We do this all the time. If you are using transactional replication you can set it up so that the each replication event (insert / update / delete) goes via a stored procedure and this stored procedure does the mapping for you.

You create a publication and an article specifying a custom stored procedure:
http://msdn.microsoft.com/en-us/library/ms152489.aspx
http://technet.microsoft.com/en-us/library/ms173857.aspx

0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 5

Expert Comment

by:Brian Chan
ID: 36535263
@rbride, OK, that's interesting. Indeed, it sound pretty hardcore. Thanks for sharing it or I will never there is other possibility.

@asrithap, I have come across the book  Pro SQL Server 2008 Replication by Sujoy Paul, I remember that there is something mentioned about replication to be done via store procedure. That may be a good reference for your purpose.

0
 
LVL 4

Accepted Solution

by:
rbride earned 500 total points
ID: 36536062
@bpnchan: another possibility that might work is creating a view that matches the destination table and replicating from the view and not the table. I must admit that I haven't tried that yet, but it is possible to use views as articles.
0
 

Author Closing Comment

by:asrithap
ID: 37080383
partial answer
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now