To create triggers in an RDS for SQL Server database, the database user will need certain privileges. Since RDS manages the underlying infrastructure, some advanced privileges like SUPER are restricted.
Some options to consider:
Grant the database user privileges like VIEW DEFINITION, CREATE PROCEDURE etc. This can be done by first creating a database user, then granting the required privileges.
CREATE LOGIN username WITH PASSWORD 'password';
USE database; CREATE USER username FOR LOGIN username;
GRANT VIEW DEFINITION TO username; GRANT CREATE PROCEDURE TO username;
Consider using stored procedures instead of triggers, if the use case allows. Stored procedures can achieve similar functionality without requiring advanced privileges.
The options may be limited since RDS is a managed service.
- Accepted Answerasked 4 years ago
- Accepted Answerasked 7 months ago
- How can I receive a notification when a deadlock event occurs on my Amazon RDS SQL Server DB instance?AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- EXPERTpublished 10 months ago