Taking a SQL DB out of replication status


I have a SQL 2008 DB that has a log file that continued to grow.  Tried shrinking it, but that did very little.  I then noticed the log_reuse_wait_desc for this DB is set to REPLICATION.  It has no replications associated with it.  I then noticed the SQL Agent service wasn't running.  I started that and it came up fine.

How can I remove the DB from replication status?  As of right now the dbcc loginfo command returns over 5800 rows.  Oops.


Ben ConnerCTO, SAS developerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Deepak ChauhanSQL Server DBACommented:
@ It has no replications associated with it

This issue comes in picture when a published database is restored from one server to another either Replication was set up and removed improperly.

follow these steps:

use <databaseName>
EXEC sp_removedbreplication '<databaseName>'
dbcc shrinkfile(<logfileName>, <TargetValue any int value>)

If above this method does not work.

Just publish this database and create a publication no worry any single table you can use.
Now remove the Replication properly.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ben ConnerCTO, SAS developerAuthor Commented:
That was perfect!  Thank you!

The space went from 14 gig to 1 meg.  

Much appreciated.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.