-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
-- These future grants were either given to the incorrect role | ||
-- or were granted on object types which don't yet exist within | ||
-- the respective schema. | ||
|
||
-- Task ownership ought to be given to the proxy admin role. | ||
REVOKE OWNERSHIP | ||
ON FUTURE TASKS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE.SYNAPSE_ALL_ADMIN; | ||
REVOKE OWNERSHIP | ||
ON FUTURE TASKS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE.SYNAPSE_RAW | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE.SYNAPSE_RAW_ALL_ADMIN; | ||
REVOKE OWNERSHIP | ||
ON FUTURE TASKS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_RAW | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_RAW_ALL_ADMIN; | ||
-- Previous point, plus there are no tasks in this schema. | ||
REVOKE OWNERSHIP | ||
ON FUTURE TASKS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_ALL_ADMIN; | ||
|
||
-- Dynamic table ownership ought to be given to the proxy admin role. | ||
REVOKE OWNERSHIP | ||
ON FUTURE DYNAMIC TABLES | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE.SYNAPSE_ALL_ADMIN; | ||
REVOKE OWNERSHIP | ||
ON FUTURE DYNAMIC TABLES | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_ALL_ADMIN; | ||
|
||
-- There aren't yet any of these objects types in these schemata, | ||
-- so we shouldn't yet configure future grants for these object types. | ||
REVOKE OWNERSHIP | ||
ON FUTURE VIEWS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE.SYNAPSE_RAW | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE.SYNAPSE_RAW_ALL_ADMIN; | ||
REVOKE OWNERSHIP | ||
ON FUTURE VIEWS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_ALL_ADMIN; | ||
REVOKE OWNERSHIP | ||
ON FUTURE STAGES | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_ALL_ADMIN; | ||
REVOKE READ, USAGE | ||
ON FUTURE STAGES | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_STAGE_READ; | ||
REVOKE MONITOR | ||
ON FUTURE TASKS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_TASK_READ; | ||
REVOKE SELECT, REFERENCES | ||
ON FUTURE VIEWS | ||
IN SCHEMA SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE | ||
FROM DATABASE ROLE SYNAPSE_DATA_WAREHOUSE_DEV.SYNAPSE_VIEW_READ; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters