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

Wrong syntax in mssql setup documentation #24893

Closed
1 of 2 tasks
Frank-T-Johansen opened this issue Jul 7, 2022 · 5 comments
Closed
1 of 2 tasks

Wrong syntax in mssql setup documentation #24893

Frank-T-Johansen opened this issue Jul 7, 2022 · 5 comments
Assignees
Labels
kind:bug This is a clearly a bug kind:documentation
Milestone

Comments

@Frank-T-Johansen
Copy link

What do you see as an issue?

https://airflow.apache.org/docs/apache-airflow/stable/howto/set-up-database.html#setting-up-a-mssql-database

Documentation says:
GRANT ALL PRIVILEGES ON DATABASE airflow TO airflow_user;

For MSSQL 2019 patchlevel 15.0.4236.7 the correct syntax is:
GRANT ALL PRIVILEGES ON DATABASE::airflow TO airflow_user;

Only the latter works, although I still get a warning that it is deprecated.

Solving the problem

Updating documentation with new alternative, maybe depending on mssql version.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Frank-T-Johansen Frank-T-Johansen added kind:bug This is a clearly a bug kind:documentation labels Jul 7, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 7, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@nigel-millward
Copy link
Contributor

Hi! I'm a newbie, I'll pick up this good-first-issue!

@uranusjr
Copy link
Member

uranusjr commented Jul 7, 2022

Go ahead!

nigel-millward pushed a commit to nigel-millward/airflow that referenced this issue Jul 9, 2022
In the 'set-up-databases' documentation the code block was not working on newer versions of mssql. Updated the docs so that the query works on supported 2017 and 2019 versions of mssql
@nigel-millward
Copy link
Contributor

All links below point to using new syntax
SQL patch: https://support.microsoft.com/en-us/topic/kb4518398-sql-server-2019-build-versions-782ed548-1cd8-b5c3-a566-8b4f9e20293a
2022 preview: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-database-permissions-transact-sql?view=sql-server-ver16
2019: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-database-permissions-transact-sql?view=sql-server-ver15
2017: https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-database-permissions-transact-sql?view=sql-server-2017

Airflow supports the following database engine versions
PostgreSQL: 10, 11, 12, 13
MySQL: 5.7, 8
MsSQL: 2017, 2019
SQLite: 3.15.0+

Tested on mssql 2017 and 2019, both worked fine with the new syntax
Updated docs to the later version

Created a PR: #24939

jedcunningham pushed a commit that referenced this issue Jul 9, 2022
In the 'set-up-databases' documentation the code block was not working on newer versions of mssql. Updated the docs so that the query works on supported 2017 and 2019 versions of mssql
@jedcunningham
Copy link
Member

Fixed in #24939.

@jedcunningham jedcunningham added this to the Airflow 2.3.4 milestone Jul 9, 2022
ephraimbuddy pushed a commit that referenced this issue Aug 15, 2022
In the 'set-up-databases' documentation the code block was not working on newer versions of mssql. Updated the docs so that the query works on supported 2017 and 2019 versions of mssql

(cherry picked from commit 335bd60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug kind:documentation
Projects
None yet
Development

No branches or pull requests

4 participants