Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The procedures 'sp_serveroption' and 'sp_droplinkedsrvlogin' cannot be executed within a transaction #2298

Closed
CobraFlow opened this Issue Feb 7, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@CobraFlow
Copy link

CobraFlow commented Feb 7, 2019

Which version and edition of Flyway are you using?

flyway-maven-plugin:5.2.4

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

maven

Which database are you using (type & version)?

SQLServer

Which operating system are you using?

Ubuntu

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Executing SP_SERVEROPTION or SP_DROPLINKEDSRVLOGIN

Fix:-
Add |(EXEC .*SP_SERVEROPTION) |(EXEC .*SP_DROPLINKEDSRVLOGIN) to the NON_TRANSACTIONAL_STATEMENT_REGEX in SQLServerSqlStatementBuilder.java

What did you expect to see?

[INFO] Executing SQL callback: beforeMigrate [non-transactional]

and BUILD SUCCESS

What did you see instead?

SQL State : S1000
Error Code : 15002
Messsage : The procedure 'sys.sp_serveroption' cannot be executed within a transaction.

and

Message : The procedure 'sys.sp_droplinkedsrvlogin' cannot be executed within a transaction.

@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Feb 7, 2019

@axelfontaine axelfontaine added the m: Core label Feb 7, 2019

@axelfontaine axelfontaine changed the title Add more non-transactional statements for SQL Server The procedures 'sp_serveroption' and 'sp_droplinkedsrvlogin' cannot be executed within a transaction Feb 7, 2019

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Feb 7, 2019

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 7, 2019

Thanks for reporting and analyzing! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.