i:0#.w|Ali.Mazaheri

SharePoint, SharePoint and SharePoint!

Deploying MOSS using DBA created databases

Deploying MOSS using DBA created databases

  • Comments 2

By default setup and farm administrator accounts need to have "Security Admin" and "dbcreator" rights so we can setup a MOSS farm, in some cases due to security policies and regulations DBAs are not allowed to give those rights for production SQL which as an alternative we can deploy the farm using DBA created databases as described here.

The following SQL script is what I've used in couple of my MOSS engagements and hopefully other folks can use it or modify it for their own needs:

USE Master
GO
CREATE DATABASE SP_Config
ON
        (NAME = SP_Config,
                FILENAME = 'C:\MSSQL\Data\SP_Config.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_Config_log,
                FILENAME = 'C:\MSSQL\Data\SP_Config_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_Config
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
 
 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_CentralAdmin_Content
ON
        (NAME = SP_CentralAdmin_Content,
                FILENAME = 'C:\MSSQL\Data\SP_CentralAdmin_Content.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_CentralAdmin_Content_log,
                FILENAME =
'C:\MSSQL\Data\SP_CentralAdmin_Content_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_CentralAdmin_Content
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'

 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_MySite_Content
ON
        (NAME = SP_MySite_Content,
                FILENAME = 'C:\MSSQL\Data\SP_MySite_Content.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_MySite_Content_log,
                FILENAME = 'C:\MSSQL\Data\SP_MySite_Content_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_MySite_Content
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdSSPService] FOR LOGIN [LITWAREINC\SP_ProdSSPService] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'
 
 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_SSP1_Admin_Content
ON
        (NAME = SP_SSP1_Admin_Content,
                FILENAME = 'C:\MSSQL\Data\SP_SSP1_Admin_Content.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_SSP1_Admin_Content_log,
                FILENAME =
'C:\MSSQL\Data\SP_SSP1_Admin_Content_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_SSP1_Admin_Content
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdSSPService] FOR LOGIN [LITWAREINC\SP_ProdSSPService] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'
 
 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_Portal_Content
ON
        (NAME = SP_Portal_Content,
                FILENAME = 'C:\MSSQL\Data\SP_Portal_Content.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_Portal_Content_log,
                FILENAME = 'C:\MSSQL\Data\SP_Portal_Content_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_Portal_Content
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdSSPService] FOR LOGIN [LITWAREINC\SP_ProdSSPService] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'
 
 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_SSP1_DB
ON
        (NAME = SP_SSP1_DB,
                FILENAME = 'C:\MSSQL\Data\SP_SSP1_DB.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_SSP1_DB_log,
                FILENAME = 'C:\MSSQL\Data\SP_SSP1_DB_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_SSP1_DB
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdFarmAdm] FOR LOGIN [LITWAREINC\SP_ProdFarmAdm] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdFarmAdm'
GO
CREATE USER [LITWAREINC\SP_ProdMySiteApp] FOR LOGIN [LITWAREINC\SP_ProdMySiteApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdMySiteApp'
GO
CREATE USER [LITWAREINC\SP_ProdSearch] FOR LOGIN [LITWAREINC\SP_ProdSearch] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSearch'
GO
CREATE USER [LITWAREINC\SP_ProdSSPService] FOR LOGIN [LITWAREINC\SP_ProdSSPService] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'
GO
CREATE USER [LITWAREINC\SP_ProdTeamSiteApp] FOR LOGIN [LITWAREINC\SP_ProdTeamSiteApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdTeamSiteApp'
GO
CREATE USER [LITWAREINC\SP_ProdPortalApp] FOR LOGIN [LITWAREINC\SP_ProdPortalApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdPortalApp'
 
 -------------------------------------------------------------

USE Master
GO
CREATE DATABASE SP_TeamSite_Content
ON
        (NAME = SP_TeamSite_Content,
                FILENAME = 'C:\MSSQL\Data\SP_TeamSite_Content.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_TeamSite_Content_log,
                FILENAME = 'C:\MSSQL\Data\SP_TeamSite_Content_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_TeamSite_Content
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdTeamSiteApp] FOR LOGIN [LITWAREINC\SP_ProdTeamSiteApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'

-----------------------------------------------------

USE Master
GO
CREATE DATABASE SP_SSP1_Search
ON
        (NAME = SP_SSP1_Search,
                FILENAME = 'C:\MSSQL\Data\SP_SSP1_Search.mdf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
LOG ON
    (NAME = SP_SSP1_Search_log,
                FILENAME = 'C:\MSSQL\Data\SP_SSP1_Search_log.ldf',
                SIZE = 10MB,
                MAXSIZE = UNLIMITED,
                FILEGROWTH = 10%
)
COLLATE LATIN1_General_CI_AS_KS_WS
GO
USE SP_SSP1_Search
GO
sp_changedbowner 'LITWAREINC\SP_AdminUser'
GO
CREATE USER [LITWAREINC\SP_ProdFarmAdm] FOR LOGIN [LITWAREINC\SP_ProdFarmAdm] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdFarmAdm'
GO
CREATE USER [LITWAREINC\SP_ProdMySiteApp] FOR LOGIN [LITWAREINC\SP_ProdMySiteApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdMySiteApp'
GO
CREATE USER [LITWAREINC\SP_ProdPortalApp] FOR LOGIN [LITWAREINC\SP_ProdPortalApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdPortalApp'
GO
CREATE USER [LITWAREINC\SP_ProdSearch] FOR LOGIN [LITWAREINC\SP_ProdSearch] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSearch'
GO
CREATE USER [LITWAREINC\SP_ProdSSPService] FOR LOGIN [LITWAREINC\SP_ProdSSPService] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdSSPService'
GO
CREATE USER [LITWAREINC\SP_ProdTeamSiteApp] FOR LOGIN [LITWAREINC\SP_ProdTeamSiteApp] WITH DEFAULT_SCHEMA=[dbo] GO SP_ADDROLEMEMBER 'db_owner', 'LITWAREINC\SP_ProdTeamSiteApp'

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 2 and 1 and type the answer here:
  • Post