Posts

Showing posts from 2012

Get Web Part By GUID

Can't take credit, found this one.  I just want to make sure I can find this again. :) SELECT WebParts . tp_SiteId , WebParts . tp_ID , WebParts . tp_ListId , WebParts . tp_Type , WebParts . tp_Flags , WebParts . tp_BaseViewID , WebParts . tp_DisplayName , WebParts . tp_Version , WebParts . tp_PageUrlID , WebParts . tp_PartOrder , WebParts . tp_ZoneID , WebParts . tp_IsIncluded , WebParts . tp_FrameState , WebParts . tp_View , WebParts . tp_WebPartTypeId , WebParts . tp_AllUsersProperties , WebParts . tp_PerUserProperties , WebParts . tp_Cache , WebParts . tp_UserID , WebParts . tp_Source , WebParts . tp_CreationTime , WebParts . tp_Size , WebParts . tp_Level , WebParts . tp_Deleted , WebParts . tp_HasFGP , WebParts . tp_ContentTypeId , AllDocs . DirName , AllDocs . LeafName FROM WebParts INNER JOIN AllDocs ON WebParts . tp_PageUrlID = AllDocs . Id WHERE ( WebParts . tp_WebPartTypeId = '<Web Part GUID>'

SharePoint Options for Globally Distributed Environments

Image
Introduction Since I started working with SharePoint environments in global companies there has been a common complaint for remote users.  Performance.  Users in remote locations can feel disenfranchised by slow page load times and overall latency of the platform.  In reality, who wants to consume information from a corporate intranet that takes 15 seconds or more to paint a page?  There are several solutions to this issue, with different advantages and drawbacks, and depending on an individual companies unique needs different approaches should be considered. Why is SharePoint Slow?   This is the question that I first asked myself when determining the best way to speed it up.  The framework, one of the greatest strengths of SharePoint is also its icicles heal.  SharePoint provides a robust framework that allows end users to modify pages and content though lists and web parts.  End users can create site collections and sites to rapidly respond to changing business needs.  

cannot add the specified assembly to the global assembly cache

I had this error when I tried deploy a WSP into a SharePoint farm, one of the DLLs needed to go into the GAC (global assembly cache.)   I checked the GAC and the file already existed, I tried to uninstall the file and got the error that the file was in use and could be deleted.   After doing some checking around I found the following link that resolved my issue: __http://support.microsoft.com/kb/873195__ Basically you go into the registry and find go to the following locations: ·         HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Global ·         HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\Global Find the entry for your problem assembly and remove it.   Then try and uninstall the assembly out of the GAC and redeploy your WSP.

Old school kick user with cmd

This is more for my memory; there are far better blog posts on this out there. qwinsta /server <server IP or name> result: SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE rwinsta /server <server IP or name> <ID form the result above>

Cloud Options – different flavors of the Cloud, IaaS, PaaS, SaaS.

Image
In the past year I have been asked several times about the ‘Cloud’.   Many customers think the cloud is a magical place where users train themselves, systems never go down, internal IT is no longer needed and an overall feeling of rainbows and kittens. Before moving to the cloud there are several factors to consider.   The cloud is not always right for every customer every time. One of the primary things that companies should think about is what ‘type’ of cloud solution is best for their business.   Each flavor of cloud comes with benefits and drawbacks that need to be matched up the business’s needs prior to taking the cloud plunge.   Even within each option there are several different levels of service offered.    This is a brief and highly over simplified description of the ‘favors of the cloud’ IaaS – Infrastructure as a Service This option usually means the business will have complete access to the servers.   It is commonly revered to as a Co-Lo or co location.   The serv

SQL query – Get the number of non-null entries in all table columns without typing in each column names

DECLARE @col varchar ( 255 ), @cmd varchar ( max ),   @numval varchar ( max ),   @Parm varchar ( 500 ), @SQLString nvarchar ( 500 ), @ParmDefinition nvarchar ( 500 ), @CountSQLQuery varchar ( 30 ); DECLARE getinfo cursor for SELECT c . name FROM sys . tables t JOIN sys . columns c ON t . Object_ID = c . Object_ID WHERE t . Name = 'YOUR_TABLE_NAME'   OPEN getinfo   FETCH NEXT FROM getinfo into @col   WHILE @@FETCH_STATUS = 0 BEGIN       SET @SQLString = N'SELECT @result = COUNT(*) FROM YOUR_TABLE_NAME where ' + @col   + ' is not null' ;       SET @ParmDefinition = N'@result varchar(30) OUTPUT' ;       EXECUTE sp_executesql @SQLString , @ParmDefinition , @result = @CountSQLQuery OUTPUT ;       print @col + '     ' + @CountSQLQuery FETCH NEXT FROM getinfo into @col END   CLOSE getinfo DEALLOCATE getinfo

SharePoint Central Admin cannot be access from web front end - Disable Loopback

From MS: http://support.microsoft.com/kb/2451858 Method 1: Specify host names (the preferred method for NTLM authentication) To specify the host names that are mapped to the loopback address and can connect to websites on your computer, follow these steps: Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base: 281308   (http://support.microsoft.com/kb/281308/ ) Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name Click Start , click Run , type regedit , and then click OK . In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 Right-click MSV1_0 , point to New , and then click Multi-String Value . Type BackConnectionHostNames , and then press ENTER. Right-click BackConnectionHostNames , and then

SharePoint SP or hotfix failed...

psconfig -cmd upgrade -inplace b2b -force