Today i will show you on how to create a site collection which uses a different content database for itself.
Note: Make sure that the account you are using has full privileges on the Web front end as well on the SQL Server as it needs have permissions to create a site as well as create a Database.
Step-1: Create managed path using central admin UI
- Open Central Administration -> Goto Application Management Tab -> click on Define Managed Paths under Sharepoint Web Application Management section.
- Change the “web application” to the correct web application (usually the port 80 app).Eg. http://swaraj/
- Under “Add a new path”(s) type the name. eg. Sales or marketing or IT or Accounts.
- Select type as “Explicit Inclusion” and click OK.
- Step-2: Create the new Sales site collection in a new database [SWARAJ_
_ContentDB] i.e SWARAJ_Sales_ContentDB (Better follow a good naming convension to avoid confusion) - Open a new command prompt in the Web front end box and browse to the below path where the stsadm.exe utility resides.
c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN - Below is the original syntax of the stsadm command for createsiteinnewdb syntax.
Syntax
stsadm -o createsiteinnewdb
-url
-owneremail
[-ownerlogin]
[-ownername]
[-secondaryemail]
[-secondarylogin]
[-secondaryname]
[-lcid]
[-sitetemplate]
[-title]
[-description]
[-hostheaderwebapplicationurl]
[-quota]
[-databaseuser]
[-databasepassword]
[-databaseserver]
[-databasename]
Don't panic seeing the command and just include those essentials as given below
stsadm.exe -o createsiteinnewdb -url http://swaraj/sales -owneremail swaraj@example.com -ownerlogin swarajdomainname\kanna -title Sales -databasename SWARAJ_Sales_ContentDB
8. On successfull execution an "Operation completed successfully" appears.
9. Now open browser and type http://swaraj/sales and since you have not given a site template in the site creation time, here comes the prompt for it. Just choose Team site and click ok.
10. From the next step is a prompt to say ok for the default security groups like members and owners which resemble the site name. By default the site owner name is already a member of the group.