Summary
When modifying the TMCM/Apex Central log maintenance settings, the following error appears:
Description: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
Exception Type: System.InvalidOperationException
Source File: System.Data
Stack Trace:
at System.Data.Common.DbDataAdapter.UpdatingRowStatusErrors
(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow) at System.Data.
Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable,
DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at Administration_admin_LogMaintainence.BtnSave_Click(Object sender, EventArgs e) in d:\Trend\Control
Manager\WebUI\WebApp\Administration\admin_LogMaintainence.aspx.cs:line 196
at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBack
vent(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)
This error happens because of a missing primary key in the TMCM/Apex Central database.
To resolve this issue, get the TMCM/Apex Central database and submit it to Trend Micro Technical Support for analysis:
- Stop the following services:
- Trend Micro Management Infrastructure
- Trend Micro Common CGI
Trend Micro Common CGI is not available in TMCM 7.0 and Apex Central.
- Trend Micro Control Manager
- Trend Micro NTP
- Log on to the SQL server using Management Studio.
- Right-click db_ControlManager and click Properties > Data Files . This shows the location of the db_controlmanager.mdf database file.
- Right-click db_ControlManager and click Detach database.
- Copy the db_controlmanager.mdf file and send it to Trend Micro Technical Support.
- Re-attach the TMCM/Apex Central™ database again:
- Log on to the SQL server using Management Studio.
- Right-click Databases and click Attach. The Attach Databases dialog box opens.
- Locate the db_controlmanager.mdf database file and click Add. Sample location: .. \MSSQL\DATA\ db_controlmanager.mdf