-- -----------------------------------------------------------------------------
-- SHC Software GmbH
-- Copyright (c) 2014 - 2017
--
-- SHC Mobile (SHC8Mobile_Role_2016)
--
-- Encoding must be Windows-1252 ANSI NOT UTF8
--
-- $Id:$
--
-- @author  infoMantis GmbH
-- @package distler-shcmobile
--
-- -----------------------------------------------------------------------------
--- CREATE EXECUTE Role for the REST database user.
IF NOT EXISTS (SELECT * FROM sys.database_principals 
WHERE name = N'db_execproc' AND type = 'R')
CREATE ROLE [db_execproc] AUTHORIZATION [dbo]
GO

--...with EXECUTE permission at the schema level...
GRANT EXECUTE ON SCHEMA::dbo TO db_execproc;
GO