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

QUESTION: How can I see all databases in the MSSQL server? #236

Closed
luisxkimo opened this issue Feb 28, 2022 · 8 comments
Closed

QUESTION: How can I see all databases in the MSSQL server? #236

luisxkimo opened this issue Feb 28, 2022 · 8 comments

Comments

@luisxkimo
Copy link

Details:
I see that with the last versions of DB Gate, its needed new environment variable with default database name: DATABASE_connName.

For example, if I use "master" as default, then in the list of databases I cannot see the other created databases in the server, but exists because I can run queries on the other databases.

Version Information [might be relevant to your issue]
Screenshot 2022-02-28 091806

Screenshot [if appropriate]:
Screenshot 2022-02-28 094756

Additional info
Nothing

@janproch
Copy link
Member

It is not neccessary to specify database name with DATABASE_ environment variable. When you omit this variable, you will see all databases in DbGate interface.

@luisxkimo
Copy link
Author

luisxkimo commented Feb 28, 2022

Hi @janproch ,

Thanks for the quick reply. The thing is when we not use this variable, we se an error on the web:
image

And if we put the mouse over it says: "The config.options.database must be of type string"

Here is the log of the container:

Using connections from ENV variables:
[
  {
    "_id": "***",
    "engine": "mssql@dbgate-plugin-mssql",
    "server": "***",
    "user": "***",
    "password": "***",
    "port": "1433",
    "useDatabaseUrl": false,
    "defaultDatabase": null,
    "singleDatabase": false,
    "displayName": "***"
  }
]
Calling init controller for controller /connections
Creating directory /root/dbgate-data
Calling init controller for controller /config
Calling init controller for controller /scheduler
Creating directory /root/dbgate-data/files
Creating directory /root/dbgate-data/run
DbGate API listening on port 3000
....

image

@janproch
Copy link
Member

Intereseting, I am testing it now and it works.

Did it work in past? The only change in last version is using debian docker image instead of alpine, because of SQLite. But I tested it on both images, and it works.

Does it work with alpine image?
image: dbgate/dbgate:alpine

@janproch
Copy link
Member

OK, I replicated it just now

@janproch janproch reopened this Feb 28, 2022
@luisxkimo
Copy link
Author

Tested right now with dbgate:alpine and still not works

@janproch
Copy link
Member

janproch commented Feb 28, 2022

It should be fixed in newest BETA (few minutes old), in both alkine and debian image. I have replicated it with version from yesterday (it occured only when MSSQL run also in docker container, when connecting to MSSQL running under windows it worked)

Sorry for confustion.

@janproch
Copy link
Member

Fixed in 4.7.1

Thanks for reporting

@luisxkimo
Copy link
Author

Thanks so much for the quick fix @janproch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants