Tuesday, 18 June 2013

Event ID: 7362: The super user account utilized by the cache is not configured

Event ID: 7362: The super user account utilized by the cache is not configured


Hi all,

Today, I’ll explain how I solve the Event ID 7362 concerning the Publishing Cache.
I made a copy/paste of the used explanation from Stephan Albert Bren blogspot.
On his page, there is the stsadm version that I didn’t used, because I prefer to use PowerShell version.
Also, check the references at the bottom of his post, referring to Microsoft TechNet and other blogs.

Big thanks to Stephan for his clear explanation of the root cause of this event ID.




Problem

The following error appears in the Windows Application event log:

 

















Solution

On new installations, the SharePoint super user account is configured to run under the machine's local System account.  However, this causes complications and thus the warning.  This should be addressed during setup, but isn't included in the setup wizard. 



Step 1: Create Super User and Super Reader Domain Accounts

Create super user and super reader domain accounts



Step 2: SQL Database access rights

Make sure these accounts have similar access to all SharePoint databases.

Script to use for each Content Database:

SQL Script 1 for adding the Super User account as db_owner:


 










SQL Script 2 for adding the Super Reader account as db_reader:




 Step3: Configure Accounts in SharePoint Central Administration

Go to your SharePoint CA GUI:
Central Admin -> Manage Web Application -> User Policy

Add DOMAIN\super_user           – Full Control
Add DOMAIN\super_reader        – Full Read



Step 3: Using SharePoint Management Shell

Open a SharePoint PowerShell

Execute the following commands:

$w = Get-SPWebApplication -Identity
http://[webappurl/]
$w.Properties["portalsuperuseraccount"] = “DOMAIN\super_user”
$w.Properties["portalsuperreaderaccount"] = “DOMAIN\super_reader”
$w.Update()

Close the shell

 





Step 4: Reset IIS

Step 5: Verification

Open a SharePoint PowerShell

Execute the following:

 


 Output should read:
 




Important Note :
Please do the mentioned steps when adding a new Web Application in Application and/or Collaboration Farm.




Job’s done.

Thursday, 16 May 2013

How to restore the "default.aspx" in SharePoint Designer 2010

Hi all,

Today, I got a ticket concerning the fact that the “default.aspx” was deleted in a Site Collection.


My first question was “How did they achieve this?”, because they cannot delete system files, as SharePoint Designer 2010 access is limited at the Web Application level:



So, I had to open the Site Collection in SharePoint Designer 2010 with full access to be able to view all files.

To do this, I’ve allowed the Web Application option : “Allow Site Collection Administrators to see the URL Structure of their Web Site”
Then, I’ve opened the Site Collection in SharePoint Designer 2010, and set back the options in “SharePoint Designer Settings” as our default settings. (this, to avoid other clients to open their site in SharePoint Designer 2010 and letting them braking their site)

In SPD2010 (SharePoint Designer 2010), the “default.aspx” was missing.
But, I saw the file “Organogram.pptx” with the blue icon.
Checking it’s properties gave me the satisfaction that the “default.aspx” was overwritten by the .pptx, but was still known by SharePoint as the “default.aspx” file.





So, I decided to do a “Reset to Site Definition” of this file :



The .pptx file was “cleaned” (check it’s size), and the original faulty .pptx is now set as a copy, and not simply deleted:



Thus, I’ve renamed the “clean” .pptx into “default.aspx



A page refresh, and the client site is now up’n running again:



Job's done.

Wednesday, 15 May 2013

How to Restore a Deleted Site Collection in SharePoint 2010

Hi all,

Today, I was asked to restore deleted files from a deleted Site Collection in our production farm.

As usual, when I receive this kind of request (recover deleted files) , the procedure is:

-          - Ask SQL Team to restore the DB from the day before deletion
-          - Mount the DB in a  specific Web Application
-          - Set the restored DB as “Offline” in Central Administration
-          - Go to the site and export the deleted files to the client’s SharePoint Site
-          - Remove the restored DB from the Web Application
-          - Delete the DB from SQL


The SQL Corporate rules concerning the backup retention time is 14 days.

But this time, the site was deleted for 16 days, so out of the backup retention time…
No restore available.


