Page 1 of 1

DB2 Generate DDL (2.3.6)

PostPosted: Tue Jan 28, 2014 9:46 pm
by Harrie
Generate DDL (DB2) works great with Win7/Dbeaver236/DB2-10.5, but it doesn't with AIX6.1/Dbeaver236/DB2-9.7fp7 ( screen returns blank ).
There seems to be a popup screen which I haven't been able to "catch".
I'm dbadm in both environments.
Any idea ?

Dbeaver is an excellent tool by the way !

Re: DB2 Generate DDL (2.3.6)

PostPosted: Wed Jan 29, 2014 1:13 pm
by titou10
Thanks for the compliment.

DBeaver uses an "undocumented" stored proc to generate table DDL: SYSPROC.DB2LK_GENERATE_DDL(). This one is used internally by the "db2look" command
This is the best way to generate an exact and "perfect" DDL, corresponding to what db2look gives. The drawback is that you need to have access to this SP and its dependencies, including the SYSTOOLS.DB2LOOK_INFO_V view

The SQL executed to generate DDL is actually:
call SYSPROC.DB2LK_GENERATE_DDL("-e -td <delimiter> -t <fully qualified table name>",?)

Maybe this SP or its dependencies do not exist or act differently of on your server (I test with DB2 Win/v10.5 and DB2 AIX64/9.7+10.1 too..)

Could you verify if you have something in the error logs or in the query manager view while you try to display DDL of a table . Also please check the dbeaver error.log (in your <user home>/.dbeaver/.metadata/dbeaver-debug.log)
To display those views, in the "Window" menu
- check "Query manager"
- chek "Error Log"

Please send the result to me : titou10.titou10@gmail.com

Thanks

Denis

Re: DB2 Generate DDL (2.3.6)

PostPosted: Mon Jun 23, 2014 4:06 pm
by blakeice

Re: DB2 Generate DDL (2.3.6)

PostPosted: Mon Jun 23, 2014 8:02 pm
by titou10
Hi,
It seems that you are not authorized to create the system tables or some internal object needed by the executuing of the db2look internal stored proc
Are you sure you are connected as the instance owner? could you try to run the equivalent db2look command with this user and the same table?
Maybe you could also check what is is written in this post :
Denis

Re: DB2 Generate DDL (2.3.6)

PostPosted: Tue May 17, 2016 1:43 pm
by asouza22
Hello!

I was getting an error similar to this. I fixed it GRANTing the rights privilegies on DB2LOOK_TOKEN sequence, DB2LOOK_INFO_V view and DB2LOOK_INFO table in the SYSTOOLS schema.
Maybe it can help!

Regards!

Re: DB2 Generate DDL (2.3.6)

PostPosted: Thu May 19, 2016 7:32 am
by Cris70