Not all databases listed in SQL Server datasource (only 4)


When I add a SQL server as datasource in Dremio Community edition Windows, I can only see 4 out of the many databases after establishing the connection to the server. Even when I explicitly give the databasename, still get the same result.

This does not occur with other tools such as e.g. dbvisualizer. Then I see all my databases correctly using the same connection configuration over JDBC.



Could you check server.log/server.out logs to see if there were errors that arose?


I get the following error in server.log, it seems the schema cannot be fetched, including the schema of the database I requested:

2018-07-24 15:46:46,804 [metadata-refresh-Order] WARN - Failed to fetch schema for [DBA-ADMIN, DBA-ADMIN, model, model, (... many databases), **SCORD**, (... more databases) ].


I am assuming it is likely a permission error. The tables need SELECT privileges in order for Dremio to get the metadata. Can you compare/contrast the user + table permissions on ones that are working properly and ones that are missing?


Hello, I doublechecked privileges in SQL Server, all seems correctly configured.

Also, from Dbvisualizer I use the same credentials and don’t have this error. The user has select privileges.

The user also has rights to read the INFORMATION_SCHEMA to get e.g. the list of tables etc.


I also tried from within the Dremio query panel on my ‘Order’ dataset:

FROM “Order”.“SCORD”.“Order”.“OrderItem”

I get nicely sampled results, and the database now appears (only with one table OrderItem though).

Very strange behaviour.




I have just updated to the newest version of Dremio (2.1.4), on Windows. The issue with the JDBC connection to read the full MS SQL server schema still persists.

Other Java applications like dbvisualizer do not have problems reading the entire information schema from the SQL Server.

The error message logged remains the same.

Any other clues how this can be fixed?


Can you share your full server.log please? @jduong any insight here?


@anthony you can find the full server.log attached here: (6,5 KB)


Hi @orlandob,

Is the name of the first missing database


? Do you have any database/schema names with special character sequences? Do these all hold regular tables/views only?


Hello @jduong

No this is not the case. In fact the order of the databases that are missing corresponds with the log file errors for “failed to fetch schema for…”.

e.g. BASE_AG4 is skipped before master, then model is skipped.

The SCORD databases are indeed missing, but are only a few of missing databases. Also SCMAT-NUM is being skipped even before the SCORD.

In SCMAT-NUM there are no special tables. I added the schema in (3,5 KB)

For BASE_AG4, it could, which is also skipped, could be expected, as in dbvisualizer (using the same mssql jdbc driver) the database is listed, but its schema cannot be read: because it is part of an availability group. However, it would be nice that Dremio can also notify when this is the case.

In DBVisualizer

An error occurred while performing the operation:
The target database, ‘BASE_AG4’, is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access.

For SCMAT-NUM I don’t get any errors in DBVisualizer.


@anthony @jduong any thoughts here?

I just did the test again with the new release 3.0. The issue persists.


Since the new update 3.06,

I also get the following error message:

I think somethings is going wrong with the ‘-’ still:

2019-01-07 09:00:32,335 [metadata-refresh-Order] WARN - Took longer than 5 seconds to query row count for TEST-TB.Order.Item, Using default value of 1000000000. Incorrect syntax near '-'.
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at$StmtExecCmd.doExecute( ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at ~[microsoft-sqljdbc41-4.2.6420.100.jar:na]
at [dremio-extra-plugin-jdbc-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-extra-plugin-jdbc-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-extra-plugin-jdbc-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-extra-plugin-jdbc-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-extra-plugin-jdbc-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at com.dremio.exec.catalog.SourceMetadataManager.refreshFull( [dremio-sabot-kernel-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at com.dremio.exec.catalog.SourceMetadataManager.doNextRefresh( [dremio-sabot-kernel-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at com.dremio.exec.catalog.SourceMetadataManager.access$200( [dremio-sabot-kernel-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at com.dremio.exec.catalog.SourceMetadataManager$ [dremio-sabot-kernel-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-common-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-common-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at [dremio-common-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at com.dremio.service.scheduler.LocalSchedulerService$ [dremio-services-scheduler-3.0.6-201812082352540436-1f684f9.jar:3.0.6-201812082352540436-1f684f9]
at java.util.concurrent.Executors$ [na:1.8.0_181]
at [na:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( [na:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ [na:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$ [na:1.8.0_181]
at [na:1.8.0_181]


Hi @orlandob

seems like the “-” is giving issues. Are you able to select from a different database that has no special characters in it?



Hi @balaji.ramaswamy

Yes I am,

and in fact when I add a table from this database with the ‘-’ in the name, I do have access to it, without problems and then it also appears in the list of databases of this server.

see previous post in this thread, where I used a query on a specific table, rather than browsing via the data source.


Hi @orlandob

This is a bug we are working on and not yet fixed. Is the table failing has many rows like 1B+?



Hi @balaji.ramaswamy

Not that many rows actually. But it is spread across different availibility groups as I mentioned (and included the schema by your request) here before: