Describe command in DB2 data studio - db2

My new Project is using DB2 9.7 version, and the GUI used is Data Studio. But the basic Describe command is not recognized. The query I am using is:
DESCRIBE table Select * from risk.risk_basic
and the error am getting is :
unexpected token "DESCRIBE Select *" was found following
"BEGIN-OF-STATEMENT"

As #data_henrik wrote it is a command and cannot be executed through a JDBC connection. YOu could switch the editor connection to a DB2 Server Command Line Processor though ...
This is described in the following answer of mine
https://dba.stackexchange.com/questions/161117/reorg-command-does-not-work-in-ibm-data-studio-but-same-works-in-command-line-pr

Related

run \dt in oracle sqldeveloper for PostgreSQL

I configured PostgreSQL for Oracle SQL developer.
I just tried to run the command \dt; from the worksheet and received below error
Error starting at line : 1 in command -
\dt
Error report -
SQL Error: ERROR: syntax error at or near "\"
Position: 1
Could you please advise how to run the commonly used psql commands from worksheet in Oracle SQL developer.
Edit1:
Are there any alternative equivalent for such psql command for oracle sql developer please. Thanks.
Doesn't SQL Developer offer a GUI view that provides the same info as \dt does? That is its job, afterall, and the point of using a GUI.
You can start psql with the -E option, then it will show you the SQL it executes to get the data behind the various backslash commands. You can then capture and run those queries in something else, like (presumably, I haven't tried it) SQL Developer.
You cannot do that.
psql commands are only available in psql.
Consider using psql, it is superior.

pgadmin4 query tool always comes back not connected

Q: How can I diagnose and correct problems with the Query tool connection.
Using pgAdmin4 1.0-rc1 to connect to a local host "PostgreSQL 9.5.3, compiled by Visual C++ build 18..."
I can connect and drill down to my schema. I use the context menu to select 'Query tool'. The editor shows the correct database#host:port in the editor header bar.
When I execute a simple query, or any query
select 1 as first;
I get the message
"Not conencted to the server or the connection to the server has been closed.
instead of the expected results.
The editor alwa
This issue has been resolved now,
Upgrade pgAdmin4 to version 1.3. https://www.pgadmin.org/download/
All you have to do is wrap the schema, table, column names with double quotation marks in every sentence.

OpenCobolIDE and DB2 - Connection

I'm currently working on a small COBOL project and I'm using OpenCobolIDE.
I also downloaded DB2 Express and I'm able to use it by running the "Commande line processor"
Now my question is the follow one : How can I make a connection between OpenCobolIDE and DB2 ?
I saw that it was possible to use "esqlOC" but I didn't find a lot of documentation and I'm still lost at the moment.
Kind regards
I know that's it's against SO policy, but here is a link; http://db2twilight.blogspot.nl/2014/01/linuxdb2-running-cobol-with-inline-sql.html The code isn't that long, but I found no disclaimer, so assumed copyright goes to the blogger, Dick Reitveld. The post is a tutorial on linking DB2 to GnuCOBOL (was OpenCOBOL), and not how to inform the OpenCOBOLIDE how to do the build, but hopefully this fits in with your question.
The build rules are listed in a shell script on the same page.
Basically it comes down to, creating a COBOL source file with EXEC SQL statements, running them through the DB2 preprocessor, then compiling the generated sources with cobc.
db2 connect to sample
db2 prep program.sqb bindfile target ANSI_COBOL
cobc program.cbl -static -Wall -L/path/to/db2libs/sqllib/lib64 -ldb2 -v -x -save-temps -O
db2 bind program.bnd
db2 connect reset
Where "program" is your filename, with .sqb inputs and will generate .cbl and .bnd, and the
-L/path/to/.../
is the full path to where your DB2 install has placed the DB2 support libraries.

MySQL Workbench 6.1 syntax errors in every statement

If I open up MySQL Workbench 6.1 on Ubuntu 14.04, and try to execute even a simple statement like
UPDATE articles SET published = 1;
It throws a syntax error when using the explain option:
Error executing explain
("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE articles SET published = 1' at line 1", 1064)
I know there is no syntax error because I can copy and paste that exact statement into MySQL command line and it works.
Select statements are fine, but not updates or inserts. I have no idea what's wrong and it's incredibly frustrating.

protocol adapter error with sqlplus

I am trying to connect my Oracle Database 10g Express Edition with sql*plus. when i start the sql*plus command window the following error occurs.
could you please show me the way of avoiding this error.
As per the 2nd result from a Google search on the error message:
Typically this will result from
not having ORACLE_SID properly set. Especially so on Windows.
not having the db service started. See the windows services applet, services.msc
https://community.oracle.com/thread/2425280