none
Violation of PRIMARY KEY constraint 'PK_MSP_PROJECT_CALENDARS'. RRS feed

  • Question

  • Hi!

    Our environment:

    Project Server 2010 (April 2011 CU)

    Project Professional 2010 (April 2011 CU)

    (Upgraded from Project Server 2007)

     

    If we open projects in the newly upgraded environment and save & publish the project, the following error appears in the ULS logs AND MS Project 2010 crashes with a "Publish failed" messagebox.

     PWA:http://pmtooltest/projectserver, ServiceApp:Project Server Service Application, User:FREQUENTIS-NT\KHOERMAN, PSI: [QUEUE] System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_MSP_PROJECT_CALENDARS'. Cannot insert duplicate key in object 'dbo.MSP_PROJECT_CALENDARS'.  The statement has been terminated.     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 Microsoft.Office.Project.Server.DataAccessLayer.DAL.SubDal.ExecuteStoredProcedureReturnVal(String storedProcedureName, SqlParameter[] parameters)     at Microsoft.Office.Project.Server.DataAccessLayer.ProjectDal.PublishProject(Guid projUID, Int32 lastPubRev, Int32 lastSumRev, Int32 state, Int32 opcode, Int32& value, String& stageName)     at Microsoft.Office.Project.Server.BusinessLayer.Queue.ProcessPublishMessage.ProcessPublishProjectMessage(Message msg, Group messageGroup, JobTicket jobTicket, MessageContext mContext)

    I already recreated the Enterpise Global completely.

     

    Any help would be appreciated!

    Thanks!

    Gerald Tauchner


    Gerald Tauchner
    Thursday, May 19, 2011 11:26 AM

Answers

  • Hi Gerald,

    could you perhaps try to create a new project using your new calendar. I have just learned the even if a calendar is not used any longer by a project, it is kept in some way with the project in Project Server 2010. So trying with a new project could give some more insight.

    Another possibility I have read about (similar error message, but with PS 2007 and caused by an incomplete EGlobal repair): in this case, an administrative backup and restore of Enterprise Calendars did help (as far as I know, this will also start a rebuild of RDB, so it will take some time and slow down your system in some way).

    But perhaps someone else had additional ideas? Another option is to call MS support.

    Regards
    Barbara

    Thursday, May 19, 2011 7:30 PM
    Moderator

All replies

  • Hi Gerald,

    there is an issue with a calendar used by your project(s). Do you get this error for all projects? What calendar are the using? What happens if you create a new enterprise calendar and use this one for an existing project?

    Regards
    Barbara

    Thursday, May 19, 2011 11:43 AM
    Moderator
  • Hi!

    Thanks for your response!

    I tried your suggestions right away.
    I created a new calendar, changed the calendar of an existing project and published it.

    There is no change, the error still happens.

    Any other suggestions?

    kind regards,

    Gerald


    Gerald Tauchner
    Thursday, May 19, 2011 11:59 AM
  • Hi Gerald,

    could you perhaps try to create a new project using your new calendar. I have just learned the even if a calendar is not used any longer by a project, it is kept in some way with the project in Project Server 2010. So trying with a new project could give some more insight.

    Another possibility I have read about (similar error message, but with PS 2007 and caused by an incomplete EGlobal repair): in this case, an administrative backup and restore of Enterprise Calendars did help (as far as I know, this will also start a rebuild of RDB, so it will take some time and slow down your system in some way).

    But perhaps someone else had additional ideas? Another option is to call MS support.

    Regards
    Barbara

    Thursday, May 19, 2011 7:30 PM
    Moderator