Archive for the ‘stsadm’ Category

In SharePoint 2010, you may try deploying or upgrading a solution using stsadm and end up with the below error.

A deployment or retraction is already under way for the solution “Solution Name”, and only one deployment or retraction at a time is supported.

This issue occurs if a SharePoint solution deployment fails, yet the timer job is created and not running, you will be unable to redeploy or retract the solution.

To resolve this error and redeploy the solution, follow the below steps.

  1. Go to Central Admin -> System Settings -> Manage Farm Solutions.
  2. Cancel the deployment for your solution. It may have the status failed or deploying, which means deployment is not successful.
  3. Now redeploy your solution.

Hope this helps .


Normally, the SharePoint People Picker shows all the users from the Active directory, local users etc whose profiles are imported. But in some case we need to restrict the users to select only a group of people.

For example, what if i don’t want the AD users to be displayed in the people picker. There is no meaning in removing the AD user profiles from SSP.

Here comes the trick. Using stsadm command tool, I am able to specify that, people picker should use only the users who are provided access in the site collection.

Here the 2 simple steps goes,

  1. Provide permissions to the site collection for the users whom you wish to display in the people picker.
  2. Run this command stsadm -o setproperty –url http:// –pn peoplepicker-onlysearchwithinsitecollection –pv yes

Now, whomsoever the users you provide permission to the site collection will only appear in the people picker too.

When you try to restore a site collection backup using stsadm, you may encounter the error

“The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.”

Few of the times its true that you may not have sufficient space in DB but, not all the times. If you are having space issue here is the kbarticle. When I landed up with the same error i tried

  1. Checking my DB and found GB’s of space is available.
  2. Checked in the central admin where my web application is having an entry for the site collection I restored. But when I tried to open the site in browser, OOPS!!! “Page not found error”.
  3. Tried to delete the site in central admin but 😦
  4. Tried to do so using stsadm. Again error “Cannot complete this action. Please try again later”

When digged I found there is an orphan entry created for my site. Some links on what is orphan entry & how its created. Inshort orphans have been coined the name for objects in a SharePoint schema that live without a parent or child relationship in the database.So you are having an entry in your content DB for the site you tried to restore. So what is the solution?

Remove the orphaned entry in the content database. This needs changes in the web application’s content database which has to be dealt with care if its a production server. We are working on that with the support of Microsoft & hope i will be posting the details soon.

One workaround for this is creating a new content DB for your web application & restoring the site in it. To do so

  1. Go to the central admin and create a new web application(Temporary web appln whose content DB we will use).
  2. Now got to Application Management > Content Databases and select the newly created web application.
  3. The content DB you created will be displayed. Click on it.
  4. In the Manage Content Database Settings page & detach the content DB by selecting Remove content database. Don’t forget to note the name of this content DB which we will be using it further. At this point of time your newly created web application will not be having the content DB associated with it.
  5. Now we have to attach this content DB to your web application which has an orphaned entry.
  6. So go to Application Management > Content Databases and select the web application which displays its available content DB’s.
  7. Click on Add a content database & in the Database Name text box give the name which we have noted in step 4 and complete the process.
  8. Now in the Manage Content Base you will be able to see the new content DB along with the old ones.
  9. Now we have to restore our site in this newly created content DB.
  10. But while restoring the site there may be a chance that the site going into the old content DB’s which is having the orphaned entry which results in same error.
  11. So in the Manage Content Base section for each content DB you can see the “Current Number of Sites” count displayed. Click on the DB and set the “Maximum Number of Sites” to this value.
  12. The above step makes no new site to be created in the old content Db and hence once you restore the site, it will created in our new content DB.
  13. That’s it and now you can restore the site.
  14. Now you can revert the values for “Maximum Number of Sites” we have changed in step 11.

Once you have done a successful back  up of your site collection you will try to restore the site collection using the following command.

stsadm.exe -o restore -url http://server_name/sites/sitename  -filename  “c:\\backup.dat” -overwrite

Unfortunately you may get this error.

The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.

This issue occurs if the computer that is running Windows SharePoint Services has insufficient free disk space that is available to host the restored Windows SharePoint Services Web site. This issue may also occur if the Windows SharePoint Services database has reached its maximum allowed size.

Find the Microsoft support article here kb926061