Enable Desktop Experience on Servers to Access SharePoint Web Folders

All of us like to access our files like a network drive, and drag and drop and mapping this drive to windows explorer or write/upload to SharePoint using scripts.

In order to access SharePoint like a network drive we need to enable a windows feature on our OS which is called “Desktop Experience” which include a webDAV client which is required to open SharePoint documents as a folder on our machine. On most windows desktop OS it is by default enabled, but on servers we need to enable this feature.

If you see the below image, you can notice that if you click on “Open with Explorer” you may get this error.

The Solution is very simple on to enable this on Windows servers (2008/2012 servers)

  1.  Open Powershell command prompt
  2. Type “Import-Module ServerManager” without Quotes and execute it(enter)
  3. Next you need to execute “Add-Windowsfeature Desktop-Experience” this will install the necessary feature
  4. Or you can create a powershell file with the above two commands and execute that file in powershell window like below.

After the server restart you can open the sharepoint files as a web folders:

Recover Sharepoint 2013 databases from suspect mode.

This Post courtesy to: 
Original Post from: Blogs.cloudshare.com

I restarted my SharePoint server, opened Central Administration and encountered the following error:
Server Error in ‘/’ Application
Runtime Error
Description: An application error occurred on the server.
01 - SharePoint 2013 Server Error in Application
In order to troubleshoot this issue I had to check couple of thing:

  • Make sure SQL Server services are up and running
  • Make sure the IIS application pools are started
  • Review Windows logs and gather more information about the server. I noticed the following event:

SQL Database ‘SharePoint_Config’ on SQL Server instance ‘C4968397007′ not found. Additional error information from SQL Server is included below.
Cannot open database “SharePoint_Config” requested by the login. The login failed. Login failed for user ‘DC07\SQLSvc’.

02.1 - Windows logs
This event made me suspect something is wrong with my SQL Server. I opened SQL Server management studio and noticed that some of my most critical SharePoint databases are not accessible and set to suspect mode. 02 - SharePoint 2013 databases are in Suspect mode
What is a suspect mode in SQL Server database?
Suspect mode might be caused by many reasons like unavailable or corrupted database files, hardware failure etc.
Don’t worry! This situation is reversible.
Here’s a quick guide of how to recover your SharePoint databases from suspect mode:
Open your SQL Server management studio and execute the following queries one after another:

  • Run the following query. sp_resetstatus command will turn off suspect flag on the database.

EXEC sp_resetstatus ‘SharePoint_Config’;

After executing this query you’ll see the following warning. Don’t worry, this doesn’t mean you did something wrong.
04 - SQL Server reset status of database warning

  • The next step is to set the database to an Emergency mode. This can be done by executing following query:

ALTER DATABASE SharePoint_Config SET EMERGENCY

After executing this query your database should look like this:
06 - SharePoint_config database is set to emergency mode
Once we set the database to an Emergency mode it temporarily becomes a Read Only database.

  • Execute the following query in order to check the logical and physical integrity of the objects in the database.

DBCC checkdb(‘SharePoint_Config’)

  • To complete the process, run the following queries:

ALTER DATABASE
SharePoint_Config SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘SharePoint_Config’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE SharePoint_Config SET MULTI_USER
DBCC CheckDB (‘SharePoint_Config’)

Repeat this action for each one of the affected databases.
09 - Everything is back to track
I ran some basic tests to make sure my SharePoint server is working properly again, looks like everything is back to track.

January 29th, 2013 | Author:  | Filed under: CloudShareDev / TestSharePoint | Tags:  

Tools to Analyzing Perfmon logs


               Now that we talked about perfmon counters for SharePoint and project server in the last post, the other challenging task after collecting these counters was to analyze this data and make out some sense out of those huge log file.  There may be different ways analyze them by applying knowledge gained experience of such incidents, but not all the time we can rely on that when the counters are in large in number. The standard Perfmon interface tends to be messy when many counters are involved.

I have two recommendations:

1.      Manual PerfMon Analysis Workbook   — When you want a tool that would give you quick overview of the server without having to delve through a thick report or through a cluttered perfmon diagram with lots of counters. 

2.      PAL  –  Performance Analysis of Logs (PAL) Tool  – A proper tool which prepares a beautiful report and graphs based on the counters and it also needs a threshold file for the counter/application we need detailed analysis.

This tool is all you need to complete your analysis. While you are looking to analyze SharePoint Counters and see how your server fares to the best practice results or a standard expected results of a well performing one, you need to feed the threshold file for SharePoint and the dependent threshold files as well, like for SharePoint server you may need a system overview, IIS, SQL thresholds as well as the counters we normally monitor for SharePoint server will also include IIS, process and system hardware related.
You can get a clue by looking at the sample report which this tool prepares at this URL
Manual PerfMon Analysis Workbook – You get detailed and latest update by visiting codeplex link provided above.

This tool  gives you an overview over lots of counters that are collected using perfmon. This release is workable. Too upload the data to the workbook: read the manual below:
Manual Perfmon Analysis Workbook.docx

Perfmon Counter Templates – SharePoint Server, Project Server and SQL Server

               When we run into issues and need further investigation to troubleshoot the root cause we look up to getting Servers and Database statistics. Always I look forward to gather as much data from Performance Counters. These counters are specific to application and Operating system and as a SharePoint Admins we need to gather data which makes sense and the following counters had been very helpful for up in such instances.
