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

DatabaseMetaData.getDatabaseProductVersion should return the DB edition too. #1474

Open
JSamir opened this issue Dec 6, 2020 · 7 comments
Open
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.

Comments

@JSamir
Copy link

JSamir commented Dec 6, 2020

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it

We have some code that does different stuff depending on the DB being enterprise or standard edition. For oracle we can use getDatabaseProductVersion which returns the edition too, it would be good if sqlserver would to the same.

Describe the preferred solution

Have "Standard/Enterprise Edition" within the version string.

@JSamir JSamir added the Enhancement An enhancement to the driver. Lower priority than bugs. label Dec 6, 2020
@mprins
Copy link

mprins commented Dec 6, 2020

@JSamir
Copy link
Author

JSamir commented Dec 7, 2020

I would also rather expect the information about the edition to be returned by getDatabaseProductName, I have mentioned the other method only because in case of oracle it is returned by that method.

According to my test none of the methods returns the database edition. Do you get the edition as part of getDatabaseProductName?

@mprins
Copy link

mprins commented Dec 7, 2020

but you've asked for a modification of getDatabaseProductVersion and not getDatabaseProductName

as you can see in the code getDatabaseProductName returns a hardcoded stringinstead of return what select @@version produces.

see also https://sqlhints.com/tag/sql-version-to-product-name-mapping/

@JSamir
Copy link
Author

JSamir commented Dec 7, 2020

I've asked for the modification of getDatabaseProductVersion because oracle is putting the edition information in there already, but I do agree that it should have been getDatabaseProductName all along.

And yes, I already looked up getDatabaseProductName and noticed that it returns a hard coded string.

In any case I would like to have the information about the DB edition, regardless of the method that returns it.

@ulvii
Copy link
Contributor

ulvii commented Dec 7, 2020

Is the suggestion to return @@VERSION from getDatabaseProductName()?

@JSamir
Copy link
Author

JSamir commented Dec 7, 2020

@ulvii Yes.

@ulvii
Copy link
Contributor

ulvii commented Dec 8, 2020

Thanks @JSamir , we will look into this.

@github-project-automation github-project-automation bot moved this to To be triaged in MSSQL JDBC Aug 28, 2024
@Jeffery-Wasty Jeffery-Wasty moved this from To be triaged to Backlog in MSSQL JDBC Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.
Projects
Status: Backlog
Development

No branches or pull requests

3 participants