Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error Clearing Event LogError Clearing Event Log
Previous
 
Next
New Post
2/20/2017 3:19 PM
 

My website is running on Azure and DNN Version 08.04.01.  When I attempt to clear the event log, I get the following constraint error in the database, which I think is a bug :

AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:6bacbc11-6d0c-4f68-af5f-f865fa893b03

AssemblyVersion:8.0.4

PortalId:0

UserId:1

TabId:239

RawUrl:/Admin/LogViewer

Referrer:http://thevwc.org/Admin/LogViewer

UserAgent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

ExceptionHash:Lv1O6q1fI/nMaVLCsu7nHQ==

Message:The DELETE statement conflicted with the REFERENCE constraint "FK_ExceptionEvents_EventLog". The conflict occurred in database "vwcorgASL2UCviemA_804P", table "dbo.ExceptionEvents", column 'LogEventID'. The statement has been terminated.

StackTrace:


 

InnerMessage:The DELETE statement conflicted with the REFERENCE constraint "FK_ExceptionEvents_EventLog". The conflict occurred in database "vwcorgASL2UCviemA_804P", table "dbo.ExceptionEvents", column 'LogEventID'. The statement has been terminated.

InnerStackTrace:

   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at PetaPoco.Database.Execute(String sql, Object[] args)
   at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteNonQuery(String connectionString, CommandType type, Int32 timeout, String sql, Object[] args)
   at DotNetNuke.Data.SqlDataProvider.ExecuteNonQuery(String procedureName, Object[] commandParameters)
   at DotNetNuke.Data.DataProvider.ClearLog()
   at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.ClearLog()
   at DotNetNuke.Services.Log.EventLog.LogController.ClearLog()
   at Dnn.Modules.LogViewer.LogViewer.BtnClearClick(Object sender, EventArgs e)
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Source:

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:

Server Name: RD000D3A601A0B


Regards
Hans
 
New Post
2/21/2017 9:07 AM
 
please read http://www.dnnsoftware.com/community-... (still suitable for all DNN versions up to 9.0.2)

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
2/21/2017 1:00 PM
 

Sebastain,

Thank you for the response.  Yes, I use your SQL routine...but I was just curious why the built-in capability is not working.


Regards
Hans
 
New Post
2/21/2017 7:31 PM
 
In DNN 7.4.0 and later, there is a foreign key constrained placed on Eventlog table, which prevents applying Truncate table.
You either need to drop the FK constraint (and reestablish afterwards) or und DELETE FROM table.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
2/21/2017 7:32 PM
 
IF delete from produces an error, check FK FK_ExceptionEvents_EventLog (in design view of ExceptionEvents table) and make sure, "Action on delete" is set to "cascade".

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error Clearing Event LogError Clearing Event Log


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out