Sql-server – SQL Server 2012, triggers missing after restore database

restoresql servertrigger

I am using MS SQL Management Studio 2012 to restore the database from a .bak file. (That file is from the backup of the database on server)

In my new database, the triggers are missing. Why did I lose the triggers?

Best Answer

A wild guess - are the triggers based on CLR code? If CLR Integration has not been enabled on the machine you are restoring to then the triggers won't work.

CLR Integration can be enabled with the following code.

exec sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
exec sp_configure 'clr enabled', 1;
GO
RECONFIGURE;
GO