Then, I remember that the production DB are keeping the deleted Site Collections for 30 days !!!
Thus I will be able to restore the deleted Site Collection, and my client will be happy to recover all missing files.

Steps to follow are:

-          Get-SPDeletedSite : this will give the list of all deleted Sites Collection in the Farm


In the red box, I can find the Path and the Deletion Time, that match with the info given by the client.

-          I will then restore the Site Collection with the following cmd :
Restore-SPDeletedSite –Identity “/Sites/CD10000059”
               
                /!\ A Site Collection must not already exist at the URL location to perform a restore /!\


Voilà, the site is now restored from the DB’s recycle bin.


That’s all folks


Monday, 6 May 2013

How to Delete a corrupt file entry in SQL DB

Hi All,

Today, I’ll explain the way I found to clear a file issue in one of the SharePoint 2010 site.
File is visible in the AllDocs list, but not available even when opening the Library with the “Open with Explorer”  ribbon option.

The faulty file the file name mentioned in the red box hereunder, and it’s extension is .xmind (event if the icon is a pdf).

So, all the site is working like a charm, without any error.



When trying to open the file, or making any change to it via the drop-down menu of the file, I got the http 500 error :




First, I made a –databaserepair to find the corruption, and try to fix it with the –deletecorruption parameter : didn’t help.

PS C:\Users\sharepoint_install> stsadm.exe -o databaserepair -url http://<siteURL>/Sites/SiteName -databasename Sharepoint_Content_shpDBName_RestoreFromProductionForTest

<OrphanedObjects Count="2">
  <Orphan Type="SecurityScope" SiteId="{69446A31-82A4-481E-9889-4661A810AD16}" Name="Sites/SiteName/Lists/ProjectDocuments /P131070_SmartMonitoring_WBS.xmind" InRecycleBin="No" />
  <Orphan Type="SecurityScope" SiteId="{96A99C51-C636-4593-BF9C-ED610ACA4743}" Name="Sites/SiteName/Lists/ProjectDocuments /P131063_Project_Definition_One Number_draft v0.1.docm" InRecycleBin="No" />
</OrphanedObjects>

PS C:\Users\ sharepoint_install> stsadm.exe -o databaserepair -url http://<siteURL>/Sites/ SiteName -databasename Sharepoint_Content_shpDBName_RestoreFromProductionForTest

Violation of PRIMARY KEY constraint 'Perms_PK'. Cannot insert duplicate key in object 'dbo.Perms'. The duplicate key value is (96a99c51-c636
-4593-bf9c-ed610aca4743, 0x, Sites/SiteName/Lists/ProjectDocuments/P131063_Project_Definition_One Number_draft v0.1.docm).
The statement has been terminated.



Then, I decide to open SQL, and start finding the document entries.
Of course, there is no clear post/site/info showing all the tables to check.

I found 2 tables :
-          AllDocs
-          AllDocStreams


First things first :

1.       Find the file in the AllDocs table and grab the Id entry

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT *
  FROM [Sharepoint_Content_shpDBName_RestoreFromProductionForTest].[dbo].[AllDocs]
  WHERE [DirName] like 'Sites/SiteName/Lists/ProjectDocuments'
/**********************************************************/


The result is :


So, I have the unique Id, and looking at the column named “DocLib RowId” let me do a double-check that the file is the correct item to delete (check the ID row in the List from the first screen).


2.       Find the same Id entry in the AllDocStreams table

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT [Id]
      ,[SiteId]
      ,[Content]
      ,[RbsId]
      ,[InternalVersion]
FROM [Sharepoint_Content_shpDBName_RestoreFromProductionForTest].[dbo].[AllDocStreams]
WHERE [Id]='DEF629C6-3A40-473A-BDD5-BB295E9E1AB1'
/**********************************************************/




3.       Delete both entries in the SQL DB :

/****** Script for SelectTopNRows command from SSMS  ******/
DELETE
  FROM [Sharepoint_Content_shpDBName_RestoreFromProductionForTest].[dbo].[AllDocStreams]
  WHERE [Id]='DEF629C6-3A40-473A-BDD5-BB295E9E1AB1'
/**********************************************************/

Result : (1 row(s) affected)



