To determine the reason for the message " A system maintenance is running", you can use the following SQL statement:
There are 3 possible reasons for this:
1. If it still returns "Triggers disabled" there MUST be disabled triggers.
Check for disabled triggers:
-- show disabled triggers
o.name as 'Table',
t.name as 'Disabled trigger'
from sys.objects o
join sys.triggers t on o.object_id = t.parent_id
o.type in( 'U' )
and t.is_disabled = 1
An "exec QBM_PTriggerEnable" would solve this.
2. Another possible reason is "Constraints disabled". In which case the following SQL can be used to repair it:
3. And the third possible reason would be the database is in "Single user" mode.