Solved

Replication

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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