MSSQL trigger to lower quarantine |
Post Reply |
Author | |
TechSquared
Newbie Joined: 01 March 2006 Location: United States Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 01 August 2007 at 7:01am |
Here is a trigger I had written to limit the quarantine to people that are actually checking it. Basically it checks the DB when a line is inserted into the quarantine table and marks it to be deleted if there is not a corresponding user in the logins table. It has saved me a ton of space for non-existent users, or users that don't check the quarantine. IF (SELECT COUNT(*) FROM [dbo].[tblLogins], [inserted] This is after an insert to the tblquarantine. It has worked wonders for me. Tech Squared |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.242 seconds.