Getting Last Accessed user for a SharePoint Site

Assume that you would like to get last accessed users for a specific site or web in SharePoint. The correct approch is creating a custom IIS Module to get update statistics by every request. If you dont want to do that there you may alternatively use following method.

But we have some conditions:
1) Usage and Health Data Collection Service Application is running.
2) And Microsoft SharePoint Foundation Usage Data Import job running in a small interval (one hour maybe). (Because the data first stores in a Usage file in file System and when the timer job has been executed that data transfered to you Logging Database) Thats mean it is not real time. (If you would like a statistics in real time i suggest that use a custom IIS module)

Than you can search the last 5 accessed user from SQL Server Management Studio by quering Logging Database Server (It would be delayed by interval of Import Timer Job)

Declare @serUrl as nvarchar(MAX), @sitUrl as nvarchar(MAX) , @wUrl as nvarchar(MAX)
Declare webcursor CURSOR FOR select serverurl,siteurl,weburl from RequestUsage group by ServerUrl,SiteUrl,WebUrl
Open webcursor

FETCH NEXT FROM webcursor INTO @serUrl,@sitUrl,@wUrl
WHILE @@FETCH_STATUS = 0 
BEGIN
PRint 'ServerUrl: ' + @serUrl + ' Site Url:' + @sitUrl +  ' Web Url:' + @wUrl
select Top 5 LogTime, UserLogin,ServerUrl,SiteUrl,WebUrl from RequestUsage 
where ServerUrl = @serUrl and SiteUrl = @sitUrl and WebUrl =  @wUrl
--Dont Forget to Exclude SharePoint\system , Central Administration Web Site, Crawler Account, And Timer Service Account for correct results.
and ServerUrl <> 'http://contoso.com:32843'  and UserLogin <> 'SHAREPOINT\system' and UserLogin<> 'Contoso\Crawler'
order by LogTime desc 
FETCH NEXT FROM webcursor INTO @serUrl,@sitUrl,@wUrl
END
CLOSE webcursor
DEALLOCATE webcursor
Advertisement

The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service

First check that the state service Application has started and State Service Application Proxy has been assigned to your web Application ;

Open your Central Administration
Go to Application Management
Under Service Applications click Configure service application associations
Click on the Application Service Proxy Group of the WebApplication you’re trying your workflow on
Find State Service Application and make it checked .

If you dont have State Service Application you can create a new one by below;

1. Click and lunch  Start->All Programs -> Microsoft SharePoint 2010 Products->  SharePoint 2010 Management Shell .
2. In Windows PowerShell, type $stateapp= New-SPStateServiceApplication -Name “State Service Application”
3. Create a State Service database and associate it with a service application, by typing New-SPStateServiceDatabase -Name “StateServiceDatabase” -ServiceApplication $stateapp
4. Create a State Service Application Proxy and associate it with the service application by typing New-SPStateServiceApplicationProxy -Name “State Service Application Proxy” -ServiceApplication $stateapp -DefaultProxyGroup

http://technet.microsoft.com/en-us/library/ee704548(v=office.14).aspx

 

 

Error 7043 “Load control template file /_controltemplates/TaxonomyPicker.ascx failed”

For fixing annoying TaxonomyPicker error :
http://support.microsoft.com/kb/2481844

Moss2007 “send email when ownership is assigned” option is missing” (tips&tricks)

Check your outgoing email settings has been set from Central Administration-> Operations -> Outgoing Mails .

 

Which version of SharePoint supports Microsoft SQL Server 2012

Only SharePoint 2010 SP1 (14.0.6029) and higher versions supports Microsoft SQL Server 2012 . Currently for MOSS2007 or WSS3.0 is not supported.
http://support.microsoft.com/kb/2460045