Showing posts with label STSADM. Show all posts
Showing posts with label STSADM. Show all posts

Jan 7, 2013

The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa

Some times while activating the Publishing feature in SharePoint through the options in Site Settings we will get this error:
The feature being activated is a Site scoped feature which has a dependency on a Site Collection scoped feature which has not been activated. Please activate the following feature before trying again: SharePoint Server Publishing Infrastructure f6924d36-2fa8-4f0b-b16d-06b7250180fa

Reason:
The reason being the "SharePoint Server Publishing Infrastructure" feature has to be enabled at SITE COLLECTION level, then it has to be activated at SITE LEVEL enable the feature. So that we can create Publishing pages in SharePoint.

Solution:
It can be done in many ways (2 ways mentioned below):
1. We can use the Site Settings -> Site Collection Administration -> Site Collection Features to enable this feature.
2. Then Site Settings -> Site Administration -> Site Features -> Enable this feature.
3. We can also achieve this using STSADM command as shown below:
STSADM.EXE -o deactivatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url "http://SiteURLHere/" -force
Then,
STSADM.EXE -o activatefeature -id f6924d36-2fa8-4f0b-b16d-06b7250180fa -url "SiteURLHere" -force
Hope this helps you!

Dec 8, 2012

Create Site Collection in Separate Content Database in SharePoint

Problem:
When a “Site Collection” is created in a web application, then the proceeding Site Collections created in the same “Web Application” will use the Same Content DB.
This creates problems in the following scenarios:
1. Size of the one Site Collection grows large then it will affect the other Site Collection too. The
reason being maximum size of a Content DB for a Site Collection with good performance is 200 GB
(referred some MSDN articles).
2.  During migration/archival/splitting of content DB.

Solution:
The solution for the above problem is to “Create Site Collections with Separate Content DB for each Site Collection”.
But by default SharePoint allows you to create new site collections in the Same Content DB which is used by the web application (one created first – Top Level Site Collection)
Using Central Administration page:
1.   Suppose that we have created a Top Level Site Collection with content DB named “WSS_Content_1000”. Now our scenario is to create a new site collection in the same web application with different content db.
2. Now navigate to Central Admin -> Application Management -> SharePoint Web Application Management -> Content databases
3. By using the option Add a content database in the menu, create a new content DB named “WSS_Content_1050”
 6. Now, you can see the database (WSS_Content_1000) in the stopped state: 
 7. Now, try creating a new Site Collection in the same web application. “Your new site collection will be forced to create in the Content DB which is available in the web application” (in our case it is WSS_Content_1050).
8. Now, change the status of the first content db to Ready state.
9. Now to check whether our new site collection is created in different db’s go to Central Administration -> Application management -> Site collection list. “You can see two site collections in two different databases” as shown below:
     ØTop level site collection created in WSS_Content_1000 db
     ØTop level site collection created in WSS_Content_1050 db


10. As shown in the above screenshot, we are able to create a new site collection with a new Content DB using the above method.

Aug 28, 2012

Advantage of PowerShell over STSADM

In SharePoint 2010, new concept called Power Shell is introduced. The main adavantage of using Windows Power Shell over STSADM is follows:
  • Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. Hence, can interact with .Net objects directly.
  • Here we use commandlets (cmdlet) instead of commands. Commandlet is a instance of .Net objects
  • We can automate the tasks using power shell scripts.
  • Windows PowerShell also gives you access to the file system on the computer and enables you to access other data stores, such as the registry and digital signature certificate stores.

Dec 23, 2011

stsadm Command for Creating Backup and Restoring a Site in SharePoint

In this article, we will discuss how to take a backup and restore it using the stsadmn command in SharePoint (WSS 3.0, MOSS 2007).
In SharePoint 2010, we use Power Shell instead of this command.
Before going for that let’s discuss about stsadm
What is stsadm command?
It is a command line tool for administration of SharePoint sites.
Where it is located in the server?

Normally, it is present in the following path

C:\ProgramFiles\Common Files\Microsoft Shared\Web Server Extensions\12\Bin

When you are in the Admin groups, you will able to use this command and perform all the functions.
Site Backup & Site Restore:
Navigate to the following path in command prompt first
C:\>cd Program Files\Common Files\Microsoft Shared\web server extensions\12\bin

1. C:\ Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>stsadm.exe –o backup –url “Site URL” –filename “Location of DAT file with extension” -overwrite
2. C:\ Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>stsadm.exe –o restore –url “Site URL” –filename “Location of DAT file with extension” –overwrite

Example:
Location of DAT file with extension – D:\FolderName\FileBackup.dat