sql-serverschema-compare

What would be best security for "Microsoft SQL Server Data Tools, Schema Compare"


When running "Microsoft SQL Server Data Tools, Schema Compare" then I would like to run as a user that is unable to change anything.

It looks like the SQL it mostly write is stuff like

select
    whatever
from sys.something

Is there a group in SQL Server intended for this type of user, or what would be best security for these?


Solution

  • You're looking for the VIEW DEFNINITION permission. See Metadata Visibility Configuration.

    And note that you can grant this selectively if there are objects in the database you want to exclude from the comparison.