Closed nicolamarangoni closed 5 years ago
The available schemas are retrieved with DatabaseMetaData.getSchemas() this should work out of the box. Maybe it is a matter of metadata visibility. Have you tried selecting sys.schemas with that same user you are using in the virtual schema? Maybe some GRANTs are missing.
Privileges in MSSQL are OK because I can access the schemas and their tables with IMPORT using the same connection object (therefore the same user). That's why I suppose that it is a Virtual-Schema-specific issue.
I also have the impression that there is a datatype issue. A simple SELECT * FROM ...
gives this error:
Query execution failed
Reason:
SQL Error [42636]: ETL-3003: [Column=229 Row=16] [String data right truncation. String length exceeds limit of 21 characters] (Session: 1627876099131976898)
Could it depends on some issues with the character set recognition?
The DDL I get from MSSQL with Dbeaver has lines like this:
col0 nvarchar(40) COLLATE Latin1_General_CI_AS
The DDL I get from the table in the virtual scheme for the same column has this:
col0 VARCHAR(20) UTF8
IMPORT in a new physical table created by myself has no issues.
So it should be really an issue within the adapter.
The available schemas are retrieved with DatabaseMetaData.getSchemas() this should work out of the box. Maybe it is a matter of metadata visibility. Have you tried selecting sys.schemas with that same user you are using in the virtual schema? Maybe some GRANTs are missing.
With SELECT * FROM sys.schemas;
I don't get the wished shemas. So you're right, I have to ask for metadata visibility.
So since this is a permission problem in the MS SQLServer you are using, I will close this ticket.
I created the following adapter:
Then I created a connection using
SCHEMA_NAME = 'dbo'
. It works fine. However, when I setSCHEMA_NAME = 'export'
, I get to following error message:It looks like the adapter can only access the default MSSQL schemas like dbo, guest, sys, db_..., but not other created schemas.