Wednesday, January 6, 2016

Retrieving Object Defination

Using below methods we can retrieve object defination of particular database.


Exec Sp_help text 'Object name'
OBJECT_DEFINITION ( object_id )

select so.name,definition from sys.sql_modules sm, sys.objects so where sm.object_id=so.object_id

INFORMATION_SCHEMA.ROUTINES:
Returns one row for each stored procedure and function that can be accessed by the current user in the current database. The columns that describe the return value apply only to functions. For stored procedures, these columns will be NULL.

Tuesday, January 5, 2016

What's the strongest HASH SQL Server 2014

Source: SQL Server Central QOD Jan st 2016.

The HASHBYTES function in SQL Server returns a hash of a string. In SQL Server 2014, the strongest algorithm is the SHA2 algorithm at 512 bytes.

Ref: HASHBYTES - https://msdn.microsoft.com/en-us/library/ms174415.aspx