Thursday, January 31, 2013

Enabling and Using Developer Dashboard - Sharepoint 2010

Today I was working with one Client who was having some issues with performance . In Sharepoint 2010 . I found a Out of box Feature which helps in monitoring the performance of the site Developer Dashboard.

The Developer Dashboard is an instrumentation framework introduced in Microsoft SharePoint Foundation 2010. Similar in concept to ASP.NET page tracing, it provides diagnostic information that can help a developer or system administrator troubleshoot problems with page components that would otherwise be very difficult to isolate.

For example, a developer can easily introduce extra SPSite or SPWeb objects into his or her code unknowingly or add extraneous SQL Server queries.

In the past, the only way to debug performance problems caused by the extra overhead of these instances in code would be to attach a debugger to the code and monitor SQL Server Profiler traces. With the Developer Dashboard, a developer can identify this type of problem, either programmatically by using the object model or visually by looking at page output.

Although performance issues and resource usage information is available in the Unified Logging Service (ULS) logs, interpreting the raw data can be very time consuming. With the Developer Dashboard, all the related information is correlated, which makes identifying these types of issues much easier.

How to enable Developer Dashboard and how to use this?

Enable / Disable over stsadm:

stsadm -o getproperty -pn developer-dashboard



stsadm –o setproperty –pn developer-dashboard –pv “On”





Enable / Disable over powershell

Turn On: for onDemain Mode
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$addsetting.Update()


Turn On
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
$addsetting.Update()


Turn Off
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$addsetting.Update()
 


On – Displays the output all the time at the end of the page content
Off – Switch off Developer Dashboard and nothing is rendered
OnDemand – Displays a DeveloperDashboard icon to make dashboard output visible if needed.

In ON Demand - you will see a icon on the top right hand side corner of the site . as Shown below .



also you will see the following details when you click on the icon .



How to use the Developer Dashboard?
Developer dashboard is designed to find performance bottleneck during the page load.
To get an overview about the whole page load performance take a look in the upper right side  on category “web server”. On my test environment the total time of page rendering  is 3801.71 milli seconds.





At the left side you will see the ASP.NET rendering process of all involved controls with their time to render. Here is makes sense to focus only on long running controls.






In this case the longest operation is GetWebPartPageContent (1815.92 ms)

Because sharepoint controls will request data from database, the developer dashboard lists also corresponding sql requests with their execution time.



If you click on the sql command than a popup windows display more details. The long running sql request on my test environment is “Declare @…”





During this request i see the complete SQL query and the corresponding call stack to identify the correct control. Additionally at the end we see the IO Stats in case of a slow running SQL server based on too many IO-operations. 


One additional category exist for webparts to identify the slow running ones. In this case the ListView-Webaprt of the “Shared Document Library” is the slowest one.


Hope This Post helps administrators on resolving Performance issues .



Reference sites- http://msdn.microsoft.com/en-us/library/ff512745(v=office.14).aspx

http://blogs.technet.com/b/patrick_heyde/archive/2009/11/16/sharepoint-2010-enable-using-developer-dashboard.aspx

Monday, January 28, 2013

Psconfig Steps with their Operations performed at each task

Today Lets check out What happens when we run the Post Setup configuration Wizard . After setup is run the post setup configuration wizard must be run to complete the process of either creating a new farm or joining a server to an existing farm.
Psconfig Steps with their Operations performed at each task. 
Task 1 -      Initialize SharePoint products and technologies configuration 
Note - It Initializes the configuration and has very less chances of failing on this step.
Task 2 -    Create Configuration database
Note - It creates a new configuration Database in the sql . You need to have proper rights to create a database. 
Setup user account - The Setup user account is used to run the following:
  • Setup
  • SharePoint Products Configuration Wizard
    • Domain user account.
    • Member of the Administrators group on each server on which Setup is run.
    • SQL Server login on the computer that runs SQL Server.
    • Member of the following SQL Server roles:
      • securityadmin fixed server role
      • dbcreator fixed server role
