Sunday, November 29, 2009

Creating dedicated database for Site Collections in SharePoint and Complete Template Ids

By default when you create a Web Application in SharePoint, a Database is created. What if you want a Site Collection under this Web application to be created with a dedicated database. This has proven to be a challenge in that you cannot use sharepoint central administration or the user interface for this purpose. Instead a command tool known as stsadm can be used. So browse to 12hive directory(%SystemDrive%\Program Files\Microsoft Shared\Web Server Extensions\12\Bin )

Use this command: stsadm.exe -o createsiteinnewdb -url http://................... /sites/newSiteName -owneremail owneremailaddress -ownerlogin domainname\adminName -databasename dbName_Content -sitetemplate STS#1 -Title YourSiteName

Here is the explanation:
createsiteinnewdb - Creates a dedicated database
-url - A url to your site e.g http://servername:2222/sites/newSiteName
-owneremail - You have to provide this parameter, this the email normally for admin purposes e.g noreply@stmpserver.local
-ownerlogin - You have to provide this parameter, this is the owner or sharepoint administrator login details e.g mydomain\administrator.
-databasename - This is the optional parameter. If you don't provide this SharePoint will default names such as WSS_Content_0316f86a25cb4982b12d4f5ce833003f provide custom names such as GroupName_Content
-sitetemplate - This is important, you need to provide the template that you site is going to use. See a detailed list below.
-Title - This is optional, if you are building HR Site, provide the name such as Human Resource, this name will appear on the new site.

Web templates ID explained (WSS 3.0):

TemplateID Description
STS#0 Team Site
STS#1 Blank Site
STS#2 Document workspace
MPS#0 Basic meeting workspace
MPS#1 Blank meeting workspace
MPS#2 Decision meeting workspace
MPS#3 Social meeting workspace
MPS#4 Multipage meeting workspace
WIKI#0 Wiki
BLOG#0 Blog

(MOSS 2007)Additional Web Template IDs Include the following

BDR#0 - Document center—A central document management location for an enterprise
OFFILE#0 - Records center—A central location in which records
OFFILE#1 - managers can define routes for incoming files
CMSPUBLISHING#0 - Publishing site
BLANKINTERNET#0 - Publishing site—A site for publishing web pages on a schedule with workflow features enabled
BLANKINTERNET#1 - Press releases site
BLANKINTERNET#2 - Publishing site with workflow—A publishing site for web pages using approval workflows
SPSNHOME#0 - A site for publishing news and articles
SPSREPORTCENTER#0 - Report center—A site for creating, managing, and delivering web pages, dashboards, and Key Performance Indicators (KPIs)
SPSPORTAL#0 - A starter hierarchy for an intranet divisional portal
PROFILES#0 - A profile site that includes page layouts with zones
BLANKINTERNETCONTAINER#0 - Publishing portal—a site collection preconfigured for revision-controlled, secure content creation and publication

No comments:

Post a Comment