Is there a way to prevent triggers from being turned on?

I have a trigger on a table that should never be disabled. It performs certain checks, and there have been times when other developers have disabled it to get around it. This is not good, so I want to disable trigger uninstall only in this table. Is it possible? If not, any suggestions please. thank.

Workaround: Looks like from reviews that cannot be prevented. Perhaps a warning would be appropriate. This is a good article; shame, however, does not work with EventData. Perhaps in 2008 this was allowed: http://www.simple-talk.com/sql/database-administration/dml-trigger-status-alerts/

+3
source share
7 answers

No. Disabling is an administrator operation and, as such, cannot be prevented. You can check if triggers are disabled by code ..., but disabling is possible.

It makes sense even for developers (during debugging).

+2
source

You have no technical problem, you have a social problem.

Who are these "other developers"?

Why do they set up triggers?

What is their purpose?

What happened to the trigger?

You should talk to them and find out what their problem is.

Do not waste time looking for a technical "solution" that will only make the problem more complicated or complex. Find people. Talk to them.

+7
source

, , , DDL

  • sack/shoot/ ,
+5

. , prod, -, select.

(-), ? ? ? - , ?

, , (.. ), , , .

, . , .

. , 1, 1, , stament, , , . reset null.

, , , , , .

" " , , , .

+3

HLGEM. , , , . . "", , . , - . , , , , , , .

+2

Perhaps you can create another user, provide a new one, or add selection / insert / update / delete to additional tables. Or you can deny access to triggers to your user who owns the tables.

+1
source

Whenever possible, use restrictions and be convinced that they are trusted.

0
source

Source: https://habr.com/ru/post/1750460/


All Articles