ibrahim-jarrar opened a new issue, #62046:
URL: https://github.com/apache/doris/issues/62046

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   4.0.3
   
   ### What's Wrong?
   
   When creating a JDBC Catalog for SQL Server using the **Microsoft JDBC 
Driver version 13.x** (e.g., **mssql-jdbc-13.2.1.jre11.jar**), the **dbo** 
schema is completely missing from the results of `SHOW DATABASES.`
   
   - Other custom schemas in the same database are visible.
   - Attempting to `USE dbo` or query via fully qualified names (e.g., `SELECT 
* FROM catalog.dbo.table`) returns a "database/table not found" error.
   - Critical contrast: The `query()` table function works perfectly and can 
retrieve data from `dbo.table`, proving that connectivity and permissions are 
correct.
   - Regression: The issue does not exist in **mssql-jdbc version 12.10.2** or 
earlier (e.g., 9.4.1).
   
   ### What You Expected?
   
   dbo Schema should work like any other schemas.
   
   ### How to Reproduce?
   
   1. Place `mssql-jdbc-13.2.1.jre11.jar` in the `custom_lib/` directory of FE 
and BE.
   2. Create a SQL Server JDBC Catalog:
   
   ```SQL
   CREATE CATALOG sqlserver_catalog PROPERTIES (
     "type" = "jdbc",
     "user" = "your_user",
     "password" = "your_password",
     "jdbc_url" = 
"jdbc:sqlserver://host:1433;databaseName=YourDB;encrypt=false",
     "driver_url" = "mssql-jdbc-13.2.1.jre11.jar",
     "driver_class" = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
   );
   ```
   
   3. Run metadata commands:
   
   ```SQL
   SWITCH sqlserver_catalog;
   SHOW DATABASES; -- Result: 'dbo' is missing
   ```
   
   
   ### Anything Else?
   
   **Reason for Failure**
   Microsoft changed the internal logic for getSchemas() and metadata discovery 
in the 13.x driver series to be more strictly JDBC-compliant. It appears that 
the current Doris JdbcClient for SQL Server does not correctly interpret the 
metadata response for the default dbo schema under this new driver version, 
causing it to be filtered out during synchronization.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to