restore a cdc db from 2016

  • I'm backing up a SQL 2016 db and copying it to SQL Server 2022.  During the restore, I get a bunch of permission messages.

    RESTORE DATABASE [mydb] FROM DISK = N'e:\sqlbackups\mydb.bak' WITH FILE = 1, keep_cdc, NOUNLOAD, REPLACE, STATS = 5

    At the end of the restore,  it goes through upgrading schema, then I get a bunch of these,

    Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.

    Restore complete.

    sa is owner on the source side.   I am running the restore as sa.

    I see source side is showing Comptability level of 2008.

    I tried another db and I didn't get that.  Maybe something with CDC?

     

     

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

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

  • This occurs when the logins have different IDs between servers. Here's an article that discusses dealing with this.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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