USE master
--Please change username [CeliveoDB1] to your user name, and password with your password in whole script
CREATe LOGIN [CeliveoDB1] WITH PASSWORD = 'IAmStr0ngPa$$word'
GRANT VIEW SERVER STATE TO [CeliveoDB1]

USE CeliveoDB
CREATe USER [CeliveoDB1] FOR LOGIN [CeliveoDB1]

GRANT CREATE TABLE TO [CeliveoDB1] 
GRANT CREATE VIEW TO [CeliveoDB1] 
GRANT CREATE PROCEDURE TO [CeliveoDB1] 
GRANT CREATE FUNCTION TO [CeliveoDB1] 
GRANT CREATE RULE TO [CeliveoDB1] 
GRANT CREATE DEFAULT TO [CeliveoDB1] 
GRANT CREATE TYPE TO [CeliveoDB1] 
GRANT CREATE ASSEMBLY TO [CeliveoDB1] 
GRANT CREATE XML SCHEMA COLLECTION TO [CeliveoDB1] 
GRANT CREATE SCHEMA TO [CeliveoDB1]
         
GRANT CREATE SYNONYM TO [CeliveoDB1] 
GRANT CREATE AGGREGATE TO [CeliveoDB1] 
GRANT CREATE SYMMETRIC KEY TO [CeliveoDB1] 
GRANT CREATE ASYMMETRIC KEY TO [CeliveoDB1] 
GRANT CREATE FULLTEXT CATALOG TO [CeliveoDB1] 
GRANT CREATE CERTIFICATE TO [CeliveoDB1] 
GRANT CONNECT TO [CeliveoDB1] 
GRANT ALTER ANY SCHEMA TO [CeliveoDB1] 
GRANT ALTER ANY ASSEMBLY TO [CeliveoDB1]
         
GRANT ALTER ANY FULLTEXT CATALOG TO [CeliveoDB1] 
GRANT ALTER ANY SYMMETRIC KEY TO [CeliveoDB1] 
GRANT ALTER ANY ASYMMETRIC KEY TO [CeliveoDB1] 
GRANT ALTER ANY CERTIFICATE TO [CeliveoDB1] 
GRANT SELECT TO [CeliveoDB1] 
GRANT INSERT TO [CeliveoDB1] 
GRANT UPDATE TO [CeliveoDB1] 
GRANT DELETE TO [CeliveoDB1] 
GRANT REFERENCES TO [CeliveoDB1] 
GRANT ALTER ANY DATABASE DDL TRIGGER TO [CeliveoDB1] 
GRANT VIEW DATABASE STATE TO [CeliveoDB1] 
GRANT EXECUTE ON DATABASE::CeliveoDB TO [CeliveoDB1]

USE SJPS
CREATe USER [CeliveoDB1] FOR LOGIN [CeliveoDB1]

GRANT CREATE TABLE TO [CeliveoDB1] 
GRANT CREATE VIEW TO [CeliveoDB1] 
GRANT CREATE PROCEDURE TO [CeliveoDB1] 
GRANT CREATE FUNCTION TO [CeliveoDB1] 
GRANT CREATE RULE TO [CeliveoDB1] 
GRANT CREATE DEFAULT TO [CeliveoDB1] 
GRANT CREATE TYPE TO [CeliveoDB1] 
GRANT CREATE ASSEMBLY TO [CeliveoDB1] 
GRANT CREATE XML SCHEMA COLLECTION TO [CeliveoDB1] 
GRANT CREATE SCHEMA TO [CeliveoDB1]
         
GRANT CREATE SYNONYM TO [CeliveoDB1] 
GRANT CREATE AGGREGATE TO [CeliveoDB1] 
GRANT CREATE SYMMETRIC KEY TO [CeliveoDB1] 
GRANT CREATE ASYMMETRIC KEY TO [CeliveoDB1] 
GRANT CREATE FULLTEXT CATALOG TO [CeliveoDB1] 
GRANT CREATE CERTIFICATE TO [CeliveoDB1] 
GRANT CONNECT TO [CeliveoDB1] 
GRANT ALTER ANY SCHEMA TO [CeliveoDB1] 
GRANT ALTER ANY ASSEMBLY TO [CeliveoDB1]
         
GRANT ALTER ANY FULLTEXT CATALOG TO [CeliveoDB1] 
GRANT ALTER ANY SYMMETRIC KEY TO [CeliveoDB1] 
GRANT ALTER ANY ASYMMETRIC KEY TO [CeliveoDB1] 
GRANT ALTER ANY CERTIFICATE TO [CeliveoDB1] 
GRANT SELECT TO [CeliveoDB1] 
GRANT INSERT TO [CeliveoDB1] 
GRANT UPDATE TO [CeliveoDB1] 
GRANT DELETE TO [CeliveoDB1] 
GRANT REFERENCES TO [CeliveoDB1] 
GRANT ALTER ANY DATABASE DDL TRIGGER TO [CeliveoDB1] 
GRANT VIEW DATABASE STATE TO [CeliveoDB1] 
GRANT EXECUTE ON DATABASE::SJPS TO [CeliveoDB1]