Monday, 9 November 2015

Why a Content DataBase is not cleaning the free space after Move-SPSite or Delete-SPSite?

Hi all,

I was faced to a full Database, and the quick-win solution, was to move some sites to another Database.

After making the list of the site collection present in the database, I found that the moved sites were no more present, as expexted.
But on the SQL side, the Database was still full…

I’ve asked our SQL Team to Shrink the Database, but nothing was changed.

Then, I’ve search why the space used by the moved sites was not cleared by the Timer Job.
Timer Job… The Gradual Site Delete timer job.

I’ve found why the Database didn’t change the free space after moving sites.
The timer job in SharePoint wasn’t correctly set.

After checking, the job supposed to be run automatically every day from 10PM to 6AM, but it wasn’t run.


Reason: start time is before end time. Seems that Microsoft logic is … special.

In the drop down list, the time for the timer job (same problem for all timer jobs in all SharePoint versions) start at 12AM and ends at 11PM.

The problem, is that by default, the Gradual Site Delete timer job is set as below: from 10PM to 6AM
This is quite logic for us (human), but I’ve the impression that the timer job doesn’t see the 6AM after 10PM in the drop-down list.
Also, I found that clicking on the “Run Now” button didn’t free the space in the concerned Database.


Thus, this default setting seems not allowing the Timer Job to run:




Solution: instead  of starting at 10PM, I’ve set it to start at 12AM
                                Now, no more red warning message.
                                And clicking on “Run Now” button is directly clearing the free space of all the                                      databases of my Web App.




So, I’ve had to check all my Gradual Site Delete timer job for each Web App I have.
Also, I found this problem to my SharePoint 2010 Farm and my brand new SharePoint 2013 Farms.


Hope this could help.



That’s all Folks


Wednesday, 26 August 2015

SharePoint 2013 returns to 'upgrade required' status

Hi all,

This post is related to the fact that after upgrading your SharePoint Farm with success, you are faced again with some servers in the "Upgrade Required" status.

As this issue was still coming and coming after each try to re-upgrade my farm, I decided to open a case at Microsoft support.

So, hereunder, you can find the resolution steps that will bring your smile back.


In summary, if one or several servers (my production farm is composed by 25 servers) are going back to the "Upgrade Required" after being marked as "No Action Required" during few days, check first if you don't have some sites that were not upgraded.
In this case, only 1 Site Collection wasn't correctly upgraded, and after a manual upgrade (via powershell cmdlets), all was solved.



Here is the case summary for your records:
==================
Title: SHP2013 returns to 'upgrade required' status
Severity: B
Status: Resolved and Closed

ACTION/RESULT:
Customer reported that after completing the upgrade to CU December 2014 (more than once) on the SharePoint 2013 farm - some the "Servers in this Farm" were still showing "Upgrade Required"

