Create the Table to track Logons

We will add a Table in the Database to store all the Logon attempts for a specific user.

UserLogonHistory

This Table has these fields

  • ID: Autoincrement Integer internal database field as Primary Key
  • LogonDataTime: Timestamp on when the Login was attempted
  • UserID: Foreign Key, referencing the ID field of the User Table.
  • Message: String discribing what happened.

Follow this link to see the SQL Server script: Table Structure to store Login History

Advertisements