0

In order to audit logins I've used before a server level trigger catching the LOGON and saving it to a table, there are endless examples to do this.

But trying to do the same on and AWS RDS sqlserver instance fails with error Cannot create the trigger 'LogLogons', because you do not have permission.. I've full sysadmin permission. I've read and checked other questions and sites, there are references to mysql and log_bin_trust_function_creators parameter that needs to be enabled and some other things (Can I CREATE TRIGGER in an rds DB?) but for MS SQL Server can't find a confirmation wether server level triggers can be created or not.

Found this but is not clear if logon triggers can be created or not.

CREATE TRIGGER LogLogons ON ALL SERVER WITH EXECUTE AS 'authorized_login' FOR LOGON AS
INSERT DBA.dbo.loginaudit
DEFAULT VALUES;
--DROP TRIGGER LogLogons ON ALL SERVER;
asked May 29, 2024 at 15:15
1
  • I know about Audits but wanted to first try the common and long used approach that doesn't overcomplicating things creating a parameter group and restarting the service on the console. But as you see on the accepted answer, I was wrong as server-level triggers are just not supported on RDS. So yes, Audit it is. Commented May 30, 2024 at 7:17

1 Answer 1

2

Amazon's documentation for Amazon RDS for Microsoft SQL Server lists Server-level Triggers under the category of "The following Microsoft SQL Server features aren't supported on Amazon RDS".

Features not supported and features with limited support

The following Microsoft SQL Server features aren't supported on Amazon RDS:

...

  • Server-level triggers

...

answered May 29, 2024 at 15:52
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.