Solved

Replication

Posted on 2011-09-07
5
261 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Cloud-based technologies and services will continue to grow in popularity in 2017 thanks to the simple, scalable and cost-effective solutions they deliver. Here are three areas where cloud adoption is poised to really take off.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

23 Experts available now in Live!

Get 1:1 Help Now