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

Unable to override error S00011:15404 #2275

Closed
esauser opened this Issue Jan 24, 2019 · 8 comments

Comments

Projects
None yet
2 participants
@esauser
Copy link

esauser commented Jan 24, 2019

Which version and edition of Flyway are you using?

5.2.4 Pro

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)

Command-line

Which database are you using (type & version)?

MSSQL 2017 Linux Docker Container:latest

Which operating system are you using?

Linux Alpine:5.2.4-alpine

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.)
flyway migrate with a migration containing EXECUTE AS USER = '[SOME DOMAIN USER]' with the following errorOverrides:

 flyway.errorOverrides=S0001:15151:I,S0001:15401:I,S0011:15404:I
# S0001 - 15151: Cannot alter the login '', because it does not exist or you do not have permission.
# S0001 - 15401: Windows NT user or group '' not found. Check the name again.
# S00011 - 15404: Could not obtain information about Windows NT group/user '', error code 0x4bc.
What did you expect to see?

An informational message in regard to S0011:15404.

What did you see instead?

ERROR: Invalid error override (should look like STATE:12345:W ): S00011:15404:I

If I remove that error override I get that following

ERROR: Migration of schema [dbo] with repeatable migration [MIGRATION_NAME] failed! Changes successfully rolled back.
ERROR: 
Migration [MIGRATION_FILE] failed
-----------------------------------------------------------------------
SQL State  : S00011
Error Code : 15404
Message    : Could not obtain information about Windows NT group/user '[USER_NAME]', error code 0x4bc.
Location   : /flyway/sql/test/stored-procedures/R__z_dbo.[MIGRATION_FILE] (/flyway/sql/test/stored-procedures/[MIGRATION_FILE])
Line       : 1
Statement  : EXECUTE AS USER = '[USER_NAME]'

Domain users are not yet supported on Linux SQL so we are on a trial for PRO only to take advantage of this feature locally to see if it will allow us to ignore these errors locally. For whatever reason, Flyway doesn't like this one.

@esauser

This comment has been minimized.

Copy link
Author

esauser commented Jan 25, 2019

It is a 5 character SQL state

This needs to support at least 6 characters.

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Jan 25, 2019

Interesting! SQL State is actually defined as 5 chars in the SQL standard.

Do you have a link to SQL Server docs where these 6 char variants are defined?

@esauser

This comment has been minimized.

Copy link
Author

esauser commented Jan 25, 2019

No, I only know what I'm seeing here, and the apparent inability to ignore it.

I tested this in a few IDEs below. They all show different information than Flyway. Perhaps it's the driver interpretation? In any case, this blocks us from proceeding with the POC we are doing on the trial for PRO. Will we be able to get our time extended once we have a resolution to this?

DataGrip
image

SSQL Server Management Studio
image

SQL Operations Studio
image

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Jan 25, 2019

Could you share a small SQL file that triggers this? I'd like to integrate this in our test suite.

@esauser

This comment has been minimized.

Copy link
Author

esauser commented Jan 25, 2019

@axelfontaine I'm able to reproduce it with any domain-like user. The following will do it.

EXECUTE AS USER = 'DOMAIN/USER'
@esauser

This comment has been minimized.

Copy link
Author

esauser commented Jan 25, 2019

I see you added 6.0.0 as the milestone, when do you expect to release that? I see 1/29 here, but there are still 83 issues to go. Will it be possible for us to extend our trial? This is the only feature we were looking for in PRO.

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Jan 25, 2019

@esauser We don't expect 6.0 to be delayed too much, if at all. Whatever isn't ready will be pushed back to 6.1. Simply request a new trial key until then.

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 8, 2019

We have now loosened the rules for this as a workaround. I still believe this is an issue in the Microsoft driver and have filed an issue with them as well to get this issue's root cause resolved eventually.

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.