sql-server-2012hashbytes

SHA2_256 Hashbytes generating different value on SQL Server 2012 with different version


I am facing a weird problem, I have one source - SQL Server 2012 with version no. 10.5.1753.0 - where hashbyte SHA2_256 is generating a null value.

On the other hand, I have another source - SQL Server 2012 with version no. 11.0.3000.0 - where hashbyte SHA2_256 is generating some value.

I have to deal with this problem, where I can't put request to source owner to upgrade their version and still I need to pull records from this source.


Solution

  • Versionnumber 10.5.1753.0 belongs to SQL Server 2008 R2 and not 2012.

    SHA256 is only supported in SQL Server 2012+.

    (BTW 10.5.1753.0 is a pretty old version back from 2010 and 11.0.3000.0 is from 2012. They really should be updated.)