How to Handle Trigger-Driven Cross-Database Record Transfer with Nonexistent Users in SQL Server

49 views Asked by At

I have a situation where I have a table in a SQL Server database, and this table has a trigger that, upon a user deleting a record, transfers that record to another database on the same server. However, I'm facing an issue where if the user doesn't exist on the target database, it results in an access error.

I'd like to find a solution that doesn't involve creating user accounts for each user on the target database since the number of users is quite extensive.

Is there a way to handle this scenario gracefully without encountering access errors when transferring records between databases in SQL Server?

0

There are 0 answers