Error creating MS SQL Server Accounts

Document ID : KB000103384
Last Modified Date : 26/06/2018
Show Technical Document Details
Issue:
We talk about the static OOTB "MS SQL" endpoint type (not a dynamic ConnXP custom one). 
When trying to add a "MS SQL Login" via an account template or not, it fails with the following error message: 
"Bad SQL Grammar: The transaction ended in the trigger. The batch has been aborted" 
Environment:
IM r12.6.x version.
MS SQL server endpoint version is 2008 R2.
Cause:
We fail when running a "CREATE LOGIN" statement into a TRIGGER. 
Out Of The Box there is no trigger involved for this action.
Resolution:
Asked the DBA to check if a TRIGGER is involved when a "CREATE LOGIN" statement is issued.
Answered was yes.
There was a trigger executing on Create Login to check and validate the user author of the request.
They needed to add the IM MS SQL admin proxy user on their validated users list.