February 27, 2020 at 9:02 am
Dears,
Plz help with this topic- I need to grant permission for new table/views created in one schema when this are just created
Thanks in advance,
Hadrian
February 27, 2020 at 9:08 am
Why do you need to trigger this. Why not just grant SELECT at the SCHEMA level instead of the OBJECT level save the overhead of a trigger firing every CREATE?
February 27, 2020 at 9:10 am
So does the USER
not have permission to SELECT
on the schema? If you need a USER
/ROLE
to be able interact with a new object, you normally set that in same batch you do the CREATE
statement. Why not do that?
A DDL trigger to do this feels like the wrong idea (aka an XY problem). What are you actually trying to achieve here?
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
February 27, 2020 at 1:26 pm
Yeah, give the permission of a given role to a given schema and be done. Sounds like you're trying to dig a hole.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply