How to increase information in SQL Server's logs?

27 Views Asked by At

I'm working on a DLL, who is doing some cleaning of objects in my database. This DLL depends on an executable.

I see that the deletion of one object in database also causes the deletion of another object (of the same type), and I would like to know why this happens. (More "exactly", when I delete the object with Id "140043", also the object with Id "140047" gets deleted).

I believe this is caused by the mentioned application, but I'm not capable of finding out why.

Hence I would go for another approach and see in the SQL Server log what is happening, because I see two possibilities:

  1. Either the delete Order where Id=140043 is followed by delete Order where Id=140047. In that case, I learn nothing.
  2. Either the delete Order where Id=140043 is followed by a delete Order where Id in (Select whatever from other_table where Id=140043). That would be the key of solving my problem!

In order to see that, the deletion of a tupple in a database table should be added into the SQL Server's log, which is not the case right now.

Does anybody know how to configure my SQL Server instance in order to include all actions in the SQL Server log?

The deletion happens as follows: (a typical piece of Telerik-based database handling)

database.RemoveObject(current_obj);
database.SaveChanges(); // After this is finished for Id 140043,
                        // I see that the other object is deleted too.

My entire SQL Server database is configured, based on my source code (that's how Telerik works), hence I hope that the configuration of the SQL Server log can also be done in my source code, which looks as follows:

namespace <Firm>.<Customer>.Server.OpenAccess
{
    [Export(typeof(MetadataSource))]
    class DataMetadataSource : FluentMetadataSource
    {
        ...
0

There are 0 best solutions below