Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I need to rename some tables in my DB - SQL Server 2005, with this:

EXEC sp_rename 'dbo.TableName', 'Tmp_TableName', 'OBJECT'

but I can't do this - I get this exception -

Cannot rename the table because it is published for replication

This DB doesn't have replication - it was removed 5 years ago - we've just tried it and removed it after a week. So I suppose that it should be a flag somewhere.

Please help me remove this flag somehow.

share|improve this question
1  
sp_removedbreplication 'DB_NAME' that will remove replication from the database + check this out on how to manually remove replication support.microsoft.com/kb/324401 and blogs.msdn.com/b/repltalk/archive/2010/11/17/… –  Kin Jul 29 '13 at 16:14
    
Thank you so much, Kin !!! sp_removedbreplication helped ! –  hotfusion Jul 29 '13 at 17:17
    
Glad it helped. I have put it as an answer. Please upvote/mark as answer. –  Kin Jul 29 '13 at 17:20

1 Answer 1

up vote 5 down vote accepted

sp_removedbreplication 'DB_NAME' that will remove replication from the database.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.