A startup script might not have network access or write access to a SQL database. It might be better to create a scheduled task running under a domain account that performs the logging a certain amount of time after startup.
_________________________
There are two types of vessels, submarines and targets.