Author |
Message
|
mbnewbie |
Posted: Tue Apr 19, 2016 11:36 pm Post subject: Using Oracle DESC in ESQL using PASSTHRU |
|
|
Novice
Joined: 04 Oct 2013 Posts: 19
|
Hi,
Could not find any example whether the Oracle DESC <Table Name> command can be fired from ESQL in the form - SET Environment.Data[] = PASSTHRU('DESC MYTABLE');
MB Version is 8 and Oracle is 11g.
Getting exception as invalid SQL. |
|
Back to top |
|
 |
maurito |
Posted: Tue Apr 19, 2016 11:45 pm Post subject: Re: Using Oracle DESC in ESQL using PASSTHRU |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mbnewbie wrote: |
Hi,
Could not find any example whether the Oracle DESC <Table Name> command can be fired from ESQL in the form - SET Environment.Data[] = PASSTHRU('DESC MYTABLE');
MB Version is 8 and Oracle is 11g.
Getting exception as invalid SQL. |
I guess you are talking about the describe command. You need to look at the Oracle documentation for the correct syntax of describe, then try it out in an Oracle command prompt. Once you have a working command, you can execute it from a Compute node using PASSTHRU, which is also documented in the IIB knowledge Center. |
|
Back to top |
|
 |
mbnewbie |
Posted: Wed Apr 20, 2016 2:24 am Post subject: |
|
|
Novice
Joined: 04 Oct 2013 Posts: 19
|
Oracle command is DESC table; this is working fine
but using command like SET Environment.Data[] = PASSTHRU('DESC table'); throws invalid SQL error. |
|
Back to top |
|
 |
maurito |
Posted: Wed Apr 20, 2016 2:41 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mbnewbie wrote: |
Oracle command is DESC table; this is working fine
but using command like SET Environment.Data[] = PASSTHRU('DESC table'); throws invalid SQL error. |
No, Oracle command is not DESC table;
It is
Code: |
Usage: DESCRIBE [schema.]object[@db_link] |
The reason it works from your command prompt is because you have logged in with your userid, which is also the schema name.
So, add the schema name and see what happens.
It would also help if you specify the exact error you are getting. |
|
Back to top |
|
 |
mbnewbie |
Posted: Thu Apr 21, 2016 12:48 am Post subject: |
|
|
Novice
Joined: 04 Oct 2013 Posts: 19
|
I am logged in as 'user' and it is also the same user/schema in the oracle DB.
I changed the syntax to - SET Environment.Desc[] = PASSTHRU('DESCRIBE user.MYTABLE') ; same error if I remove 'user' in the command.
The error as seen in debug perspective is [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement |
|
Back to top |
|
 |
maurito |
Posted: Thu Apr 21, 2016 1:12 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mbnewbie wrote: |
I am logged in as 'user' and it is also the same user/schema in the oracle DB.
I changed the syntax to - SET Environment.Desc[] = PASSTHRU('DESCRIBE user.MYTABLE') ; same error if I remove 'user' in the command.
The error as seen in debug perspective is [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement |
The full error is
Code: |
[IBM][ODBC Oracle Wire Protocol driver][Oracle]ORA-00900: invalid SQL statement |
So it looks like an ODBC driver problem. You need to raise a PMR with IBM |
|
Back to top |
|
 |
mpong |
Posted: Thu Apr 21, 2016 9:29 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2010 Posts: 164
|
What does mqsicvp command says? |
|
Back to top |
|
 |
maurito |
Posted: Thu Apr 21, 2016 9:59 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
mpong wrote: |
What does mqsicvp command says? |
Care to explain why you are asking that ?. The connection is being established, and the command rejected. |
|
Back to top |
|
 |
johnyjohn |
Posted: Mon Jan 29, 2018 2:33 am Post subject: Any solution for this ? |
|
|
Newbie
Joined: 29 Jan 2018 Posts: 2
|
Hi, I'm facing the same issue. I cannot find any suggestions on the web. Did you manage to resolve this ?
I need to run an oracle DESCRIBE command from ESQL..
I'm using IIB 10.0.0.9 and Oracle 11.
Thanks |
|
Back to top |
|
 |
ase2015 |
Posted: Mon Nov 26, 2018 8:32 am Post subject: Re: Any solution for this ? |
|
|
Novice
Joined: 02 Sep 2015 Posts: 16
|
johnyjohn wrote: |
Hi, I'm facing the same issue. I cannot find any suggestions on the web. Did you manage to resolve this ?
I need to run an oracle DESCRIBE command from ESQL..
I'm using IIB 10.0.0.9 and Oracle 11.
Thanks |
I'm facing same issue, did you find asolution? |
|
Back to top |
|
 |
abhi_thri |
Posted: Tue Nov 27, 2018 1:52 am Post subject: |
|
|
 Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
|
Back to top |
|
 |
|