Error: Invalid column name 'ObjectStructureCheck_id'
search cancel

Error: Invalid column name 'ObjectStructureCheck_id'

book

Article ID: 152518

calendar_today

Updated On:

Products

ServiceDesk

Issue/Introduction

After an Incident Managment ticket has been escalated the ticket description reads 'Incident Failed'.  Attempts to Resolve the incident are met with a page that displays an error similiar to the one below.  The page also gives the option to return to process or create a new incident.  Both options result in an application error with the an error similiar to the one below.

Error,Tuesday, June 29, 2010 12:15:46 AM,System.Exception: Could not insert or update.  insert error message: Invalid column name 'ObjectStructureCheck_id'.
 update error message: Invalid column name 'ObjectStructureCheck_id'. ---> System.Data.SqlClient.SqlException: Invalid column name 'ObjectStructureCheck_id'.
   at System.Data.SqlClient.SqlConnection.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 LogicBase.Core.Messaging.Implementations.InsertStatement.Execute(SqlConnection conn, SqlTransaction tr)
   at LogicBase.Core.Messaging.Implementations.InsertOrUpdateStatement.RunInsertStatement(SqlConnection conn, SqlTransaction tr)
   at LogicBase.Core.Messaging.Implementations.InsertOrUpdateStatement.Execute(SqlConnection conn, SqlTransaction tr)
   --- End of inner exception stack trace ---
   at LogicBase.Core.Messaging.Implementations.InsertOrUpdateStatement.Execute(SqlConnection conn, SqlTransaction tr)
   at LogicBase.Core.Messaging.Implementations.RelationalMapperExchange.SaveObject(Object o)
 

Cause

This is caused by the ObjectStructureCheck_id column in the ObjectStructureCheck table being renamed.  The root cause is unknown.

Resolution

To resolve this issue please follow the steps below.

  1. Open SQL Management Studio and run the query below against the Ensemble database used by ServiceDesk.

    Select * from ObjectStructureCheck

  2. Note the name of the column that starts ObjectStructureCheck_id.
  3. Backup your Ensemble Database.
  4. Run the stored procedure below to rename the column back to the default of ObjectStructureCheck_id.  The first line gives the syntax, the second line is an example. 

    sp_rename 'TableName.CurrentColumnnamefromstep2', 'ObjectStructureCheck_id', 'COLUMN'

    sp_rename 'ObjectStructureCheck.ObjectStructureCheck_id_old_20100614104312', 'ObjectStructureCheck_id', 'COLUMN'

  5. Test the change by attempting to return the failed incidents to process. 

Applies To

ServiceDesk 7.0