• Dear Folks, 
    I know if condition is commented, because I was trying to put a condition with db state ONLINE, but unfortunately I cant capture the same with the help of below statement select @DBState= state_desc from master.sys.databases where name=@DatabaseName. can someone help me to fix this problem, 
    I just want to create a trigger which can prevent drop database (ONLINE) statement accidentally.