For example, a user logs in and sets his status in SQL Server to active. While using the program, it suddenly blacks out. The status in SQL Server remains active. When the user logs in again, he can’t access the same account in the program because in SQL Server the status remains active.
How can I set the status to inactive during blackouts?
Unlike oracle there are (sadly) no logout triggers in SQL Server; only log in triggers. Assuming your issue is a flag that should have been set during the log out process you could do this one of two ways
Reset it using a logon trigger (this assumes your sessions have persistent connections otherwise it would go all over the place) or reset it using a log out trigger alike hack that Jim Mcleod documented.