Błąd – PK_SynchronizationLocks

#Subiekt GT

Jeżeli po instalacji nowej wersji nie można uruchomić programu to pomaga usunięcie tabeli dbo.SynchronizationLocks

Mozart, 1.11.138.127: DevExpress.Xpo.DB.Exceptions.UnableToCreateDBObjectException: Unable to create ‘PrimaryKey’ ‘PK_SynchronizationLocks’. Parent: ‘SynchronizationLocks’. Error: Executing Sql ‘alter table “dbo”.”SynchronizationLocks” add constraint “PK_SynchronizationLocks” primary key (“LockKey”)’ with parameters ” exception ‘System.Data.SqlClient.SqlException (0x80131904): Cannot define PRIMARY KEY constraint on nullable column in table ‘SynchronizationLocks’.
Could not create constraint or index. See previous errors.
w System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
w System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
w System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
w System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
w System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
w DevExpress.Xpo.DB.ConnectionProviderSql.<>c__DisplayClass2.<InternalExecSql>b__0()
w DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler`1 handler, MessageHandler`1 createMessageHandler)
w DevExpress.Xpo.DB.ConnectionProviderSql.InternalExecSql(IDbCommand command)
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecSql(Query query)
ClientConnectionId:f1a33ddd-6760-423a-92f5-d4e85f4ac9e1
Error Number:8111,State:1,Class:16′ —> DevExpress.Xpo.DB.Exceptions.SqlExecutionErrorException: Executing Sql ‘alter table “dbo”.”SynchronizationLocks” add constraint “PK_SynchronizationLocks” primary key (“LockKey”)’ with parameters ” exception ‘System.Data.SqlClient.SqlException (0x80131904): Cannot define PRIMARY KEY constraint on nullable column in table ‘SynchronizationLocks’.
Could not create constraint or index. See previous errors.
w System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
w System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
w System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
w System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
w System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
w DevExpress.Xpo.DB.ConnectionProviderSql.<>c__DisplayClass2.<InternalExecSql>b__0()
w DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler`1 handler, MessageHandler`1 createMessageHandler)
w DevExpress.Xpo.DB.ConnectionProviderSql.InternalExecSql(IDbCommand command)
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecSql(Query query)
ClientConnectionId:f1a33ddd-6760-423a-92f5-d4e85f4ac9e1
Error Number:8111,State:1,Class:16′ —> System.Data.SqlClient.SqlException: Cannot define PRIMARY KEY constraint on nullable column in table ‘SynchronizationLocks’.
Could not create constraint or index. See previous errors.
w System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
w System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
w System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
w System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
w System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
w System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
w DevExpress.Xpo.DB.ConnectionProviderSql.<>c__DisplayClass2.<InternalExecSql>b__0()
w DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler`1 handler, MessageHandler`1 createMessageHandler)
w DevExpress.Xpo.DB.ConnectionProviderSql.InternalExecSql(IDbCommand command)
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecSql(Query query)
— Koniec śladu stosu wyjątków wewnętrznych —
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecSql(Query query)
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecuteSqlSchemaUpdate(String objectTypeName, String objectName, String parentObjectName, String textSql)
— Koniec śladu stosu wyjątków wewnętrznych —
w DevExpress.Xpo.DB.ConnectionProviderSql.ExecuteSqlSchemaUpdate(String objectTypeName, String objectName, String parentObjectName, String textSql)
w DevExpress.Xpo.DB.ConnectionProviderSql.CreatePrimaryKey(DBTable table)
w DevExpress.Xpo.DB.ConnectionProviderSql.ProcessUpdateSchema(Boolean skipIfFirstTableNotExists, DBTable[] tables)
w DevExpress.Xpo.DB.DataStoreSerializedBase.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, DBTable[] tables)
w DevExpress.Xpo.DB.ConnectionProviderSql.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, DBTable[] tables)
w DevExpress.Xpo.SimpleDataLayer.UpdateSchema(Boolean dontCreate, XPClassInfo[] types)
w DevExpress.Xpo.SimpleObjectLayer.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, XPClassInfo[] types)
w DevExpress.Xpo.Session.UpdateSchema(Boolean dontCreateIfFirstTableNotExist, XPClassInfo[] types)
w DevExpress.Xpo.Session.UpdateSchema(Assembly[] assemblies)
w Mozart.Baza.Core.FabrykaSesjiXpo.GetDataLayer() w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Core\FabrykaSesjiXpo.cs:wiersz 102
w Mozart.Baza.Core.FabrykaSesjiXpo.get_DataLayer() w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Core\FabrykaSesjiXpo.cs:wiersz 52
w Mozart.Baza.Core.FabrykaSesjiXpo.PobierzNowaSesje() w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Core\FabrykaSesjiXpo.cs:wiersz 31
w Mozart.Baza.Param.get_Sesja() w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Progs\Param.cs:wiersz 31
w Mozart.Baza.Param.getParam() w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Progs\Param.cs:wiersz 356
w Mozart.Baza.Db.Login(Boolean argCzyWybracBaze, String operatorNazwa, String operatorHaslo) w G:\Source codes\!MozartAktualny\code\Mozart.DAL\Baza\Progs\Db.cs:wiersz 1936
w Mozart.App.Start(String[] args) w G:\Source codes\!MozartAktualny\code\Mozart.GUI\Progs\App.cs:wiersz 293

Scroll to Top