Showing posts with label Sharepoint. Show all posts
Showing posts with label Sharepoint. Show all posts

Saturday, March 14, 2015

Get all the site collection with content DB details using powershell commands

As discussed earlier power shell commands are pretty powerful than SharePoint object model code. Some time we can't run SharePoint object model code in production environment like gathering site/server/DB details.

We can get sites and content DB details using following power shell commands 


$rootSite=New-Object Microsoft.SharePoint.SPSite("Web app URL")
$spWebApp = $rootSite.WebApplication 
foreach($site in $spWebApp.Sites) {
    
    write-output "$($site.RootWeb.Url) - $($site.ContentDatabase)"     
  
    $site.Dispose() 


Wednesday, March 11, 2015

SharePoint 2010 site accessing error - The server is busy now. Try again later

While accessing ee.ihess.com (SharePoint 2010) site, I got the error saying that “The server is busy now. Try again later” as shown the image below.


We can get this error when on the processes/services taking up the bulk of your server resources you can take different actions to reduce this overload (For example: recycling the timer service more often). We have the option to turn off HTTP throttling for an entire web application in Central Administration.
We can fix this error by using the steps below
  • Navigate to Central Admin > Application Management > Manage Web Applications. 
  • Select the problematic Web App > Select the down arrow next to General Settings and click Resource Throttling.

  • On the bottom of the window there will be an option to turn HTTP Request monitoring and Throttling Off. Click OK to save changes.



Sunday, December 14, 2014

SharePoint deployment – Back to basics – WSP stuck on “Deploying” state

While deploying a WSP in one of my SharePoint 2010 project, wsp stuck on “Deploying” state. I am Deploying the solution with farm admin credentials using Central Administration globally. But the status was “Deploying” for long time.

I have spent almost 2 hours on that but still the state is on “Deploying”. By verifying the few blog posts on the same error by running all the administration service jobs using stsadm.exe – o execadmsvcjobs issue may fixed.



I ran the command but still the Deployment status showing “Deploying”. I have restarted OWS Timer Service on all the servers in the farm. Finally all the Deployments ran successfully. 

SharePoint 2013 error – The server was unable to save the form at this error

While working with SharePoint 2013 list, saving the data I got an error saying that “The server was unable to save at this time. Please try again.” As shown the image below.

By checking the logs I have found following error “Memory gates checking failed because the free memory is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.


After verifying the details in event logs, Services and Task Manager Details, I have found that error causing low memory. To fix this error we have to restart “SharePoint Search Host Control” and “SharePoint Administration service”. By refreshing this error we can have a lot of memory will be freed. We have same error when custom application deployed without disposing object. In that case we need to reset the IIS. By resetting the IIS We can save the list data without error.
Hope this helps.


Wednesday, November 5, 2014

SharePoint OWA Power Point error - Sorry, PowerPoint Web App Ran into a problem opening this presentation.

In SharePoint 2013 environment I got an error PowerPoint while previewing the document. Error message states that “sorry PowerPoint web app ran into a problem opening this presentation to view this presentation please open it in Microsoft PowerPoint” as shown the image below.



I am seeing this only one Power Point documents only. Word apps and all the other office are working as expected. By double clicking on the document it is opening as expected.
I have verified ULS logs and IIS logs on trouble shooting this error. I didn’t any information on this error. Tried using fiddler to get any of the information. But no luck. Verified few posts and did following,
  •  Tried to rebuild the Office Web App servers
  •   By passed the host files targeting OWA server
  •  Changed service accounts

All of the options are not worked. Finally one of the post suggested to clear the cache in “d” folder on “C:\ProgramData\Microsoft\OfficeWebApps\Working\d” location in Office Web App server as shown the image below (drive is dependent. In my case it is C:\ If you didn’t find ProgramData, you have set folder option to show the hidden files.)


Go the folder location and remove all the files in the folder (back up all the files instead of deleting). Wow…. It worked like a charm. Almost 3 days I worked on this issue but resolution is this much simple.

Hope this helps..!!!


Sunday, November 2, 2014

SharePoint back basics – move site collection to another content Database using PowerShell commands

Yes, we can move SharePoint site collection form one content DB to another Content database. But before moving the database we need to check following things,
  • New content database should be exists on the same server and it needs to be under the same web application.
  • The account used to move the site collection should be WSS_ADMIN_WPG group and account need to have db_owner permissions.

Before moving the content Db we have verify the size of the DB by using following command,

$spaceUsedinDB = (Get-SPSiteAdministration -Identity (SiteCollection URL).DiskUsed
$spaceUsedinDB

To move the site collection to the new content DB create a new content DB in SharePoint central Admin by navigating to Application management -> Manage Content Database -> Create new Content Database




Run following command in SharePoint management shell,

Move-SPSite SiteCollection URL -DestinationDatabase Target_Content_DB_Name

This operation will take time depending on the site collection size.