SQL Server 2017 - introspection level 3 doesn't refresh properly the column data types
Hi,
I am using the latest version of DG as of today, and DG doesn't seem to be able to refresh 100% the information from the database. After a refresh executed in DG - and I enabled Level 3 - it reports the data type of 2 fields I added via SSMS through another sql script as “UNKNOWN”.
How can I get DG to refresh properly?
Thanks!
DataGrip 2025.2.2
Build #DB-252.25557.34, built on August 14, 2025
Source revision: 4117552b950b5
Runtime version: 21.0.8+1-b1038.68 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Please sign in to leave a comment.
Hi,
Please can you clarify what these data types are? Am I correct that the data types were initiated by a statement executed via SSMS after you have introspected objects using Level 2 in DataGrip?
To investigate this issue, please collect the following logs and upload them onto our FTP https://uploads.jetbrains.com/
- database log in Help - Show SQL Log in Files
- introspector log
- diagnostic mode log, see here
Please include the upload id in your reply
No. I ran the sql script in SSMS. This sql script added 2 int columns to a table. Then I came back to DG. I changed the introspection level to 3. I right-clicked on the database and I executed Refresh. I had a sql script that creates a stored procedure opened in DG that referenced the table. I selected the table name and I pressed Ctrl+Q. DG displays the create table statement for that table. Instead of showing the field names and the types (both types are int), it showed the field names but the types were UNKNOWN, that is the string UNKNOWN, upper case.
Sorry, for privacy reasons I cannot upload the files. But I looked at the content of the model.xml file and what I can tell you is that the fields that are reported with UNKNOWN don't have the StoredType element. Other columns in that table do have, for instance, <StoredType>int|0s</StoredType>.
Hi - I would like to report the following - I ran a refresh on the table itself (i.e. I right-clicked on the table name and I selected Refresh) and it seems that it got its brains back, at least for this table. I also ran a sql profiler trace to see what queries DG runs. Before I ran the refresh on the table I ran a refresh on the database and that refresh didn't refresh any columns. Imo, there is a problem with your refreshes at the higher levels (i.e. database, or data source ) - they don't detect changes properly at the sql table level.
We have a very similar issue reported here
https://youtrack.jetbrains.com/issue/DBE-24074/Data-Type-introspection-on-columns-unknown
What you described before seems to be related to introspection level 3 - the least detailed synchronization scope. We still haven't been able to catch this error. However, we'll continue our investigation and tests. Needless to say, without the logs, it could take longer for us to find the root cause.
Till then, you may follow the issue above to stay updated on the progress.