Tuesday, April 23, 2013

Networking :DHCP, IPv4 and IPv6

http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol

The DHCP server maintains a database of available IP addresses and configuration information. When the server receives a request from a client, the DHCP server determines the network to which the DHCP client is connected, and then allocates an IP address or prefix that is appropriate for the client, and sends configuration information appropriate for that client. DHCP servers typically grant IP addresses to clients only for a limited interval. DHCP clients are responsible for renewing their IP address before that interval has expired, and must stop using the address once the interval has expired, if they have not been able to renew it.

On receiving a valid request, the server assigns the computer an IP address, a lease (length of time the allocation is valid), and other IP configuration parameters, such as the subnet mask and the default gateway

DHCP is used for IPv4 and IPv6.

IPv4 is 32 bit max address space (232) addresses
IPv6 is 128 bit max 2128 addresses

Friday, April 19, 2013

Windows 2012 Virtualization Insight.

I have started Virtualization VDI with Win 2008 R2 Hyper-v , now I m planning to migrate it to Windows Server 2012.

Few quick things ,
1) Migration of Existing  VHD image to VHDX in 2012.
2) No Windows Server 2012 enterprise Edition.
3) Windows server 2012 standard with Hyper v. Allowed 2 VMs  per Server Licenced.
Data center edition muliple VMS.

Have used Intel SSD drive for better performance as we have VS2012 with complex solution exhaustive built process.

Reference:

http://www.microsoft.com/en-us/server-cloud/windows-server/server-virtualization.aspx\

http://blogs.technet.com/b/uspartner_ts2team/archive/2012/11/02/how-to-setup-hyper-v-on-a-windows-server-2012-server.aspx

http://blogs.msdn.com/b/virtual_pc_guy/archive/2012/10/03/using-powershell-to-convert-a-vhd-to-a-vhdx.aspx

http://blogs.technet.com/b/keithmayer/archive/2013/04/05/getting-started-with-hyper-v-server-2012-hyperv-virtualization-itpro.aspx

http://blogs.msdn.com/b/virtual_pc_guy/archive/2012/10/02/converting-a-vhd-to-a-vhdx.aspx



Thursday, April 18, 2013

Hack :Tuning Windows For TCP/IP Performance.

Today I m struggling lot to establish  VMs guest OS to access shared folder of host Hype-v Windows server 2008 R2. After wrecking my head and intense search I got the solution for the given problem in microsoft support site. Its very unusual besides having set right at first place never thought tuning network tcp/ip will resolve this. Still its hard on my part for not getting answers why running following below command solved my problem. Yup! I'm not a network or infra guy.. just thought to file this findings in my blogpost for future reference.


  1. netsh int tcp set global chimney=disabled
  2. netsh int tcp set global NetDMA=disabled
  3. netsh interface tcp set global autotuning=disabled

Where I ended up...
http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/82c9371a-eab9-4526-ba34-81d1f3bdc141/

Final Verdict..

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

What it state.
TCP Chimney Offload overview TCP Chimney Offload is a networking technology that helps transfer the workload from the CPU to a network adapter during network data transfer. In Windows Server 2008, TCP Chimney Offload enables the Windows networking subsystem to offload the processing of a TCP/IP connection to a network adapter that includes special support for TCP/IP offload processing.
TCP Chimney Offload is available in all versions of Windows Server 2008 and Windows Vista. Both TCP/IPv4 connections and TCP/IPv6 connections can be offloaded if the network adapter supports this feature.

Wednesday, April 17, 2013

Quick Code Dynamic Sql server Script


Declare  @strWhere  nvarchar(200),

@strMainQuery nvarchar(400),

@FromIDbigint ,

@ToIDbigint


set @FromID=11111

set @ToID=11251



if(@FromID<> null and @ToID<> null)

      set @strWhere= ' IS NOT NULL'

Else

      set @strWhere= ' between ' + Convert(varchar(20),@FromID) + ' and ' +  Convert(varchar(20),@ToID)

           

      set @strMainQuery ='SELECT

            d.ID,

            name,

            address,

            telephone

      FROM

            dbo.Customer p

            left outer join dbo.CustomerService d on p.ID = d.ID

      WHERE d.ID' + @strWhere +

      ' ORDER BY

            d.ID'

select @strMainQuery

exec(@strMainQuery)

ESP Fast Search Dictionary Guide Overview

Overview

Any product retail related site , portal requires robust search engine to pull you the information you want. It has to be pretty fast to hook you with right information and help you through. If not then you move to next site which satisfy your shopping needs. Well this search engine can satisfy various business requirement not just retail or product industry . You can make use in any domain where data search is essential.

Fundamentals-

Search works on parsing of data and extract information and present it to end users. What next , parsing must be fast this comes with indexing of data. Now if your data is in database server this may adds up overhead with lot of response time. So we processed this data and get it indexed through scheduled job during non business hours. This may sit on some search engine server for better performance,

How to help end users , what goes IN and out?

Dictionary- This is place holder where all important words are organised and sorted. This is a lookup or a catalog before it actually fetched the detailed results. This can act like address.

Once user gives search words, phrases or anything, the search system has to be smart to pick the right reference from dictionary and send the detailed information to end users.

Now do this following entity comes into play.

Linguistic Guide- To identify language of the document or data. use language culture.