If you run Windows PowerShell cmdlets that affect a database, this account must be a member of the db_owner fixed database role for the database.

If you find an issue Connecting Sharepoint to the Sql server. Create a UDL file and check for the connectivity. For further information on UDL check the link below

http://blogs.msdn.com/b/farukcelik/archive/2007/12/31/basics-first-udl-test.aspx
Task 3 -      Install help collections
Task 4 -       Secure SharePoint resources
Task 5 -            Register SharePoint Services
 Successfully provisioned service: Windows SharePoint Services  Usage.
Successfully installed service instance: Windows SharePoint Services Usage
Successfully provisioned service instance: Windows SharePoint Services Usage
Successfully installed service: Microsoft.SharePoint.BusinessData.SharedS
BdcService.
Successfully provisioned service: Microsoft.SharePoint.BusinessData.Share
e.BdcService.
 Task 6 -        Register SharePoint features
Successfully installed feature C:\Program Files\Common Files\Microsoft Sh…
Server Extensions\14\Template\Features\SPSearchFeature\Feature.xml.
Successfully installed feature C:\Program Files\Common Files\Microsoft Sh
b Server Extensions\14\Template\Features\TenantAdmin\feature.xml.
Task 7          Provision Central Administration Web application and site if   
                        Standalone install.
Task 8 -          Register SharePointHealth Analysis rules 
Task 9 -            Create sample data and provision default Web application 
Task 10 -         Install application content files
Installing the application content files...
Installing the SharePoint Central Administration Web Application content.
Installing the SharePoint Web Application content files...
Task 11 -Finalize SharePoint product and technologies configuration
One new feature of SharePoint Foundation 2010 is that it will automatically set up inbound Windows firewall rules when provisioning a Web application or Web services. During PSConfig, steps above firewall rules will be created for newly created Web applications and services.

Business Data Connectivity connectors are currently enabled in a partitioned environment: SharePoint 2013.

Problem: You could see in SharePoint Health Analyzer rule "Business Data Connectivity connectors are currently enabled in a partitioned environment."
Background:  Business Data Connectivity (BDC) Models containing External Content Types with database, WCF, Web service or custom connectors can be used by tenants to elevate their user permissions. In a partitioned environment, we recommend you disable the Business Data Connectivity connectors.
Reason for error: Business Data Connectivity connectors are currently enabled in a partitioned environment.
Resolution: Disable unwanted connectors by using Windows PowerShell.
To disable unwanted connectors, follow these steps:
1.      Click Start, click All Programs.
2.      Click Microsoft SharePoint 2010 Products.
3.      Click SharePoint 2010 Management Shell.
4.      At the Windows PowerShell command prompt, type the following command, and then press ENTER:
Get-SPServiceApplicationProxy
5.      Note the Business Data Connectivity proxy instance.
6.      You must set the EnableSystemType property to false for each unwanted connector. To do this, at the Windows PowerShell prompt, type the following command, and then press ENTER:
$proxy.EnableSystemType("Connector_type",$false)
Applies to:
·        SharePoint Server 2013 
·        SharePoint Foundation 2013 

Thursday, January 24, 2013

How to change service accounts and service account passwords in SharePoint Server 2007/2010

There might be a Need in the org to change the password of the service account as some administrator has Left or for some other reason to avoid any integrity issue .

Just as I was walking through the process of Changing Service account passwords in 2010 which i found the simplest .

I also wanted to share the old way of changing service accounts and service account passwords in SharePoint Server 2007 .

Please refer to the below link

http://support.microsoft.com/kb/934838

The steps in the KB article would walk you through the individual STSADM commands that were necessary to update the password for the following accounts on every server in the SharePoint Farm:

•Farm account
•Application pool account(s)
•Windows SharePoint Services Help Search Service
•Content access account (used by the Windows SharePoint Services Help Search Service)
•Shared Services Provider (SSP) account(s)
•Office SharePoint Server Search service

However in Sharepoint 2010 we have Managed Accounts

Launch SharePoint 2010 Central Administration (logon as Setup Farm Account)
Navigate to ‘Application Management’
In ‘Security’ Section Click‘Configure Manage Accounts
Click Register Managed Account

Add the New Account
User Name (NEW USER)
Password (NEW PASSWORD)

Update Security Groups on Each SharePoint Server.
Start – Administrative Tools – Computer Management
Expand System Tools -> Local Users and Groups – Groups
Set the permissions as below:

ADMINISTRATORS – add the new farm account confirm it exists
WSS_WPG – add the new farm accountconfirm it exists
WSS_ADMIN_WPG – add the new farm accountconfirm it exists

Launch Central Administration
Select Security
Select Configure Service Accounts
Update the following Accounts:
• Farm Account
• Windows Service – Microsoft SharePoint Foundation Sandboxed Code Service
• Windows Service – User Profile Synchronization Service
• Windows Service – Web Analytics Data Processing Service
• Service Application Pool – SecurityTokenServiceApplicationPool
• Service Application Pool – SharePoint Web Services System

You can also change only the password of the Service account

Launch SharePoint 2010 Central Administration (logon as Setup Farm Account)
Navigate to ‘Application Management’
In ‘Security’ Section Click
‘Configure Manage Accounts
Click on Edit besides the service account and then fill in the details
The Managed account should be already selected
Check the Change password now box
Set account password to new value
Confirm Password
Click ok

Hope This helps some Administrators .

You can also refer - http://blogs.technet.com/b/seanearp/archive/2011/01/25/updating-passwords-on-sharepoint-2010.aspx

Recover data from an unattached content database - Sharepoint 2010

Wow One more amazing feature .

Now you can Recover data from an unattached content database . you dont have to add the content database to a web application

As a Sharepoint administrator there might be a need to restore only some but not all content within a content database. How would you do that in SharePoint 2010 .

In earlier versions of SharePoint, to restore or recover content from a backup file, we had to restore the backed up file to a database server and had to attach that restored database to a another SharePoint farm. Then we needed to export the required content from this new temporary farm and then migrate it to the original farm where we wanted to recover it. This whole process required a huge time investment and rigorous planning.

To recover content from an unattached content database by using Central Administration

* Verify that the user account that is performing this procedure is a member of the Farm Administrators group and is a member of the db_owner fixed database role.

* In Central Administration, on the Home page, click Backup and Restore.

* On the Backup and Restore page, in the Granular Backup section, click Recover data from an unattached content database.

* On the Unattached Content Database Data Recovery page, type the database server name in the       
    Database Server text box and type the database name in the Database Name text box.

* Select the database authentication method that you want to use.

* Select the Browse content option, and then click Next.

* Click Start Restore.

* On the Browse content page, select the site collection, site, and or list that you want to restore, select the
   Backup site collection or Export site or list option, and then click Next.

Complete the process to restore the content.

To recover content from an unattached content database by using Windows PowerShell

Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following command

Get-SPContentDatabase -ConnectAsUnattachedDatabase  -DatabaseName <DatabaseName> -DatabaseServer <DatabaseServer>

Where:
<DatabaseName> is the name of the unattached database from which you want to recover content.
<DatabaseServer> is the name of the database server that hosts the unattached database from which you want to recover content

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


Recently published content for SharePoint 2013

Published the week of January 21, 2013
Business Data Connectivity connectors are currently enabled in a partitioned environment (SharePoint 2013)   Describes how to resolve the SharePoint Health Analyzer rule.

Cached objects have been evicted (SharePoint 2013)   Describes how to resolve the SharePoint Health Analyzer rule.

Distributed cache service is not enabled in this deployment   Describes how to resolve the SharePoint Health Analyzer rule.

More Cache hosts are running in this deployment than are registered with SharePoint (SharePoint 2013)   Describes how to resolve the SharePoint Health Analyzer rule.

SPHA rule: This Distributed Cache host may cause cache reliability problems   Describes how to resolve the SharePoint Health Analyzer rule.

The number of Distributed Cache hosts in the farm exceeds the recommended value    Describes how to resolve the SharePoint Health Analyzer rule.

Use UPRE to replicate user profiles across multiple farms in SharePoint Server 2013   Learn how to use the User Profile Replication Engine to replicate user profiles across multiple SharePoint 2013 farms
.
Timer job reference (SharePoint 2013)   Describes the ways you can filter and view timer jobs and lists the default timer jobs that are in SharePoint 2013.

Upgrade from Office SharePoint Server 2007 or Windows SharePoint Services 3.0 to SharePoint Server 2013 or SharePoint Foundation 2013   Learn how to use the database-attach method to upgrade from Windows SharePoint Services 3.0 or Office SharePoint Server 2007 to SharePoint 2013.

Upgrade from other versions or other products to SharePoint 2013   Learn how to upgrade to SharePoint 2013 from other versions, such as Office SharePoint Server 2007 or Windows SharePoint Services 3.0.

Monday, January 21, 2013

Sharepoint 2010 Search from the Administrative prospective

New features and functionality for administrators

SharePoint Server 2010 includes new ways for administrators to help provide the most benefits for end users who are searching for information.

Improved administrative interface

SharePoint Server 2010 has the new Central Administration interface that was first available for organizations that deployed Office SharePoint Server 2007 and then installed the Infrastructure Update for Microsoft Office Servers. This new interface centralizes the location for performing administrative tasks. With SharePoint Server 2010, administrators have an interface that provides the following advantages:

    A single starting point for all farm-wide administration tasks, including search administration. The most common search tasks are highlighted.

    A central location where farm administrators and search administrators can monitor server status and activity.

Farm Configuration Wizard

The Farm Configuration Wizard runs automatically after a Server Farm installation finishes. This wizard helps simplify deployment of small farms. It provides the option to automate much of the initial configuration process with default settings. For example, when you use the Farm Configuration Wizard to deploy the first server in a farm, the wizard automatically creates a fully functional search system on that server, which includes:

    A search topology that can support an index of up to 100 million crawled documents.

    A Search Center from which users can issue queries. This Search Center is created automatically if the person installing the product selects this option in the wizard.

The search system can crawl local SharePoint sites (sites in the server farm) immediately after the Farm Configuration Wizard finishes running.
Search service administration independent of other shared services

In Microsoft Office SharePoint Server 2007, the Office SharePoint Server Search service was bundled with other shared services (such as Excel Calculation Services) in the Shared Services Provider (SSP). In that architecture, you could not create a new Search service without creating a new SSP. In contrast, in SharePoint Server 2010, you can create and manage Search service applications independently of one another and independently of other service applications.
Expanded support for automating administrative tasks

You can automate many search administration tasks by using Windows PowerShell 2.0 scripts. For example, you can use Windows PowerShell 2.0 scripts to manage content sources and search system topology.
Increased performance, capacity, and reliability

SharePoint Server provides many new ways to configure and optimize a search solution for better performance, capacity, and reliability.
Scalability for increased crawling capability

You can increase the number of crawl components to do the following:

    Increase crawl frequency and volume, which helps the search system to provide more comprehensive and up-to-date results.

    Increase performance by distributing the crawl load.

    Provide redundancy if a particular server fails.

Index partitioning enables subsecond latency over an index that contains up to 100 million items, depending on the item sizes and types and other factors.
Scalability for increased throughput and reduced latency

You can increase the number of query components to do the following:

    Increase query throughput — that is, increase the number of queries that the search system can handle at a time.

    Reduce query latency — that is, reduce the amount of time it takes to retrieve search results.

    Provide failover capability for query components.

Topology management during normal operations

You can tune the existing search topology during regular farm operations while search functionality remains available to users. For example, during usual operations, you can deploy additional index partitions and query components to accommodate changing conditions.
Operations management

SharePoint Server 2010 provides new capabilities for monitoring farm operations and customizing reports.
Health and performance monitoring

Health and performance monitoring features enable an administrator to monitor search operations in the farm. This can be especially helpful for monitoring crawl status and query performance.

SharePoint Server 2010 includes a health analysis tool that you can use to automatically check for potential configuration, performance, and usage problems. Search administrators can configure specific health reporting jobs to do the following:

    Run on a predefined schedule.

    Alert an administrator when problems are found.

    Formulate reports that can be used for performance monitoring, capacity planning, and troubleshooting.

Report customization

You can customize reports that help you analyze search system operations and tune the search system to provide the best results for search queries. For example, reports can include information about what terms are used most frequently in queries or how many queries are issued during certain time periods. Information about peak query times can help you decide about server farm topology and about best times to crawl.
Searches of diverse content by crawling or federating

SharePoint Server 2010 can search content in repositories other than SharePoint sites by crawling or federating. For example, the search system can do the following:

    Crawl content in repositories such as file shares, Exchange public folders, and Lotus Notes.

    Use federation for access to search results that are gathered by other crawlers or search engines. An administrator might federate search results from www.bing.com or from a geographically distributed internal location, for example.

http://technet.microsoft.com/en-us/library/ee667266%28office.14%29.aspx#BKMK_RESULT

Whats New in Sharepoint search 2010 ?

All of us know that Search plays an integral part of any successful SharePoint deployment and is an area that Microsoft continues to invest in with each new release of SharePoint.

Microsoft went ahead and acquired FAST some years back which now offers as a separate add-on to SharePoint for those willing to invest in high end enterprise search.  In addition to FAST, SharePoint 2010 search comes in a number of flavors each offering their own feature set and capabilities.

New features and functionality for end users.

New search query capabilities

  • Boolean query syntax for free-text queries and for property queries

    SharePoint Server 2010 supports use of the Boolean operators AND, OR, and NOT in search queries. For example, a user can execute a query such as the following:

    ("SharePoint Search" OR "Live Search") AND (title:"Keyword Syntax" OR title:"Query Syntax")
  • Prefix matching for search keywords and document properties

    Search queries can use the * character as a wildcard at the end of a text string. For example, the search query "micro*" would find documents that contain "Microsoft" or "microchip," and the query "author:bi*" would find documents that contain "Bill" or "Bing." Therefore, the query "micro* author:bi*" would find documents that contain both "Microsoft" and "Bill Gates."
  • Suggestions while typing search queries

    As a user types keywords in the Search box, the Search Center provides suggestions to help complete the query. These suggestions are based on past queries from other users.
  • Suggestions after users run queries

    The Search Center provides improved "did you mean" suggestions in case keywords in a search query appear not to be what the user intended. In addition, when the search system returns results for a query, the Search Center provides suggestions for related searches.
  • Federated search connectors for searching the enterprise from Windows 7

    After SharePoint Server 2010 returns results for a search query, a Windows 7 user can create a federated search connector shortcut for that search scope in Windows Explorer. This enables the user to search that scope at any time from Windows 7. The search results and associated metadata are displayed in Windows Explorer, where the user can take advantage of Windows features such as file preview and drag-and-drop. For any given search query, the search results that are displayed in Windows 7 are exactly the same as those that are displayed in the Search Core Results Web Part when the search is conducted directly in SharePoint Server 2010.

 

http://technet.microsoft.com/en-us/library/ee667266%28office.14%29.aspx#BKMK_RESULT
 

Saturday, January 19, 2013

Icons for the Word Document files are shown as blank Icons instead of Word Document Icons for .doc or .docx files


Problem Description:
We have an issue with SharePoint  Document Library where the Icons for the Word Document files are shown as blank Icons instead of Word Document Icons for .doc or .docx files. And when we click on New to create a document the following error occurs “New Document Requires Windows SharePoint Services- Compatable application and Microsoft Internet Explorer 6.0 or greater. To add a document library, click the Upload Document button."

