whenever i tried to create a new site in the server it takes up only default content database. I was looking after to create a new site in a separate content database. Unfortunately when i try to create a new site it does not ask me an option to choose the content database that i would like to create the site.
img
I dig up and found that this could be achieved using powershell.
First create a content database using central administration.
To create,
1) Central Administration -> Application Management -> Manage Content Databases under Databases.
2) You can see a content database that is already available by default. Here you have to add a new content database. Click Add a Content database.
3) You could rename the database name. Provide appropriate name for your database. Click ok.
4) Now you could see a new content database is created.
To create a new site in that particular created content database use this following script in posershell.
Powershell Command:
New-SPSite http://yourServerName/sites/YourSite -OwnerAlias "ServerAdministratorUserName" -ContentDatabase ContentDatabaseName -Name "SiteNametobeCreated" -Description "DescriptionabouttheSite" -Template "STS#0"
On successful creation of site over the created database, you will receive this created url.
No comments:
Post a Comment