This post has been migrated from www.experimentsincode.com, we apologise if some of the images or content is missing

This post has been migrated, original date 04 Jan 2009 This script creates a SQL Server database user for the Sitecore 6.2 databases manually. You will need to find and replace %username% and %password% with your values.
CREATE LOGIN %username% WITH PASSWORD = '%password%'

USE Sitecore_Master
GO

CREATE USER %username% FOR LOGIN %username%
GO

GRANT EXECUTE TO %username%
GO

sp_addrolemember 'db_datareader', '%username%'
GO

sp_addrolemember 'db_datawriter', '%username%'
GO

USE Sitecore_Web
GO

CREATE USER %username% FOR LOGIN %username%
GO

GRANT EXECUTE TO %username%
GO

sp_addrolemember 'db_datareader', '%username%'
GO

sp_addrolemember 'db_datawriter', '%username%'
GO

USE Sitecore_Master
GO

CREATE USER %username% FOR LOGIN %username%
GO

GRANT EXECUTE TO %username%
GO

sp_addrolemember 'db_datareader', '%username%'
GO

sp_addrolemember 'db_datawriter', '%username%'
GO
comments powered by Disqus