I created a Stored proc in oracle Database which accepts the following parameters. this stored proc adds the values to the table based on the request sent by the enterprise library Database trace listener

Timestamp Date,
      Message VARCHAR2,
      Category VARCHAR2,
      Priority int,
      EventID int,   
      Severity VARCHAR2,
      Title VARCHAR2,
      Machine VARCHAR2,       
      ProcessId varchar2,
      ProcessName VARCHAR2

and my formater in the web.config

<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        template="Timestamp: {timestamp}{newline}&#xA;Message: {message}{newline}&#xA;Category: {category}{newline}&#xA;Priority: {priority}{newline}&#xA;EventId: {eventid}{newline}&#xA;Severity: {severity}{newline}&#xA;Title:{title}{newline}&#xA;Machine: {localMachine}{newline}&#xA;ProcessId: {localProcessId}{newline}&#xA;Process Name: {localProcessName}"
        name="Text Formatter" />

I think I am sending the exact parameters to the Database using the formater from enterprise library but i always get a error "wrong number or types of arguments in call to 'WRITELOG'" So I am wondering if there is a way to see the command which Enterprise Library execute to call the stored proc so that i can see and fix the error. I followed the same method which is mentioned in the blog by Alex Oliveira

1

There are 1 answers

0
RookieRoll On

I dont know think we can see the request sent by the Entrprise library. But in the stored procedure you are missing the "out" parameter. The Database Trace listener sends a request and expects a response. so your stored procedures parameters should be something like this

EventID VARCHAR2,
      Priority VARCHAR2,
      Severity VARCHAR2,
      Title VARCHAR2,
      Timestamp Date,
      MachineName VARCHAR2,
      AppDomainName VARCHAR2,
      ProcessID VARCHAR2,
      ProcessName VARCHAR2,
      ThreadName VARCHAR2,
      Win32ThreadId VARCHAR2,
      Message VARCHAR2,
      FormattedMessage NCLOB,
       LogID IN OUT int