Solved

Replication

Posted on 2011-09-07
5
266 Views
Last Modified: 2012-06-27
We are creating a replication, source and destination database structure is same but some of table names and column names are different. How to handle this situation.
thanks,
Ravi
0
Comment
Question by:asrithap
[X]
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
5 Comments
 
LVL 2

Expert Comment

by:maneksh
ID: 36502463
Hi

Assuming you are using sybase replication server . This can be handled in the replication defintion

When you create the replication definition in the source database you can define the replicate table name and replicate column name if the names are different

Please refer

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc32410_1501/html/refman/X81836.htm

the option is

as replicate_column_name
    Specifies a column name in a replicate table into which data from the primary column will be copied. Use this clause when the source and destination columns have different names.


There are more ways to handle this using function strings if you need some manipulation of data as well

HTH

Maneksh

0
 
LVL 2

Expert Comment

by:maneksh
ID: 36502510
Sorry, I meant create replicaiton definition in the rep server ...

Thanks
Maneksh
0
 
LVL 4

Expert Comment

by:jlsilva01
ID: 36588142
You can do this creating replication definition.

Inside the REPDEF, you can say:

(PRIMARY) tabelaX.ColumnX will replicated into (REPLICATED) tabelaY.ColumnY

This way, you can solve your problem.
0
 
LVL 3

Accepted Solution

by:
pg_vinod earned 500 total points
ID: 36719813
Use:

for different table name destination database

with replicate table named

    Specifies the name of the table at the replicate database. table_name is a character string of up to 200 characters. table_owner is optional and represents the table owner. Data server operations may fail if the actual table owners do not correspond to what you specify in the replication definition.

    If you specify the replicate table name but do not also specify the primary table name, the replication definition name is assumed to be the name of the primary table.


for different columns at destination database

as replicate_column_name

    Specifies a column name in a replicate table into which data from the primary column will be copied. Use this clause when the source and destination columns have different names.
0
 

Author Closing Comment

by:asrithap
ID: 37080392
partial
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Microsoft is moving in-place eDiscovery & hold from ECP to EOP console under Content Search in Search and Investigation Options.  In this post, I will be showing you how to export emails to a PST file using the Content Search Options.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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