/****** Script for SelectTopNRows command from SSMS  ******/
DELETE
FROM [Sharepoint_Content_shpDBName_RestoreFromProductionForTest].[dbo].[AllDocs]
where [Id]='DEF629C6-3A40-473A-BDD5-BB295E9E1AB1'
/**********************************************************/

Result : (1 row(s) affected)


4.       Test that the file is no more listed in the Site:

Voilà, my test in the UAT farm is successful, I’ll do the changes into the Production environment.


That’s all Folks.


nb: change done with success in production.


Tuesday, 15 January 2013

Issue with SharePoint 2010 Farm Update

Hi all,

Today, I’m taking the time to solve my “Upgrade Available” issue in my production farm.

Last time, I’ve noticed that, after successfully upgraded my production farm, the status went back to “Upgrade Available” after being successful.
So, the binaries are 14.0.6117.5002


The status is now as on this screen below :

I know that I have 2 sites that gave me errors when upgrading my farm, but I used a workaround to be able to apply the Feb 2012 CU :
Backup/Delete/Restore of both faulty sites.

Step 1: let’s list the DB where are located those 2 sites

Central Administration => Upgrade and Patch Management => Review database status:



I google about this status “Database is up to date, but some sites are not completely upgraded”, and fount this link where I found 2 powershell lines to execute:

$DB = Get-SPContentDatabase -Identity DB_NAME
Upgrade-SPContentDatabase -id $DB

This must be done for each DB after having fixed the error.

To be honest, I used this Upgrade-SPContentDatabase command to check the resulting error log, and find the site, and the error type.

Step 2 : let’s check the error log and find the direction to look



Opening the “Upgrade-20130115-094410-390.log, then finding the first [ERROR] entry show this :


[powershell] [V2VRecordCenterUpgradeSiteAction (13.0.2.0)] [ERROR] [15/01/2013 09:44:14]: Failed to run V2VRecordCenterUpgradeSiteAction.Upgrade for SPWeb (http://shpteam.xxxxxxxx/sites/TTeamSite/backoffice), the following error occured:The specified name is already in use.

Please try again with a new name. at:   at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
   at Microsoft.SharePoint.Library.SPRequest.AddGroup(String bstrUrl, String bstrName, String bstrDescription, Int32 lOwnerID, Boolean bOwnerIsUser, UInt64 iPermMask, Int32 lUserId, Boolean bUseExisting, Boolean bSelfOwner)
   at Microsoft.SharePoint.SPGroupCollection.AddInternal(String name, SPMember owner, SPUser defaultUser, String description)
   at Microsoft.SharePoint.SPGroupCollection.Add(String name, SPMember owner, SPUser defaultUser, String description)
   at Microsoft.SharePoint.Utilities.SPUtilityInternal.CreateDefaultSharePointGroups(SPWeb web, String strUserLogin, String strUserLogin2, String strGroupNameSeed)
   at Microsoft.Office.RecordsManagement.Internal.DocumentRoutingFeatureReceiver.<>c__DisplayClass2.<FeatureActivated>b__0()
   at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code)
   at Microsoft.Office.RecordsManagement.Internal.DocumentRoutingFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties)
   at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)
   at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
   at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)
   at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)
   at Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId)
   at Microsoft.Office.Server.Upgrade.SiteAction.ActivateFeature(SPFeatureCollection features, Guid featureGuid, String featureScope, Boolean force)
   at Microsoft.Office.Server.Upgrade.SiteAction.ActivateFeatures(SPFeatureCollection features, Guid[] featureGuids, String featureScope)
   at Microsoft.Office.Server.DLC.Upgrade.V2VRecordCenterUpgradeSiteAction.UpgradeWeb(SPWeb web)


So, I had to go to the site, and I was not able to find the name that was already in use….

I google again , and find a post of Gayan Peiris with this little explanation :


In my case, the duplicate name was “Back Office”.

But, I was able to find only 1 “Back Office” site, the site mentioned into the error log.

Then, I decide to go to the root URL of this site “http://shpTeam.xxxxxxx/sites/TTeamSite”
I found then, that the mentioned “Back Office” name was a sub site of TTeamSite.

And, another “Back Office” site was already created, but with the “bo” name instead of “Back Office”.

Both sub sites had the same name, and this was the root cause of the issue.

I deleted the “Back Office” sub site, and got this situation:
  "Back Office" name is now used once.

