Restore error-Database not enabled for Change Data Capture

  • I continually get this error each time I restore my databases on SQL Server 2019.I end up using the work around below:

    EXEC sp_changedbowner 'sa' .Is there a permanent solution to this issue?

     

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Below are some reasons that could interfere with the restore process and throw the ‘restore of database failed because the database is in use’ error:

    1. You are connected to the database you are trying to restore.
    2. While using SQL Server Management Studio (SSMS) to do a database restore, you have more than one window open in it.
    3. Other users are connected to the master db.

    Read this blog.

    SQL Database Recovery Expert 🙂

  • On the source system - what principle is defined as the database owner?  It appears that the database on the source system is not owned by sa - which leads me to believe that principle does not exist as a login (with the same SID) on the system where you are restoring the database.

    Either change the owner on the source system - or make sure the login on the destination system has the same SID as the login on the source system.

    Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply