Wednesday, October 17, 2012

TFS 2012 Installation - TFS Sharepoint Extension (Part-3)

This is a continuation of the following posts:


The steps here illustrates the installation and configuration of TFS Extension for SharePoint (2010).  This assume you have an existing SharePoint farm you want to integrate TFS with.

  1. For DOMAIN\_TFSService account, grant the following rights:
    - Add this account to the Farm Administrators group in Sharepoint- Add this to the  "Policy for Web Application" for that web app
  2. Launch the tfs_sharePointExtensions.exe file from the SharePoint Extensions folder to install only the Team Foundation Server Extensions for Sharepoint Products.  NOTE:  If your SharePoint consist of multiple servers, you will need to perform the first SharePoint extension install on the server that hosts the Central Admin.







Provide the TFS server url and the SharePoint Web App URL

When you are done with the initial server, continue to install TFS SharePoint Extension on the remain SharePoint WFE server(s).

 Once you are done with the above, you will need to configure the TFS server to talk to SharePoint:

  1. Launch the TFS Admin Console from the TFS Server
  1. Under Application Tier, select  SharePoint Web Applications
  1. Click Add under the SharePoint Web Applications category and provide the info as shown below:

TFS 2012 Installation - Adding additional App Tier (Part-2)

This is a continuation of TFS 2012 Installation - Build out initial farm (Part-1).  The steps here illustrates how you would add an additional app tier to your TFS farm.


  1. Please refer to the previous post for service account requirements.
  2. If your SQL, SSRS, and SSAS are located on a different server, you need to Install SQL Client Tools first by:
    • Runnning the SQL setup on the TFS machine
    • Select Client Tool Concectivity & Client Tool SDK
    • Install
  3. Run "tfs_server.exe" as Administrator
  4. Select Application-Tier Only and click Start Wizard and follow the wizard:



Enter the database server name and click List Available Databases.  Select the TFS_Configuration database and click Next.





TFS 2012 Installation - Build out initial farm (Part-1)

I just finished implementing a new TFS 2010 farm.  This farm consist of two App Tier servers.  The data tier consist of a SQL 2008 R2 cluster.  The below instruction is for creating your initial farm or the very first server:


  1. Service Accounts:
    • Domain\_TFSSetup
      - Add to server's local Admin Group
      - Grant SQL "severadmin" role
    • Domain\_TFSService
      - Add to local security policy "Log on as a service" on the app tier server.
      - Grant db-owner and db-crate 
      for any databases that Team Foundation Server uses
    • Domain\_TFSReports
      - Add to local security policy "Log on as a service" on the app tier server.
      - Grant TFSWareHouseDataReader on the report server
  2. If your SQL, SSRS, and SSAS are located on a different server, you need to Install SQL Client Tools first by:
    • Runnning the SQL setup on the TFS machine
    • Select Client Tool Concectivity & Client Tool SDK
    • Install
  3. Run "tfs_server.exe" as Administrator
  4. Select Advanced and click Start Wizard and follow the wizard:
Enter the SQL server name or the cluster alias
It is a good idea to have a service account.  For me, I have an AD account called _TFSService
If you have SSRS setup, enter the requested info.  Otherwise, you can skip it for now.
If you have SSAS setup, enter the requested info.  Otherwise, you can skip it for now.
You can create your first Project Collection if you want or do it later






MS Project 2010 - Access Denied Error 70

If your users are getting error similar to the following:


... try doing this:

  1. Exit MS Project
  2. Clear/remove all temp files from c:\windows\temp
  3. Go to the properties for c:\windows\temp. Uncheck the "Read-Only" checkbox and click apply.
  4. Clear/remove all temp files from C:\Users\USERNAME\AppData\Local\Temp
  5. Go to the properties for C:\Users\USERNAME\AppData\Local\Temp. Uncheck the "Read-Only" checkbox and click apply.
  6. Open MS Project
  7. Clear Cache
  8. Archive again

Project Server 2010 - Orphan baseline tasks

PROBLEM:
In the past year or so, I have been seeing the following errors in the job queue


ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated..

GeneralQueueJobFailed (26000) - ReportingProjectPublish.ReportProjectPublishMessageEx



SOLUTION:

The temp workaround is to run the following SQL scripts:


select PROJ_NAME, MTB.PROJ_UID,TASK_UID,TB_BASE_NUM from MSP_TASK_BASELINES MTB
inner join MSP_PROJECTS MP on MTB.proj_uid=MP.proj_uid
where TASK_UID not in (select TASK_UID from MSP_TASKS)
order by PROJ_Name

delete from MSP_TASK_BASELINES where TASK_UID not in (select TASK_UID from MSP_TASKS) 


The permanent solution is to apply the hotfix from Microsoft... http://support.microsoft.com/kb/2598351


Project Web App Cannot connect to Project Server


PROBLEM




System.ServiceModel.FaultException`1[[Microsoft.Office.Project.Server.Interfaces.DefaultServerFault, Microsoft.Office.Project.Server.Communications, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]: The databases are out of the range of compatibility, upgrade your databases.   Server stack trace:    
 at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)   
 at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)   
 at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)   
 at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown
 at [0]:    
 at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   
 at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   
 at Microsoft.Office.Project.Server.Interfaces.IAuthentication.GetUserByName(String username)   
 at Microsoft.Office.Project.Server.AuthenticationHelper.AuthenticateUserByName(String userName, Guid siteId)   
 at Microsoft.Office.Project.PWA.PJContext.AuthenticateUserForPWA(Boolean needToValidateUser, String username, Guid siteId)

PROBLEM

If you get the above, you can try the following:

  1. Start and restart the Project Services
  1. Run the SP Configuration Wizard on the Project Server


Lesson Learned - SharePoint 2010 Search Service Application


Recently I was having issues with the Search Service Application on SP 2010 farm.  I decided to remove it and re-create it from scratch.  During the removal, however, the process seems to have hung up for some reason.  I went ahead any manually clean things by doing the following:
  • Ensure the old SSA instance is gone (Stop-SPServiceInstance)
  • Remove old SSA if still there (Stsadm -o deleteconfigurationobject -id {GUID})
  • Delete old service application pool (Remove-SPServiceApplicationPool)
  • Delete the older search databases from SP (Get-SPDatabase) and from SQL.
Since I have successfully done this many times in the past, re-creating the SSA should be breeze right? Wrong!!!!

PROBLEM
My initial attempt is to go thru Central Admin to create the SSA but the creation process just stays or hangs until it times out hours later.  I have tried using powershell script and the result was the same.  When I look at the Service App, I do see the Search Admin Web Service get created/started.  I also search the Search Service Application... but with the following error:
"The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component 'cae20adf-f859-4a81-be8b-87b47c7921fa' in search application 'Server Search Application' is in a good state and try again."
Each time, I made sure to clean up the services apps, databases, service instances, and proxy before attempting to re-create.  I am using a managed account for the search service.  On the database site, I am seeing 
"Login failed for user 'DOMAIN\FARMACCOUNT'. Reason: Failed to open the explicitly specified database."
When I click on the "Modify Topology", I get an exception.  Below is the entries in the log:
Unhandled page level exception. Path: /_admin/search/searchconfigwizardtopologyconfig.aspx, Error: Exception has been thrown by the target of an invocation., Details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.    
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.AddAdminTopologySettingsToTable()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.GetComponents(String searchAppGuidParam, String viewTypeParam)     -
 -- End of inner exception stack trace ---  
 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  
 at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)  
 at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)  
 at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)  
 at System.Web.UI.WebControls.DataBoundControl.PerformSelect()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.RefreshGridView()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.Initialize()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.CreateChildControls()  
 at System.Web.UI.Control.EnsureChildControls()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.AddAdminTopologySettingsToTable()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.GetComponents(String searchAppGuidParam, String viewTypeParam)     -
 -- End of inner exception stack trace ---  
 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  
 at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)  
 at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)  
 at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)  
 at System.Web.UI.WebControls.DataBoundControl.PerformSelect()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.RefreshGridView()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.Initialize()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.CreateChildControls()  
 at System.Web.UI.Control.EnsureChildControls()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

SOLUTION
After banging my heads for several days, I decided to contact MS Support for help.  In addition to the cleanup steps I've mentioned earlier, we were able to resolve the issues by taking additional steps:
  1. Clear out the Cache: Stop the Sharepoint Timer services on all WFE and App servers.  Go to "C:\ProgramData\Microsoft\SharePoint\Config\[GUID]".  Other than Cache.ini, delete everything  under C:\ProgramData\Microsoft\SharePoint\Config\[GUID] directory.   Update the cache.ini and change the number to 1 and save it.  Start the Timer services again.
  2. Review Job Definition: Go to http://CentralAdmin/_admin/ServiceJobDefinitions.aspx page.  See if there's any phantom jobs (job with only GUID but no details) and remove them if exist.
  3. Stop and restart "Sharepoint Server Search 14"
  4. Stop and restart Search Query and Site Settings Service

One you have verified all the above.  Trying creating the SSA again.  Hope this helps someone.


Monday, February 13, 2012

Can not activate Sharepoint Server Publishing

I recently upgraded from SP2007 to SP2010 thru DB attached.  I noticed one of my site collection's Sharepoint Server Publishing Infrastructure and Sharepoint Server Publishing were not activated. I went ahead and activate the infrastructure on the site collection but when I try to activate the publishing on the site level it failed. I try to activate using command line:

stsadm -o activatefeature -name PublishingWeb -url http://mydomain.com/test
but got the following....

Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: 'http://mydomain.com/test' OriginalException: List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user.

After some further research, it looks like the hidden "Quick Deploy Item" and a host of other key list were not there.  Now sure how this happened but I have tried various suggestions to no avail. 

SOLUTION:  Okay... I open a support ticket with MS Support. We ended up solving the issue by issuing by following comannds:

stsadm -o activatefeature -filename publishing\feature.xml -url http://...-force
stsadm -o activatefeature -filename publishingresources\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishingSite\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishingweb\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://...- -force
stsadm -o activatefeature -filename navigation\feature.xml -url http://...- -force

NOTE: You need to execute the aboe on all subsites that are affected. Hope this help someone.

Wednesday, February 8, 2012

Search not returning result for other domain users


I have a strange situation when users from other domain does not get any results when they perform a search. Here's the scenerio:
  1. I recently upgraded the farm from Sp2007 to Sp2010.
  2. Crawl jobs all completed successfully
  3. Our domains:
    - myco.com
    - eu.myco.com
  4. User from myco.com can search fine.
  5. Search performed by user from eu.myco.com return nothing... envon on simple search where I am sure they have access to. Also, they didn't have this problem in SP2007.
  6. These eu.myco.com users does have access to the sharepoint sites.
  7. It is similar to the issues describe in this discussion: http://social.microsoft.com/Forums/en-US/partnerofficesharepoint/thread/b547461a-e47b-4b54-980d-d6b36e244bae.  The fix was to add the search/servcie account to the Windows Authorization Access group.
  8. In my case, I need to add the service account to the Windows Authorization Access group on ALL the domains.

Missing Some Basic Webparts After SP2010 Upgrade

I have recently upgraded from SP2007 to SP2010 (enterprise). Now, when I try to add a webpart, I don't see the Content Editor webpart under the media category. I am a farm admin and I can see it. This is what I have done so far:
  • Checked the permission to webpart gallary. They all looked fine
  • Checked the site collection's publsihing infrastructure feature and site level publishing feature. They are both enabled already. I went and disable and re-eanble any way.
  • Went to Central Admin -> Upgrade and Migration and ran the "Enable features on Existing Sites".
  • Checked the webpart gallery but didn't see the MSContentEditor.dwp on the list. Click new but still see it from the list.
What what else am I missing.    I seem to be missing some basic webparts... webparts like RSS Feed is not showing up when I add webpart. 

Okay... after some more digging into his. I was able to resovle by running the following script to disable and re-enable the: 1) Basic Web Part; 2) Standard Site Collection Feature; and 3) Enteprise Site Colleciton Feature. The script traverse thru the web, locate the site collections, and disable/enable the features:

$webApp = Get-SPWebApplication -Identity http://yourwebapp
$webApp | Get-SPSite -limit all | ForEach-Object {Disable-SPFeature -Identity "BaseSite" -Url $_.Url -Confirm:$False}
$webApp | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "BaseSite" -Url $_.Url}
$webApp | Get-SPSite -limit all | ForEach-Object {Disable-SPFeature -Identity "PremiumSite" -Url $_.Url -Confirm:$False}
$webApp | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "PremiumSite" -Url $_.Url}

Note that manually deactivate and activate these features thru the Site Collection Feature page does not help. For some reason, it needs to be done thru the command line.

Wednesday, November 30, 2011

Sharepoint URL Quick List

How many times you want to remember the Sharepoint _layouts paths but don't remember the exact name?  Well he is a list that I found...  enjoy!


URL Description
URL
Create New Site Content
url: /_layouts/create.aspx
List Template Gallery
url: /_catalogs/lt
Manage People
url: /_layouts/people.aspx
Manage Site Collection Administrators
url: /_layouts/mngsiteadmin.aspx
Manage Sites and Workspaces
url: /_layouts/mngsubwebs.aspx
Manage User Permissions
url: /_layouts/user.aspx
Master Page Gallery
url: /_catalogs/masterpage
Modify Navigation
url:/_layouts/AreaNavigationSettings.aspx
Recycle Bin
url: /_layouts/AdminRecycleBin.aspx
Site Column Gallery
url: /_layouts/mngfield.aspx
Site Content and Structure Manager
url: /_layouts/sitemanager.aspx
Site Content Types
url: /_layouts/mngctype.aspx
Site Settings
url: /_layouts/settings.aspx
Site Template Gallery
url: /_catalogs/wt
Site Usage Summary
url: /_layouts/SpUsageWeb.aspx
User Alerts
url: /_layouts/sitesubs.aspx
View All Site Content
url: /_layouts/viewlsts.aspx
Web Part Gallery
url: /_catalogs/wp
Web Part Page Maintenance
url: ?contents=1
Workflows
url: /_layouts/wrkmng.aspx

Userful Powershell / STSAdm Commands

During my SP2010 upgrade process, on of the challenges I have is constently running PowerShell scripts and piping the results to a file so that I can parse and create new scripts against the results.  I have been doing it using the old way... like using "> test.txt".  Than I found ou that you can use the CovertTo and Export options with better and consistent results.  Below are a few examples:


TEST-SPContentDatabase -name MyContentDB -webapplication http://intranet -serverinstance MyDBServer  | ConvertTo-Html | Out-file intranet.html


TEST-SPContentDatabase -name MyContentDB -webapplication http://intranet -serverinstance MyDBServer  | ConvertTo-CSV -Delimiter "~" | Out-file intranet.csv


TEST-SPContentDatabase -name MyContentDB -webapplication http://intranet -serverinstance MyDBServer  | Export-CLIXML intranet.xml



Other PowerShell Commands useful around Upgrade

Get-Command -noun SP* - similar to stsadm -help
Test-SpContentDatabase – discussed in this post
Upgrade-SPContentDatabase – to resume failed upgrades
Upgrade-SPEnterpriseSearchServiceApplication – Upgrade Search
Upgrade-SPSingleSignOnDatabase – Upgrade SSO
Mount-SPContentDatabase – Used to attach a database or multiple parallel databases to the farm. Essentially is nearly the same as the STSADM –o addcontentdatabase.   If you‘re doing parallel content database attach for example, this PowerShell method is recommended. You‘d simply run each ofthese in different command/management windows.
Upgrade-SPProjectWebInstance – Upgrade Project Server databases. Obviously this only applies with Project Server deployments, but I know there are definitely many out there.
Upgrade-SPEnterpriseSearchServiceApplication – Upgrade the Search Service Application Instance. This commandlet it designed to upgrade the content sources and configuration of search and to upgrade it into the new service application.
Set-SPSite  -- Can use this command to setup site collection admins



STSADM Commands useful around preparing for Upgrade

stsadm -o ExportIPFSAdminObjects
stsadm -o MergeContentDB
stsadm -o EnumAllWebs
stsadm -o DatabaseRepair [-deletecorruption]
stsadm -o DeleteSite [-force] [-gradualdelete]
stsadm -o DeleteWeb [-force]
stsadm -o ForceDeleteList
stsadm -o VariationsFixupTool
stsadm –o Upgrade (Used for build to build upgrades, including service packs.)

"Type" column/icon does not work in Sharepoint 2010

In SP2007, if you add "Type" column to a view (for both document library and custom list), this icon will no longer clickable after you have migrated to SP2010.  For document library, there is a KB  from Microsoft to resolve this.  However, this KB does not work for custom list that you may have.  In order to fix the issue for custom list, you need to extent the solution from KB with addtion modifcations.  Thanks to Martin Truchon's response in this TechNet entry, the required changes as available..

To fix both doc lib and custom list issues, I have combined the above and summarize what need to be done:

1. Copy the contents below and save it in a file called fldtypes_docicon.xslt file and place it in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\XSL.

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal" ddwrt:oob="true">
    <xsl:output method="html" indent="no"/>
 
  <xsl:template ddwrt:dvt_mode="body" match ="FieldRef[@Name='DocIcon']" mode="Computed_DocIcon_body">
    <xsl:param name="thisNode" select="."/>
    <xsl:param name="folderUrlAdditionalQueryString" select="''"/>
    <xsl:choose>
      <xsl:when test="
$thisNode/@FSObjType='1'">
        <xsl:variable name="alttext">
          <xsl:choose>
            <xsl:when test="starts-with(
$thisNode/@ContentTypeId, &quot;0x0120D5&quot;)">
              <xsl:value-of select="
$thisNode/../@itemname_documentset"/>: <xsl:value-of select="$thisNode/@FileLeafRef"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="
$thisNode/../@listformtitle_folder"/>: <xsl:value-of select="$thisNode/@FileLeafRef"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
        <xsl:variable name="mapico" select="
$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapico"/>
        <xsl:variable name="folderIconPath">
          <xsl:call-template name="GetFolderIconSourcePath">
            <xsl:with-param name="thisNode" select="$thisNode"/>
          </xsl:call-template>
        </xsl:variable>
        <!-- This is a folder -->
        <xsl:choose>
          <xsl:when test="$RecursiveView='1'">
            <img border="0" alt="{$alttext}" src="{$folderIconPath}" />
            <xsl:choose>
              <xsl:when test="
$thisNode/@IconOverlay != ''">
                <img src="
/_layouts/images/{$thisNode/@IconOverlay.mapoly}" class="ms-vb-icon-overlay" alt="" title="" />
              </xsl:when>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <xsl:variable name="FolderCTID">
              <xsl:value-of select="$PagePathFinal" />RootFolder=<xsl:value-of select="
$thisNode/@FileRef.urlencode" /><xsl:value-of select="$ShowWebPart"/>&amp;FolderCTID=<xsl:value-of select="$thisNode/@ContentTypeId" />&amp;View=<xsl:value-of select="$View"/><xsl:value-of select="$folderUrlAdditionalQueryString"/>
            </xsl:variable>
            <a href="{$FolderCTID}" onmousedown ="VerifyFolderHref(this, event,
'{$thisNode/@File_x0020_Type.url}','{$thisNode/@File_x0020_Type.progid}','{$XmlDefinition/List/@DefaultItemOpen}', '{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapcon}', '{$thisNode/@HTML_x0020_File_x0020_Type}', '{$thisNode/@serverurl.progid}')"
               onclick="return HandleFolder(this,event,&quot;{$PagePathFinal}RootFolder=&quot; + escapeProperly(&quot;{$thisNode/@FileRef}&quot;) + '{$ShowWebPart}&amp;FolderCTID={$thisNode/@ContentTypeId}&amp;View={$View}{$folderUrlAdditionalQueryString}','TRUE','FALSE','{$thisNode/@File_x0020_Type.url}','{$thisNode/@File_x0020_Type.progid}','{$XmlDefinition/List/@DefaultItemOpen}','{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapcon}','{$thisNode/@HTML_x0020_File_x0020_Type}','{$thisNode/@serverurl.progid}','{$thisNode/@CheckoutUser.id}','{$Userid}','{$XmlDefinition/List/@ForceCheckout}','{$thisNode/@IsCheckedoutToLocal}','{$thisNode/@PermMask}');">
              <img border="0" alt="{$alttext}" title="{$alttext}" src="{$folderIconPath}" />
              <xsl:choose>
                <xsl:when test="
$thisNode/@IconOverlay != ''">
                  <img src="
/_layouts/images/{$thisNode/@IconOverlay.mapoly}" class="ms-vb-icon-overlay" alt="" title="" />
                </xsl:when>
              </xsl:choose>
            </a>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="$IsDocLib">
            <a onfocus="OnLink(this)" href="
{$thisNode/@FileRef}" onmousedown="return VerifyHref(this,event,'{$XmlDefinition/List/@DefaultItemOpen}','{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapcon}','{$thisNode/@serverurl.progid}')"
   onclick="return DispEx(this,event,'TRUE','FALSE','{$thisNode/@File_x0020_Type.url}','{$thisNode/@File_x0020_Type.progid}','{$XmlDefinition/List/@DefaultItemOpen}','{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapcon}','{$thisNode/@HTML_x0020_File_x0020_Type}','{$thisNode/@serverurl.progid}','{$thisNode/@CheckoutUser.id}','{$Userid}','{$XmlDefinition/List/@ForceCheckout}','{$thisNode/@IsCheckedoutToLocal}','{$thisNode/@PermMask}')">
              <xsl:choose>
                <xsl:when test="not (
$thisNode/@IconOverlay) or $thisNode/@IconOverlay =''">
                    <xsl:choose>
                        <xsl:when test="not (
$thisNode/@CheckoutUser.id) or $thisNode/@CheckoutUser.id =''">
                            <img border="0" alt="
{$thisNode/@FileLeafRef}" title="{$thisNode/@FileLeafRef}" src="/_layouts/images/{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapico}"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:variable name="alttext"><xsl:value-of select="
$thisNode/@FileLeafRef"/><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&#10;</xsl:text><xsl:value-of select="$thisNode/../@managecheckedoutfiles_header_checkedoutby"/>: <xsl:value-of select="$thisNode/@CheckoutUser.title"/></xsl:variable>
                            <img border="0" alt="{$alttext}" title="{$alttext}" src="
/_layouts/images/{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapico}" />
                            <img src="/_layouts/images/checkoutoverlay.gif" class="ms-vb-icon-overlay" alt="{$alttext}" title="{$alttext}" />                           
                        </xsl:otherwise>
                    </xsl:choose>                 
                </xsl:when>
                <xsl:otherwise >
                    <img border="0" alt="
{$thisNode/@FileLeafRef}" title="{$thisNode/@FileLeafRef}" src="/_layouts/images/{$thisNode/@IconOverlay.mapico}" />
                  <img src="
/_layouts/images/{$thisNode/@IconOverlay.mapoly}" class="ms-vb-icon-overlay" alt="" title="" />
                </xsl:otherwise>
              </xsl:choose>
            </a>
          </xsl:when>
          <xsl:otherwise>
   <a onfocus="OnLink(this)" href="{$FORM_DISPLAY}&amp;ID={$thisNode/@ID}" ONCLICK="GoToLink(this);return false;" target="_self">
     <img border="0" src="
/_layouts/images/{$thisNode/@HTML_x0020_File_x0020_Type.File_x0020_Type.mapico}">
    <xsl:attribute name="alt">
      <xsl:value-of select="
$thisNode/@Title"/>
    </xsl:attribute>
    <xsl:attribute name="title">
      <xsl:value-of select="
$thisNode/@Title"/>
    </xsl:attribute>
      </img>
   </a>  
          </xsl:otherwise>
        </xsl:choose>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
 
</xsl:stylesheet>



2. IISReset

3. Perform the prior steps in each WFE servers.

Monday, November 28, 2011

Preparing to upgrade Sharepoint 2007 to SP2010

Well, after about 3 months worth of testings and preparations, I am about to upgrade our midsize SP2007 to SP2010 this coming weekend.  I will be doing a database attached method on a newly created "production" SP2010 farm.  In short, this is what I have:
  • 2 x WFE (HyperV VMs)
  • 4 x App Servers - Index, Enterprise Apps, SSRS, Project, SSAS, TFS (all HyperV VMs)
  • Clustered SQL 2008 R1 Servers (Physical)
We have about 10 databases totalling ~200GB.  This is going to take 2-3 hours to complete.  I know some of you would tell to do parallel upgrade.  I have tried that but have seen quite a bit of lock message on the SQL server.  To keep it safe, I am going to do this one-by-one.  At the moment, my newly created farm already has all the required custom applications/solutions deployed.  Since I have been doing mark-up db-attached on this farm for weeks, I have already documented/resolved any issues before hand.  On the day of the migration, here is what I am planning to do:

  1. Update the DNS to redirect all incoming traffic to a temp server
  2. Update MS Exchange to hold incoming email and than change the seetings to point to the two new WFEs.
  3. Backup the DBs from SP2007 servers restore it to the new cluster SQL
  4. Attached the restored DBs and grant the SP accounts the proper permissions
  5. Perform the upgrade one by one using Mount-sPContentDatabase.  When this is all done, I should be able to hit the sites.
  6. Re-deploy all the solutions
  7. Run the "Enable Features On Existing Sites" option to push down all the enterprise features.  If I don't do this, I've noticed that some of my SP2007 workflows would break.
  8. Run TEST-SPContentDatabase to see if there are issues.  Chances are I would see some but as long as not show-stopper, I am okay with it.
  9. I take this opportunity to move/re-locate any site collections to the proper content database... just to keep thing organized.
  10. Have a few users "smoke" test it.
The above are just high level view of what I'll be going thru.  There are alot more steps.  I will post the actual result and finding once I am done upgrade.

Cheers...