Skip to main content

Varchar data type shows as "unknown" in Warehouse Catalog against SQL Server


Varchar data type shows as "unknown" in Warehouse Catalog against SQL Server

The issue with he varchar data type shows as Unknown in Warehouse Catalog against Microsoft SQL Server 2014 in MicroStrategy Developer 10.x
One possible cause is the custom SQL statement of retrieving column information is not correct. 
The resolution is to use default SQL statement instead of custom sql.
Possible cause could be:
One possible cause is custom SQL statement used to retrieve column information cannot retrieve data type correctly. 

To resolve the issue:
Click on "Use Default" in Warehouse Catalog>Options>Catalog>Read Settings>Settings as shown below:

SELECT S.name NAME_SPACE, T.name TAB_NAME, C.name COL_NAME, C.user_type_id DATA_TYPE, C.max_length DATA_LEN, C.precision DATA_PREC, C.scale DATA_SCALE 
FROM sys.all_objects T 
JOIN sys.columns C ON T.object_id = C.object_id 
JOIN sys.schemas S ON T.schema_id = S.schema_id 
WHERE T.name in (#TABLE_LIST#) 
ORDER BY 1, 2

Comments