Symptoms
When attempting to add or remove languages in the Security Patch Manager Preferences in versions prior to 9.0, the following error is received:
---Problem---
(s0m0):
---System exception---
Invalid object name 'SecurityPatchResourceProduct'.
---Source---
.Net SqlClient Data Provider
---Stack trace---
System.Data.SqlClient.SqlException: Invalid object name 'SecurityPatchResourceProduct'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ManageSoft.Database.DatabaseCommand.ExecuteNonQuery()
at ManageSoft.Database.Impl.DatabaseLayerBaseSql.Execute(CommandType p_Type, String p_CommandText, DatabaseParameter[] p_Parameters)
at ManageSoft.Database.Impl.DatabaseLayerBase.Execute(String p_StoredProcedure, DatabaseParameter[] p_Parameters)
at ManageSoft.SecurityPatch.Database.API.DataLayer.ResourcesDeleteByLanguageID(String p_LanguageID)
at ManageSoft.PatchManager.PropertiesDialog.PropertyDialog.LanguageControlUpdateDB()
at ManageSoft.PatchManager.PropertiesDialog.PropertyDialog.CommitToDatabase()
(s0m0):
---System exception---
Invalid object name 'SecurityPatchResourceProduct'.
---Source---
.Net SqlClient Data Provider
---Stack trace---
System.Data.SqlClient.SqlException: Invalid object name 'SecurityPatchResourceProduct'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ManageSoft.Database.DatabaseCommand.ExecuteNonQuery()
at ManageSoft.Database.Impl.DatabaseLayerBaseSql.Execute(CommandType p_Type, String p_CommandText, DatabaseParameter[] p_Parameters)
at ManageSoft.Database.Impl.DatabaseLayerBase.Execute(String p_StoredProcedure, DatabaseParameter[] p_Parameters)
at ManageSoft.SecurityPatch.Database.API.DataLayer.ResourcesDeleteByLanguageID(String p_LanguageID)
at ManageSoft.PatchManager.PropertiesDialog.PropertyDialog.LanguageControlUpdateDB()
at ManageSoft.PatchManager.PropertiesDialog.PropertyDialog.CommitToDatabase()
Cause
The ResourcesDeleteByLanugageID stored procedure has a reference to an old table (SecurityPatchResourceProduct) that was dropped in SPM 8.2, so attempting to remove languages in the SPM preferences results in the above error.
Resolution
To resolve this issue, please firstly backup the database, and then run the attached SQL script.
Comments