Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rvallinayagam
Starting Member
2 Posts |
Posted - 2011-03-01 : 07:16:47
|
I found that TRUNCATE TABLE is a non-logged operation that does not fire triggers. It is not permitted because replication cannot track the changes caused by the operation: transactional replication tracks changes through the transaction log;Is there any way to use use "truncate table " command for the replicated table object in Transactional Replication (SQL 2005) since in our application we already using truncate command in many places and i'm not in the postition to change TRUNCATE to DELETE.Please clarify any other way to use truncate command for replicated table object.ThanksVallinayagam |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-03-01 : 07:44:56
|
There is no way to use TRUNCATE TABLE on replicated tables. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-03-01 : 10:43:55
|
What Fred said. Also, you need to be careful DELETING from large tables with no WHERE clause as it can really hammer the distributor. |
|
|
rvallinayagam
Starting Member
2 Posts |
Posted - 2011-03-10 : 11:04:55
|
Thanks everyone for response , i thought of using delete instead truncate, but I should take care while deleting large tables as suggested by russell. |
|
|
suba.anand
Starting Member
8 Posts |
Posted - 2011-07-26 : 06:22:07
|
Hi.. you will have to turn off the replication on the table you want to truncate, truncate the data and then add it back to replication. we have done the same? is it peer to peer transactional replication? |
|
|
|
|
|