Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replication question

Status
Not open for further replies.

ekta22

IS-IT--Management
May 3, 2004
359
US
I want to know if you can replicate between two tables with different names but same table structure. I am using SQL Server 2000.

Thanks
 
ekta22,

Yes it is possible to replicate to a table of a different name in SS2000. I no longer have 2000 though so I can't give
a tip as to how....

If you click around in the subscription and publication properties, you will find where to specify the subscriber's table name.

John
 
Hi John.. I did play around with the properties but didn't see that option.
 
I'll check here at home I have 2000. Let me see if I can find how to repl to another table name.

John
 
Hi there ekta22.

I was able to get this to work under these conditions:

Table1 and Table2(at the subscriber) have exactly the same column names and attributes. I used Snapshot replication. I think this would work for merge or transactional also, but have not tried to replicate to a diff table name with those repl types.

Here you go:
-under Replication--> Publications, right-click the publication name --> Properties

- click Articles
- in the pane on the right side, click the elipse ...
- in the Genral tab, change the Destination table name, insert the table owner name in owner box
- click the Snapshot tab and select 'Delete all data in the existing table'

Save the changes - OK OK OK

Right-click the Publication name (the one you just changed) and click 'Reinitialize all subscriptions' - Yes

Execute the Snapshot Agent (or the respective REPL job)
Then, if the Distribution Agent/job did not run automatically, you will have to run that to push the table to the subscriber.

All done. Check the table at the subscriber database.

(if you have done everything correctly but the destination table still is not populated, you may have to delete the publisher and rebuild everything from scratch)

Good luck. Post back with the results.
John

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top