On a model we have a permission for deny access on a specific table for a specific user. When we doing CC with a brand new model and noticed that the permission is not anymore active because there is no Deny permission statement in Alter script.
How to generate the permission of deny or grant on a specific table for a specific user at the CC / Alter Script?
Test below is done by a brand new model with one table.
1. Right click table to get table properties and then go to Permission Tab.
You need to assign the permission for this table:
Click the red box above to get permission editor below. Please make sure to select permission you need for this table, in this example, I marked the box "Select", it means this table's select access has been DENY for owner "bob":
2. Then you can do CC with a blank model to test as below and you will see the DENY code will be generated in CC / Alter script:
click right error on table level to get screen below:
it will generate the deny code in Alter Script as below:
CREATE TABLE [Test_Tab1]
[a] char(18) NOT NULL ,
[a1] char(18) NOT NULL
ALTER TABLE [Test_Tab1]
ADD CONSTRAINT [XPKTest_Tab1] PRIMARY KEY CLUSTERED ([a] ASC)
ON OBJECT :: [Test_Tab1]