Search code examples
sql-server-data-tools

SSDT not generating statements for permission


I have a SSDT project which setup to not drop anything.

Now I am trying to:

  1. Add script to create new role
  2. Add script to grant permission to the role created at step 1
  3. Assign role to login without using SSDT

Now, the script to create new role (1) working fine, but there are nothing for the permission (2), I have tried to grant SELECT on schema/table but both not showing up in the resulting script.

I guess I am missing something but have no idea what it is, any pointer are welcome.


Solution

  • At the end the issue is nothing to do with the options but the user I use.

    I am using a user with role db_ddladmin, db_datareader and db_datawriter which will not generate the statement but also no error or warning.

    Tried to use another user with role db_owner then the statements is showing up as expected.

    So the problem is about permission but not SSDT options.