1. This was really useful. I was able to take these and tweak the output in those global tables to adjust the user/login names to convert the “AD” permissions into “Azure AD” permissions for some migrations. The revlogin script was also something I could tweak to only reverse out logins specific to the database we’re migrating. Useful when we don’t always have that direct connection to both servers from one machine or when the names change along the way.

    Liked by 1 person

  2. Thanks or the new script. I was trying this on Azure SQL DB. The script generates logins fine on Source, however when I run the create login script on destination it throws following error.

    Msg 40517, Level 16, State 1, Line 3
    Keyword or statement option ‘hashed’ is not supported in this version of SQL Server.


    • Thank you for your comment, Sudhir.
      Indeed it seems that Azure SQL DB does not support the HASHED keyword.

      Looks like you have no choice but to replace the hash with a clear-text password instead, and remove the HASHED keyword :/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.