I already logged thrown exceptions to text file , now i want to log them to MS Sql database but i couldn't find clear sample to perform this task.
You can configure a DatabaseTraceListener.
DatabaseTraceListener