Error Message:
New Document Requires Windows SharePoint Services- Compatable application and Microsoft Internet Explorer 6.0 or greater. To add a document library, click the Upload Document button

Issue probing/ trying to find out the cause behind it:
1)   Tried changing the hosts file on my computer to point to only one of the two Web Front ends and bypassed F5 Load Balancer.

2)   Does the issue happen to all client computers or only to some ?

3)   Where excatly the images are stored?- The image of the word documents are defined in Drive:\Program Files\Common Files\Microsoft Shared\web server
4)   extensions\12\TEMPLATE\XML\DOCICON.XML

5)   By default, the images file for word document are icdoc.gif and icdocx.gif under the folder of Drive:\Program Files\Common Files\Microsoft Shared\web server
6)   extensions\12\TEMPLATE\XML \images

7)   Word Client: If the word client is not started when you click the word document, it is very possibly caused by the invalid file mapping on the client. Please check on those computers, user can click open a word document file on local disk.

8)   What kind of authentication is used by the sharepoint web application where we are facing the problem? NTLM\Kerberos!

9)   Are there any changes happened on the server recently?

Troublshooting/Debugging/Investigation Done:
·         Tried recycling the app-pool, if no changes then try to reset IIS (IISRESET)

·         Downloaded Process Monitor from: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

·         Uncompressed the downloaded file to the server. Inside the package there is a Procmon.exe. It can be run directly, no need to install.

·         Log on to SharePoint server as administrator.

·         Run IISRESET

·         Click to open the procmon.exe, and click OK to start the monitoring.

·         Open a browser and click to open the word document.

·         On the procmon.exe, click the highlighted button to stop the trace. Then click menu “File>Save to file” to save the captured trace.

Solution/Resolution:
If we recycle the web application pool or restart IIS, we can force the web application to reload the file and then the problem can be fixed.

if you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues. Thank you.

Applies to:
SharePoint Server 2007/MOSS2007/SP007



Friday, January 18, 2013

You cannot view a Visio 2010 diagram that is saved to a SharePoint site


Problem Description:
Consider the following scenario:
1.   You create a Microsoft Visio 2010 diagram.
2.   You save the diagram as a .vsd file. A .vsd file is the default file format in Visio 2010.
3.   In Microsoft SharePoint Server 2010, you save the .vsd file to a SharePoint site that is running Visio Services.
4.   You try to view the Visio diagram on the SharePoint site.

In this scenario, the diagram does not display.
Additionally, the diagram tries to open in Visio 2010 on the client computer.
Probable Causes:
·         Visio Services will display only Web Drawings (*.vdw) in Microsoft SharePoint Server 2010 Enterprise Edition.
·         It is not designed to display any other format Visio Drawings (.vsd/.vss/.vst/.vdx/.vsx/.vtx).

Possible workarounds:
To work around this issue, save the diagram as a Web Drawing (*.vdw).
To do this, follow these steps:
1.   Open the diagram in Visio 2010.
2.   On the File tab,
3.   click Save and Send .
4.   Click Save to SharePoint .
5.   On the right side of the window, select a SharePoint location.
6.   In the File Types section, click Web Drawing (*.vdw) .
7.   Click Save As and
8.   then save the diagram to the SharePoint location.

Additional Notes:
The only Visio file type that will have the "View in Web Browser" Open menu option in a Document Library is Web Drawing (*.vdw). All other Visio file types will only have the "Edit in Microsoft Visio" option. 
Applies To:
·         Microsoft SharePoint Server 2010
·         Microsoft Visio Premium 2010
·         Microsoft Visio Professional 2010
·         Microsoft Visio Standard 2010

If you have any queries/questions regarding the above mentioned information then please let me know. Thank you

Users cannot see the checked out files in the folder/ library

I Came across a Issue today wherein the user opened a ticket for the below issue Issue : Users cannot see the checked out files in the fo...