Can I alter Database Tables and Stored Proc used by Enterprise Library Semantic Logging Block

395 views Asked by At

I want to add some more columns to the defult database used by Semantic Logging SQLServerSink.

Can I alter Database Tables and Stored Proc used by Enterprise Library Semantic Logging Block.

If yes how , if no then what is the alternative solution..

Actually the payload column contains multiple properties I want to fire a SQL Query over those properties hence I want to store them into seperate columns. They automatically gets stored into seperate columns if we use AzureTableStorageSink.

2

There are 2 answers

0
Peter Bons On

You can alter the table and storedprocedure using this package: https://www.nuget.org/packages/SemanticLogging.Database.Xml/

For usage see https://github.com/DeHeerSoftware/SemanticLogging.Database.Xml

You cannot add custom columns but this sink stores the payload in an xml column which is easier to query: https://www.simple-talk.com/sql/learn-sql-server/sql-server-xml-questions-you-were-too-shy-to-ask/

0
gamepop On

To do this you will need to modify Enterprise library code , SqlDatabaseLog class or you can build a custom sink.