You can log alarms to SQL Server, Oracle, Access, mySQL, and CSV files based on event, continuously, time of day, or on data change.
By using the product OPC Alarm.NET this is easy to setup.
View the following for a quick tutorial on alarm logging.
Other resources for Alarm Logging:
View the following video on setting up Alarm Limits.
View the Networking video for syntax on how to enable remote communications.
View the following troubleshooting video on how to investigate and resolve data logging issues that would also be common for alarm logging.