I have been tasked with replicating functionality in place on our Oracle servers that captures the amount of time a user was logged in. The long-gone Oracle admin created a trigger that fired upon logout and recorded such things as how long the user was logged in. I have never done anything with triggers in SQL so am not even sure that a trigger is the best option. The purpose of this whole exercise is to be able to charge for SQL usage based on how long the user was logged in. Any ideas?