CAUSE/RESOLUTION:
In a previous upgrade attempt, there was the indication of a Site Collection that was not provisioned correctly:
07-24-2015 13:12:59.59 OWSTIMER (0x1CEC) 0x1F5C SharePoint Foundation Upgrade SPSiteWssSequence alsj5 WARNING SPWeb [https://mysite.sharepoint.me/sites/myname] [MyName, MyFirstName] is in a partially provisioned state. 021f1d9d-33b4-00ca-36cd-9ce05d7b2e40

Running (Get-SPSite https://mysite.sharepoint.me/sites/myname).NeedsUpgrade showed that this needs to be upgraded.
Customer ran the script:
$dir = Get-Location
$file = "$dir\farmSCUpgradeRequired.txt"

#Sites
Get-SPWebApplication -includecentraladministration | ForEach-Object {
               $webappurl = $_.Url
               $_.Sites | ForEach-Object {
                              "{0};{1};{2}" -f $webappurl, $_.URL, $_.NeedsUpgrade
               }
} | Out-File $file
This showed that the site collection mentioned before was in fact the only one needing an upgrade.

Customer run the powershell command:
  Upgrade-SPSite https://mysite.sharepoint.me/sites/myname -versionupgrade

The Site Collection was upgraded successfully.

After this, customer ran the "Product Version Job" timer job, and only 2 servers were still showing "Upgrade Required".
Running "stsadm -o localupgradestatus" showed only for these 2 servers, the following error message:
  <object>
    <name>Sharepoint_SA_UserProfile_Profile</name>
    <type>Microsoft.Office.Server.Administration.ProfileDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>
  <object>
    <name>Sharepoint_SA_UserProfile_Social</name>
    <type>Microsoft.Office.Server.Administration.SocialDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>

This means that the servers had something different than the rest of the servers, as the Databases were already up to date.
Running Get-SPDatabase | where {$_.Name -like "*UserProfile*"} | ft Name, NeedsUpgrade, NeedsUpgradeIncludeChildren, CanUpgrade also showed the information for these databases on the affected servers.

As this issue could only be on the servers, running the Configuration Wizard on both affected servers, made the message "Upgrade Required" go away.
After some days, the servers are still on a stable state.
=================



That's all folks

Monday, 11 May 2015

Search did not provide new items

Hi All,


Today, I’ll talk about the Search issue I had few weeks ago.

This started on our SharePoint 2010 production Farm, with complain from users that weren’t able to find they newly added documents in the Search box.
At the beginning, I was asking them to wait until next working day, as the Incremental Crawl was running.

Then, days passed, and more and more users were complaining again and again.

Checking the server was showing that the Incremental Crawl were running, but really slowly.
Every days, I was receiving tickets about the usage of the CPU of my crawl server that was stuck at 100%.

When reading over the web, I discovered that the Crawl engine was using all the CPU while crawling.
This was driving me to the wrong path, and letting my server going deeper in the “glue”

I started to pause all the Content Sources, except one, but nothing seems to unstruck the index crawl.

So, I started to think about this problem, and facing Incremental Crawl of more than 300 hours, I decided to call Microsoft for having their support.
First of all, they confirmed that the Crawl process is using 100% of the available CPU, even if you add more and more CPU.
But the advantage, is that the Crawling Time is reduced.

Then, Microsoft asked me to run the Diagnostic Tool on my Service Farm, and they first pointed out that my servers were not fitting to the minimum hardware requirements: 2CPU + 40Gb HDD.

Then, I made a CPU and HDD upgrade: 4CPU + 270Gb HDD.

I started a Full Crawl of each Content Sources, then gradually, I’ve implemented the “Crawl Schedules” for each Content Sources.


Since last week, all the Content Sources are correctly crawling, and nobody is complaining.


So, this is the point to check when you have a search issue:
 - Number of CPU
 - Size of your log disk
 - Crawl Schedule starting at different time
 - Content DataBases are attached/detached, a Full Crawl must be performed (information given by Microsoft)



Voilà,


Thanks all folks

Tuesday, 31 March 2015

Confirm Site use and Deletion

Hi All,

Today, I spend time to check the Retention Time of an unused mySite.
One of my client was complaining that he received a mail reminder that his mySite will be deleted as there is no activity.

Here is the way to check in SharePoint 2013 (same as SharePoint 2010):

 - Step 1:


 - Step 2:



Et Voilà !!!



That’s all folks


Search Issue: Internal Server Error Exception

HI All,

Today I found the solution of our error with the Search in our SharePoint 2010 Farm.


The problem is that each user making a search into his Site collection via the Search Box as bellow, received this error message:





After checking services, IIS, Central Administration, rebooting all servers from this Service Farm, I still had plenty of Error with the Event ID 8313:



The solution is to stop/start (from Central Administration) the “Search Query and Site Settings Service” from each affected servers.
In my case, I had 2 servers having the service activated.
Thus, I’ve stop/start the servcice on both servers.


The main reason of the Round Robin Service Load Balancer Event, is that when the service is activated on several servers, if the first server cannot fint the search URL, it’ll send the request to the second server.
The risk is to have a ping-pong play between those servers.

To figure out this issue, I’ve read lot of blogs, and I found a clear explanation in Henry Ong blog.
He save my day.


Also, according to Microsoft, I was asked to schedule a daily recycling of the Application Pool for the “Search Query and Site Settings Service” service.
By default, the recycling is not set in IIS.

First point: find the correct Application Pool.

In the event log, the Affected Endpoint was https://<servername>/61c52c151c..../....svc
In the IIS Manager, under “SharePoint Web Services” path, I found it and opened the “Advanced Settings” from the right pane.
Thus, I had the Application Pool to schedule the recycle.


Now, open the Application Pools path, and select the correct Application Pool.
In the right pane, under the “Edit Application Pool” section, select “Recycling”:
                I‘ve decided that this Application Pool will be recycled each day at 4:50 AM.



Don't forget to do this manipulation on all servers that will start the “Search Query and Site Settings Service” service.



Thanks all Folks


Monday, 30 March 2015

How to install AppFabric when having Error 1603?

Hi all,

Today’s story is about an issue to install the AppFabric pre-requisite for a test stand-alone SharePoint 2013 Farm.


appfabric installation failed because installer msi returned with error code 1603


Checking the Environment path didn’t make me happy, as it was already correct.

Rebooting the server before trying again to manually install the AppFabric was another fail.


Then, I’ve decided to uninstall the AppFabric, reboot the server, then re-install the AppFabric:
   it woks like a charm !!!!


In the same way, I’ve patched the AppFabric up-to V1.1 CU5




Voilà,


Thanks all folks

Thursday, 5 March 2015

Diagnose and Clean MissingWebPart and MissingAssembly issues

Hi all,

Today I found useful cmdlets to diagnose and clear those errors in the Content DB of my SharePoint 2010 Farm.


How to:

Step 1:
 - Test-SPContentDatabase -name <ContentDB_Name> -webapplication <Web App URL>

Step 2:
 - Select the WebPart Class GUID

Step 3:
 - Run this command with the related WebPart Class GUID:

Run-SQLQuery -SqlServer "SRV_DATABASE" -SqlDatabase "SharePoint_Content_sharepoint_db_name" -SqlQuery "SELECT * from AllDocs inner join AllWebParts on AllDocs.Id = AllWebParts.tp_PageUrlID where AllWebParts.tp_WebPartTypeID = '9812863c-ee62-dab6-57f5-79e9d4d36022'" | select Id, SiteId, DirName, LeafName, WebId, ListId, tp_ZoneID, tp_DisplayName | Format-List

Step 4:
 - The result will give the below info:

Id                            : a5da7b36-083f-4d07-b50b-8f1fc8d7bbe9
SiteId                      : 53061278-8b1d-4d6d-9dce-8568f90c5574
DirName                 : Sites/blahblasite/Sandbox/TestWSServiceLevelDashboard
LeafName               : default.aspx
WebId                     : 2ab691b1-0d74-4bf2-9524-c6b1d969cfac
ListId                      :
tp_ZoneID              : Left
tp_DisplayName     :


 - The URL to use is:                http://shareppoint.contoso.com/Sites/blahblahsite/Sandbox/TestWSServiceLevelDashboard/default.aspx?contents=1

 - So, here are the steps that I follow to remove the “ErrorWebPart”:
     1- select the Error rows
     2- click on “Close” to set them as “No” for the “Open on Page?” column
     3- select the same Error rows then Delete them



Step 5:
 - Execute again the “Test-SPContentDatabase” to check that all entries for the MissingWebPart are gone.


Thanks all folks

User credential issue in SharePoint Site

Hi all,

Today, I'll talk about an strange SharePoint issue, but it's not an issue from SharePoint.

It's a client side issue.


Facts:
 - User is Site Collection Administrator
 - User gets popup to enter his login/password (credentials) when accessing to his SharePoint Site
 - Login & Password are correct
 - Login to his SharePoint site from another computer is working (this is the first test I've asked the user to do and provide me his feedback)


Solution: Check the user credentials on your computer:

 - Click on Start
 - Control Panel
 - User Account
 - Credential Manager
 - Remove from Vault all references to SharePoint sites


Possible reason:
 As company policy, we must change our password several times per year.
 I bet that Windows kept (for this user) his old password in cache, thus replacing automatically his credentials by the one stored in the Credential Manager.



That's all folks

How to : Add new file type in SharePoint 2010

Hi all,

Today’s task is to add a new managed file type.
The file type is .dmmx from Dropmind.

To achieve this request, I’m following the blog page of Romain K.


Step 1 : Assign an icon to the document in SharePoint

  1. Find a png image of the icon of 16 x 16 pixel with transparency : 
  2. Copy this .png file to your Hive14 folder : ..\14\Template\Images\dropmind.png
  3. Register the picture in the ..14\Template\xml\DOCICON.XML file
        In the section <ByExtension>, add:
                <Mapping Key="dmmx" Value="dropmind.png" />

  4. Save the file and test the upload of a .dmmx file:



Step 2 : Declare document mime type as “downloadable” in IIS

  1. Open IIS Console, and browse to your Web Application


  2. Double click on the “Mime Types” menu of the selected Web Application (because I only allow this type of files on a specific Web App)



  3. In the “Action Pane”, top right of the IIS Console, click on the “Add…” button
  4. Declare the custome Mime Type:



  5. Via PowerShell, let’s declare the Mime Type as “Downloadable”:

          $web = Get-SpWebApplication -Identity <WebApplication>
          $web.AllowedInlineDownloadedMimeTypes.Add("application/vnd.dropmind")
          $web.Update()


  6. Now, I’m able to download the file from my SharePoint Site:




Thank's all folks


How to retrieve lost WSP package to prepare the SharePoint migration

Hi All,

In order to prepare the migration of our SharePoint 2010 Farm to SharePoint 2013 Farm, I discover that old wsp packages were still present on the content databases.

Some of them are “relics” from SharePoint 2007 …


Of course, it is not possible to find where those wsp files are stored, and the old SharePoint 2007 servers are removed from the network since several years…


First, I started to enumerate the deployed solutions via PowerShell:

Cmdlet used:
Get-SPSolution | ? { $_.Deployed } | % { $_.DisplayName}

As output, I had this list:

mycompany.customertemplate.wsp
mycompany.mysite.branding.wsp
mycompany.po.projectsitedefinition.v1.2.0.wsp
ev_sharepointwebpartscab.cab
extendeddiagnosticproviders.wsp
sharepointsocialnetworking.wsp


Then, I’ve executed the next code to iterate the solutions collection and to retrieve all missing .wsp, using my previous list:

Add-PSSnapin Microsoft.SharePoint.PowerShell

$farm = Get-SPFarm
$file = $farm.Solutions.Item("<YourSolutionFile>.wsp").SolutionFile
$file.SaveAs("D:\temp\<YourSolutionFile>.wsp")


i.e:
$farm = Get-SPFarm
$file = $farm.Solutions.Item("mycompany.customertemplate.wsp").SolutionFile
$file.SaveAs("D:\temp\mycompany.customertemplate.wsp")


Now, I can yuse those .wsp, in my SharePoint 2010 test-farm.
I'll then prepare the databases by cleaning them from the old useless solutions.




That’s all Folks,



Marc



***** Disclaimer *****
http://www.belgacom.be/maildisclaimer