Every Situation is different and we need to add counters which are necessary and apt for that situation and below are one which I use most of the time for SharePoint and Project Server and while working with Microsoft we got these templates to collect the counters. I also uploaded these templates which you can download at:
SharePoint Server and Project Server Counters:

\Processor(*)\% Processor Time
\Network Interface(*)\Bytes Total/sec
\Network Interface(*)\Current Bandwidth
\System\Processor Queue Length
\Processor(*)\% Privileged Time
\PhysicalDisk(*)\Avg. Disk sec/Read
\PhysicalDisk(*)\Avg. Disk sec/Write
\LogicalDisk(*)\Avg. Disk sec/Read
\LogicalDisk(*)\Avg. Disk sec/Write
\Memory\Free System Page Table Entries
\Memory\Pool Nonpaged Bytes
\Memory\Pool Paged Bytes
\Memory\Available MBytes
\Memory\Pages/sec
\Network Interface(*)\Output Queue Length
\Processor(_Total)\% Processor Time
\Processor(_Total)\% Privileged Time
\System\Context Switches/sec
\Process(*)\Private Bytes
\Process(*)\Handle Count
\Process(*)\Thread Count
\Process(*)\% Processor Time
\Process(*)\Virtual Bytes
\LogicalDisk(C:)\Free Megabytes
\Processor(*)\% Interrupt Time
\Process(*)\Working Set
\Memory\System Cache Resident Bytes
\Process(*)\IO Data Operations/sec
\Process(*)\IO Other Operations/sec
\LogicalDisk(*)\Disk Transfers/sec
\Memory\Pages Input/sec
\Paging File(*)\% Usage
\Paging File(*)\% Usage Peak
\ASP.NET Apps v2.0.50727(*)\Request Execution Time
\ASP.NET Apps v2.0.50727(*)\Requests/Sec
\ASP.NET Apps v2.0.50727(*)\Requests In Application Queue
\ASP.NET(*)\Worker Process Restarts
\SQLServer:Locks(*)\Average Wait Time (ms)
\SQLServer:Locks(*)\Number of Deadlocks/sec
\SQLServer:Access Methods(*)\Full Scans/sec
\SQLServer:General Statistics(*)\User Connections
\SQLServer:Cache Manager(*)\Cache Hit Ratio
\SharePoint Publishing Cache(*)\Publishing cache flushes / second
\SharePoint Publishing Cache(*)\Publishing cache hit ratio
\SharePoint Publishing Cache(*)\Publishing cache misses / sec
\SharePoint Foundation(*)\Sql Query Executing time
\SharePoint Foundation(*)\Executing Sql Queries
\SharePoint Foundation(*)\Responded Page Requests Rate
\SharePoint Foundation(*)\Executing Time/Page Request
\SharePoint Foundation(*)\Current Page Requests
\SharePoint Foundation(*)\Reject Page Requests Rate
\SharePoint Foundation(*)\Incoming Page Requests Rate
\SharePoint Foundation(*)\Active Threads
\.NET CLR Exceptions(*)\# of Exceps Thrown / sec
\Web Service(_Total)\Connection Attempts/sec
\.NET CLR Loading(*)\Current appdomains
\ASP.NET Applications(*)\Request Execution Time
\ASP.NET Applications(*)\Requests Queued
\.NET CLR Memory(*)\# Bytes in all Heaps
\ASP.NET Applications(*)\Application Restarts
\Memory\Committed Bytes
\Memory\Commit Limit
\Memory\% Committed Bytes In Use

SQL Server Perfmon Counters Template:

\LogicalDisk(*)\*
\Memory\*
\Network Interface(*)\*
\Paging File(*)\*
\PhysicalDisk(*)\*
\Process(*)\*
\Processor(*)\*
\SQLServer:Access Methods\*
\SQLServer:Backup Device(*)\*
\SQLServer:Broker Activation(*)\*
\SQLServer:Broker Statistics\*
\SQLServer:Broker/DBM Transport\*
\SQLServer:Buffer Manager\*
\SQLServer:Buffer Node(*)\*
\SQLServer:Buffer Partition(*)\*
\SQLServer:Catalog Metadata(*)\*
\SQLServer:CLR\*
\SQLServer:Cursor Manager by Type(*)\*
\SQLServer:Cursor Manager Total\*
\SQLServer:Databases(*)\*
\SQLServer:Database Mirroring(*)\*
\SQLServer:Exec Statistics(*)\*
\SQLServer:General Statistics\*
\SQLServer:Latches\*
\SQLServer:Locks(*)\*
\SQLServer:Memory Manager\*
\SQLServer:Plan Cache(*)\*
\SQLServer:Replication Agents(*)\*
\SQLServer:Replication Dist(*)\*
\SQLServer:Replication Logreader(*)\*
\SQLServer:Replication Snapshot(*)\*
\SQLServer:Replication Merge(*)\*
\SQLServer:SQL Errors(*)\*
\SQLServer:SQL Statistics\*
\SQLServer:Transactions\*
\SQLServer:User Settable(*)\*
\SQLServer:Wait Statistics(*)\*
\System\*
\Thread(*)\*