Search This Blog

May 13, 2008

How to know what are the triggers present in the Database

Execute the following statements in Sql Server Management Studio.


SELECT * FROM SYSOBJECTS
WHERE XType = 'tr'

To view the trigger code execute the following statement. Replace the <Trigger_Name> with actual trigger name


SP_HELPTEXT <Trigger_Name>

May 12, 2008

How to enable CLR in SqlServer

To use CLR(.Net) defined objects in SQL Server. We need to enable CLR functionality in SQL Server.

To enable CLR functionality in SQL Server, execute the following command in Sql Server Management Studio.

sp_configure 'clr enabled', 1
GO
Reconfigure
GO