Pergunta

What does GRANT REFERENCES ON TYPE::dbo.myType TO public exactly mean?

I found this statement together with every single user defined type we have. I wonder if this is useful or not. AFAIK this permission is required only for creation of new objects (e.g. a table or function) to reference the data type - so in case the regular database user will never create new database schema objects, does this kind of explicit permission make any sense?

Foi útil?

Solução

According to BOL, the REFERENCES permission allows the following:

The REFERENCES permission on a table is needed to create a FOREIGN KEY constraint that references that table.

The REFERENCES permission is needed on an object to create a FUNCTION or VIEW with the WITH SCHEMABINDING clause that references that object.

There is no reason for a public user to have this permission when they are unable to CREATE or ALTER any other objects.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top