Posts

Showing posts from March, 2012

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