Bitbucket Server throws the error: "-1 rows were updated instead of the expected 1 row" when migrating to MS SQL Server
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
When migrating to Microsoft SQL Server, the following appears in the atlassian-bitbucket.log
"POST /admin/db/edit HTTP/1.1" liquibase Could not release lock
liquibase.exception.LockException: liquibase.exception.LockException: Did not update change log lock correctly.
-1 rows were updated instead of the expected 1 row using executor liquibase.executor.jvm.JdbcExecutor there are 1 rows in the table
...
Caused by: liquibase.exception.LockException: Did not update change log lock correctly.
-1 rows were updated instead of the expected 1 row using executor liquibase.executor.jvm.JdbcExecutor there are 1 rows in the table
原因
NOCOUNT
is set ON
ソリューション
Ensure that the SET NOCOUNT option is turned off. You can do that in SQL Server Management Studio as follows:- Navigate to Tools > Options > Query Execution > SQL Server > Advanced. Ensure that the SET NOCOUNT option is cleared.
- Now, go to the Server > Properties > Connections > Default Connections properties box and clear the no count option.
参考:
最終更新日 2018 年 11 月 2 日
Powered by Confluence and Scroll Viewport.