Skip to content

Commit dbd3fec

Browse files
authored
Create creating_db_role
1 parent 4d0e8b9 commit dbd3fec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
IF NOT EXISTS (
2+
SELECT 1
3+
FROM sys.database_principals
4+
WHERE name = 'index_maintenance' AND type = 'R'
5+
)
6+
BEGIN
7+
CREATE ROLE index_maintenance;
8+
END
9+
GO
10+
11+
GRANT ALTER ON OBJECT::dbo.Teaching TO index_maintenance;
12+
GO

0 commit comments

Comments
 (0)