--Create The Login
Use master
CREATE LOGIN [SchemaLevelPermission] WITH PASSWORD=N' ¦]è}ÕGpÆå¡K¼_
çÅDEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF,
CHECK_POLICY=ON
GO
-- Create The User
USE [AdventureWorks2008R2]
GO
CREATE USER [SchemaLevelPermission] FOR LOGIN [SchemaLevelPermission]
GO
-- Create Database Roles
USE [AdventureWorks2008R2]
GO
CREATE ROLE [DBR_SchemaLevelPermission] AUTHORIZATION [dbo]
GO
-- Grant Execute Permission on Schema Level To User
use [AdventureWorks2008R2]
GO
GRANT EXECUTE ON SCHEMA::[HumanResources] TO [SchemaLevelPermission]
GO
Use master
CREATE LOGIN [SchemaLevelPermission] WITH PASSWORD=N' ¦]è}ÕGpÆå¡K¼_
çÅ
DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF,
CHECK_POLICY=ON
GO
-- Create The User
USE [AdventureWorks2008R2]
GO
CREATE USER [SchemaLevelPermission] FOR LOGIN [SchemaLevelPermission]
GO
-- Create Database Roles
USE [AdventureWorks2008R2]
GO
CREATE ROLE [DBR_SchemaLevelPermission] AUTHORIZATION [dbo]
GO
-- Grant Execute Permission on Schema Level To User
use [AdventureWorks2008R2]
GO
GRANT EXECUTE ON SCHEMA::[HumanResources] TO [SchemaLevelPermission]
GO
No comments:
Post a Comment