March 9, 2013 at 7:01 pm
My database ''ABC" is configured with snapshot to Sub 1 and transactional replication to Sub 2. last week i drop transactional replication then i want to truncate all tables data keeping snapshot publication. i was not able truncate.
Is this a bug ? after dropping snapshot replication i was able to truncate. Any clue?
March 11, 2013 at 8:29 am
As far as I know it's not a bug, it's by design - If any table/article is included in any active publication, then it cannot be truncated. From BOL "It is not permitted because replication cannot track the changes caused by the operation: transactional replication tracks changes through the transaction log; merge replication tracks changes through triggers on published tables."
For your reference:
http://msdn.microsoft.com/en-us/library/ms151740.aspx
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
March 11, 2013 at 1:07 pm
But after dropping transactional replication keeping snapshot i am not able truncate the data from that table. In spahot we can always truncate.
March 11, 2013 at 1:08 pm
"Dropping transactional replication" - exactly what did you drop? Just the publication? Subscription?
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
March 11, 2013 at 4:36 pm
both
March 11, 2013 at 6:05 pm
Per BOL (see if any of these are true for your situation) - maybe this table has an FK relationship to another table? Or you have CDC enabled?
If that doesn't work, script out the DDL and simply drop and recreate the table.
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
March 11, 2013 at 6:13 pm
thanks, i will try that option. database doesnt have CDC or fk's defined.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy