0

We are using DBeaver with a DB2 host database. Table descriptions get displayed just fine. But for table columns there is no description under table properties→columns.

SELECT name,tbname, LABEL FROM SYSIBM.syscolumns

yields the correct/desired information.

Can I fix this through driver settings?

Thanks!

Marcus

marcus
  • 1
  • 4
  • If you right-click on (your database) > Schemas > (your schema) > Tables > (your table) > Columns > View Columns F4, does Dbeaver show the columns along with their descriptions (comment/label) in the right-hand-side pane ? It works for me. – mao Jul 12 '18 at 08:07
  • That's exactly what I mean. There is nothing in the description column. – marcus Jul 12 '18 at 08:11
  • Check different settings of property useJDBC4ColumnNameAndLabelSemantics for your Db2-Server version, and whatever jdbc driver you are using. – mao Jul 12 '18 at 08:20
  • mao, thanks for your idea! I tried all the different options (0,1,2, true,false). Every one yields the same result: Nothing. My tries are respected in general, an illegal value leads to an error message. – marcus Jul 12 '18 at 08:57
  • What is your jdbc-driver-version? What is your Db2-server version? – mao Jul 12 '18 at 08:58
  • Driver is com.ibm.db2.jcc.DB2Driver, version 4.19.49. `SYSIBM.VERSION` gives me `DSN11015` – marcus Jul 12 '18 at 10:40
  • Take a look at jdbc tracing. It may be that there are some optional packages that are not bound on the target subystem, or other optional configuration items that are missing. Check properties traceDirectory, traceFile, tracefileAppend, traceLevel=-1, which are settable at connection level. – mao Jul 12 '18 at 18:44
  • Thanks! Now I get MBs of traces, "my" table and its columns are included... Could you tell me what specific to search for? Side note: We are using synonyms a lot (but again: syscolumns contains the right data for the table name). Could that be a problem? – marcus Jul 13 '18 at 06:01
  • Look for errors or warnings. Look for CALL to procedures. Remember to disable trace after first getting the symptom. It may be wise to check if IBM Data Studio (or DBVisualizer etc) have the same symptom (i.e. to eliminate the Db2 for Z/OS side). – mao Jul 13 '18 at 08:30
  • In all those traces I never find "error" or "warn" at meaningful places (tried with different parameter values). The effect is the same in Squirrel SQL. Also I get an empty `REMARK` when I try `connection.getMetaData().getColumns(...)`, no matter if using the schema and table name or the synonym, again independent from parameter value. Could it really some configuration issue of the database? – marcus Jul 13 '18 at 11:15
  • The Dbeaver issues wiki ( https://github.com/dbeaver/dbeaver/issues/541 ) mentions varying driver parameters "Meta Model Type" and "Describe Option", and one person having success with useJDBC4ColumnNameAndLabelSemantics=1. Did you already eliminate aliases/synonms (i.e. by checking if a plain unaliased table has the same symptom). You might need to open a new issue on the issues wiki , though I'd suggest more eliminations, particularly with IBM Data Studio. – mao Jul 13 '18 at 11:44
  • Thanks for your comment! I saw that Wiki before where the problem is actually reverse to my case (they et description instead of column name) and tried the different options to no avail. There are no tables w/o synonym in our DB unfortunately and also the synonyms do not show in DBeaver so I cannot check if they would work. In the end it's surely a driver issue because different programms show the same result. Guess I'll try opening an issue with DBeaver still. IBM Data Studio is not available here sadly. – marcus Jul 16 '18 at 05:40
  • Update: The "data" view of tables now shows the description as header. But not description in Properties is stil empty. – marcus Jul 16 '18 at 08:26
  • IBM Data Studio is a free download, how can it not be available? IBM is more likely to react (via formal support channel) if the symptom recreates with an IBM produced application. What stops you from connecting to a development subsystem and simply creating a table with column-comments to do the elimination? Or having a DBA do it for you if you lack privileges. Yes it's time to engage with vendors, though they are most likely to require you to do eliminations anyway (unless it is a known issue to IBM for example, with workaround). – mao Jul 16 '18 at 09:04
  • I was unprepared for IBM Data Studio to be a free download, sorry and thanks for the advise! It shows the correct description. DBeaver does not (but is able to show it as column header using `useJDBC4ColumnNameAndLabelSemantics=2`). – marcus Jul 16 '18 at 14:36
  • From that comment, it appears that IBM Data Studio works correctly, while DBeaver and Squirrel SQL behave unexpectedly. You might give that information to the ticket you open for DBeaver, as the issue is not yet dagnosed. – mao Jul 16 '18 at 18:55

1 Answers1

0

I know this is an old post but I have been searching for an answer as well. Now that I found a resolution to my issue, I thought I would share it here in hopes that it helps others. This is DBeaver v22.0.1

Driver Manager Level Settings:

Driver Manager Level Settings

The secret is that you can change the setting in the driver manager but it does not seem to propagate down to the individual connections, even after disconnecting and reconnecting the database. I had to set it for the individual connection level.

Connection Level Settings:

Connection Level Settings

Good Luck!

azmrtwo
  • 39
  • 3