Then, I’ve executed again the Upgrade-SPContentDatabase command, I my DB was successfully upgraded.

Now, here is the situation :

Step 3 : do the same steps as beginning, and solve the issue following the given error message in the log.

This is the error lines found on the log :
[powershell] [SPSiteWssSequence2] [ERROR] [15/01/2013 10:46:03]: Feature upgrade incomplete for Feature 'PublishingWeb' (Id: '94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb') in Web 'http://shpworkgroup.xxxxxx/sites/WWorkgroup'. Exception: Provisioning did not succeed. Details: Failed to provision role definitions. OriginalException: Value does not fall within the expected range.  (Inner Exception: Value does not fall within the expected range.)
[powershell] [SPSiteWssSequence2] [ERROR] [15/01/2013 10:46:03]: Feature upgrade incomplete for Feature 'PublishingWeb' (Id: '94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb') in Web 'http://shpworkgroup.xxxxxx/sites/WWorkgroup'. Exception: Dependency feature 'PublishingSite' (id: f6924d36-2fa8-4f0b-b16d-06b7250180fa) for feature 'PublishingWeb' (id: 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb) is not activated at this scope.

So, I activate the features for this site :

stsadm -o activatefeature -filename publishingSite\feature.xml -url http://shpworkgroup.xxxxxx/sites/WWorkgroup -force
stsadm -o activatefeature -filename publishingWeb\feature.xml -url http://shpworkgroup.xxxxxx/sites/WWorkgroup -force



Then, let’s upgrade again the DB :

$DB = Get-SPContentDatabase -Identity DB_NAME
Upgrade-SPContentDatabase -id $DB

Looks nicer :





But, unfortunately, the status is still the same :



Checking the upgrade status via the stsadm command :
stsadm.exe -o localupgradestatus


So, all seems ok, except the CADM page.

Let’s recycle IIS :

Check the CADM page :

Voilà !

I can now plan the next step : run the SharePoint Products Configuration Wizard.


Job’s done.


Friday, 9 November 2012

How to solve CU Update issues : the return

Hi all,

Today, I applied the August 2012 CU on your UAT Collaboration Farm.
This farm is populated by 4 servers.

Installing binaries was done without any issue.
Execution of the “SharePoint 2010 Product Configuration Wizard” was done with several issues.
I used my previous post “How to Apply Cumulative Updates and Avoid Issues” to have the process and most solutions in my hands.
But each upgrade is different of the other.

The main issue came from one server, that gave the impression that it’s registry lost the fact that SharePoint 2010 was already installed.
To solve this issue, I had to execute the following command :
                Get-SPProduct –local

Then, a click on the Refresh button of the “Product Configuration Wizard” let me to start the upgrade.


Then, I had all four servers status in “Upgrade Available” mode in Central Administration.

So, I execute the psconfig cmdlet :
                Psconfig –cmd upgrade –inplace b2b –wait

Directly, I had errors and the upgrade failed.

So, opening the created log files like “Upgrade-20121109-xxxxxx-xxx.log” point me out serveral sites to correct.
As I’m working on our test environment, I decided to simply delete the faulty sites.
Some were backed-up, as I need to restore one of them.

Then, the psconfig worked fine for 3 out of 4 servers… Ugh!

What’s wrong with this last server?
It was like the upgrade process was already running on this server…
Check in the server process list, and I didn’t found any running process.



So, I googled on the Microsoft.SharePoint.Administration.SPUpgradeConcurrencyException, and found SharePointGeoff site.
Nearly same type of error, and a 4-steps solution:

1.       Stsadm –o setproperty –pn command-line-upgrade-running –pv No
2.       IISReset
3.       Restart the "SharePoint 2010 Timer" Service
4.       Psconfig –cmd upgrade –inplace b2b –wait –force


Then, now, all my servers of this farm have the status : “No Action Required”.


Job’s done.



Friday, 26 October 2012

Microsoft Certification : MCITP SharePoint Administratior 2010

Voilà,

Last month (September 28th 2012), I pass the MS 70-668 exam.
Last Wednesday (October 24th 2012), I pass the MS 70-667 exam.

And this morning, I got my Microsoft Certified IT Professional certification written in my Transcript.


I'm very glad to pass those 2 exams.




That's all folks.