Access Denied! Only site admin can access Data Source object from user profile DB.

Read to fix the problem below.

Event ID 7888

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server General
Event ID: 7888

Description: A runtime exception was detected. Details follow.

Message: Access Denied! Only site admin can access Data Source object from user profile DB.

Technical Details:
System.UnauthorizedAccessException: Access Denied! Only site admin can access Data Source object from user profile DB.
at Microsoft.Office.Server.UserProfiles.SRPSite.AdminCheck(String message)
at Microsoft.Office.Server.UserProfiles.DataSource._LoadDataSourceDef(IDataRecord rec)
at Microsoft.Office.Server.UserProfiles.DataSource._LoadDataSourceDef(String strDSName)
at Microsoft.Office.Server.UserProfiles.DataSource..ctor(SRPSite site, Boolean fAllowEveryoneRead)
at Microsoft.Office.Server.UserProfiles.DataSource..ctor(SRPSite site)
at Microsoft.Office.Server.UserProfiles.UserProfileConfigManager.GetDataSource()
at Microsoft.Office.Server.UserProfiles.BDCConnector.RefreshConfiguration(String sspName)

#MOSS 2007 Farm Restore (flag new) SSP login bug

I  had several MOSS 2007 Farm restorations in my test environments. Each time after a restoration SharePoint’CPU goes up to 100% and a lot of errors (6483, 6398, 7076) appear in the Application event log.

The Execute method of job definition
(ID 538459ed-46a7-47e5-ba80-2a7120c36336) threw an exception.
More information is included below.
Value cannot be null.
Parameter name: userName

It looks like it is the SharePoint Farm restoration process bug. This restoration does not restore ProcessIdenty information for SharedServices provider.

Run the following command, to be sure that we are talking about the same issue: stsadm -o execadmsvcjobs

It should fail.

Run the folowing command after restoration, to fix your farm :

stsadm -o editssp -title SharedServices1 -ssplogin “NT AUTHORITY\NETWORK SERVICE”


stsadm -o editssp -title SharedServices1 -ssplogin “DOMAIN\ACCOUNT” -ssppassword ****

First command is suitable for the SingleServer installation.

Run the following command, to be sure that we have fixed the issue:   stsadm -o execadmsvcjobs

It should succeed.

#PowerShell Timing How Long it Takes a Script to Run

If you’ve ever wondered how long it takes to perform a specific task then the Measure-Command cmdlet is exactly what you’ve been looking for: it enables you to measure the running time of a command or script down to the millisecond.

Measure-Command {Get-Service | Export-Clixml c:\scripts\test.xml}

When you run this command, service information will be saved to the file Test.xml; in addition, Measure-Command will report back information similar to this:
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 971
Ticks             : 9717422
TotalDays         : 1.12470162037037E-05
TotalHours        : 0.000269928388888889
TotalMinutes      : 0.0161957033333333
TotalSeconds      : 0.9717422
TotalMilliseconds : 971.7422

Acceptance Test Rule #1

Implementation/Script of the Acceptance Test (AT) should not rely on a particular Virtualization Technology!

It is simple to understand that AT should be easy pointed to a different Virtual Machine. Also you should have an ability to switch between Virtualization Technologies (e.g. VMWare ESXi, MSFT Hyper-V) w/o changing AT’s implementation/Script.

#PowerShell#SharePoint HOWTO reassociate the service applications with the default proxy group

It looks like a bug in SharePoint 2010. After the restore happens you must start the services on the proper servers in the farm and you must also reassociate the service applications with a proxy group (usually default proxy group).

Get-SPServiceApplicationProxy | % {Add-SPServiceApplicationProxyGroupMember (Get-SPServiceApplicationProxyGroup -default) -Member $_}