Tokenization- Split and normalize the phrase or joined words.Splitting of stream of text. Stemming or segmentation.

Lemmatization- Identify grammers of data . Say Car or Cars. Plural. Singular, positive, comparative, superlative for adjectives. tense or verbs.Compute may also give computer or computing.

Spell Check- There are several properties such threshold,maxlength, min length, exact or tolerance level. It corrects the wrong spell words and suggest Did you mean ? words to display results.Its important dictionary holds valid spelled words to lookup.

Anti Phrasing and stop words: It will filter most come phrase such as I am, who is ?, where are? etc.
Say for example. You give a search Who is Mr. Miller It will search for only Mr. Miller from source.

Synonyms: It checks for words with similar meanings. For e.g  My Car search will extract Automobile information aswell.

Entity Extraction: Detection of Entity such as names, company, location, country,street names ,file name, telephone,etc,

Noun Phrase Extraction: It identifies the noun words from the dictionary,

Structural Analyis: It classify the content of the page such as buy, order or shopping

Phonetic Search: These are search words mispelled due to pronounciation. Such as Schwarzenegger and user may search for shwarsenegger.

Offensive Content Filter: Content having offensive meanings are filtered.

The search engine does have syntax and semantics around using above construct thus enabling smart search engine.


Thursday, April 11, 2013

Troubleshooting Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper.dll Issue.

Recently my team was struggling lot on Microsoft.CommerceServer.Internal.ContentListHelper.dll version issue related to 32 x86 vs 64 bit AMD . Well how this came up. We had VS2010 installed with commerce server 2007(upgraded to 2009). Later we planned to migrate out VS IDE to V2012 for better ALM activity. What popups for our surprise was this issue.

Bad Image or something.... Remember its kind of rise of DLL hell..

"Could not load file or assembly 'Microsoft.CommerceServer.Internal.ContentListHelper' or one of its dependencies. An attempt was made to load a program with an incorrect format."

http://social.msdn.microsoft.com/Forums/en-US/commserver2007/thread/526f70f8-35bb-4221-b9cd-73406d202aa2/

The solution says that you remove the dll from bin folder and it will work fine. But the nightmare is it will appear every time you rebuilt the solution.

Here is the few workaround.

1) Remove reference from Registry.
Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper.dll
Go to Regedit /> look for HKEY_Classes_Root->Installer->Assemblies->Global->Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper

2) Go c:/windows/assembly/ uninstall Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper

3) Go to C:\Program Files (x86)\Microsoft Commerce Server 2007\Assemblies and remove
Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper

Now you can built your solution flawlessly. As per my research and understanding  Microsoft.CommerceServer.runtime contains this referenced dll Microsoft Commerce Server Microsoft.CommerceServer.Internal.ContentListHelper.

Do post your comments, if your problem is resolved by this. Take care ..Bye for now.


Tuesday, April 9, 2013

Troubleshoot Remote Desktop access Win 2008 R2 VM Hyper-V

Recently I setup virtual machines in Hyper-V windows 2008 R2 Sp1. I faced problem  accessing virtual machine through remote access RDP(Run ->Mstsc). The access denied , remote server not available or remote service is not enabled message it flashed as dialoq.

Troubleshooting Steps.
  1. In server manager I checked whether the Domain Profile is connected state. With windows firewall off.
  2. Note. There are three profile Domain, Public and private profile.
  3. I check Remote Desktop Enabled. If not then one has to configure remote desktop option.
  4. Check whether server is bind with the domain network not configured as workgroup/workstation.
Now verify the pulse between two system ..establishing connectivity check
Remote server to client machine.

Get CMD-> Ipconfig
Ping Ip address.

Then type arp-a command to check the node connectivity.

If any problem with this then above steps are not followed properly. There are other ways to activate remote access with lookup in Group Policy.

By for now..

Refresher: Watch out this movie  He's just not into me Cast Jennifer Aniston, Bradley cooper , Ben Affleck .........

Sunday, April 7, 2013

VS2012 Memory Profiling Insights.

Here is why you must look for VS2012 memory Profiling. Apparently Tier Interaction VS2010 has done good job however memory profiling was not that profound as it is in VS2012. For more information you can check out http://blogs.msdn.com/b/dotnet/archive/2013/04/04/net-memory-allocation-profiling-with-visual-studio-2012.aspx

The purpose of this diagnostic tool is to find two essential problems in given system.

1. Memory Leaks- The unrooted memory referenes are freed by GC. Sometimes it may happen there are memory that are no longer used and still have rooted references are still not clear or handles such cases can be figured out through this tool.


2. Unwanted Allocation: Rule- More memory allocated more frequent GC happens.More objects survice GC collects, More GC operations performed to check null object references. Unwanted allocations by program may lead to unneccessary GC operations which latter adds up to the performance of the applications.

One can also look at Red Ant Profiler tool and Perf

Wednesday, April 3, 2013

IIS Log and Http.sys Tips and Tricks



why can't I see IIS logs written immediately after a request?

The anwer is that the HTTP.SYS buffers the IIS logs and flushes to the disk every 60 seconds because of performance issues.

If you are running IIS 7.0 or IIS 7.5 and if you want to flush the HTTP.SYS buffer to the disk immediately, you can open a command prompt and run the following command:

netsh http flush logbuffer

http://blogs.msdn.com/b/amb/archive/2011/12/06/why-does-not-iis-log-requests-immediately.aspx