Author |
Message
|
CHAK DE |
Posted: Fri Oct 05, 2007 4:22 am Post subject: Accesing Oracle Database from ESQL. |
|
|
Novice
Joined: 27 Sep 2007 Posts: 10
|
I need to retrieve data from a table in an oracle database.My ESQL code is as follows:
CREATE PROCEDURE GetData() BEGIN
SET OutputRoot.XML.Test.Result[] = (SELECT T.EMPID, T.NAME, T.DESIGNATION FROM Database.OODDB.bolinf.INFO AS T);
END;
where OODDB id DSN defined in odbc.ini file.
bolinf is the user id of database.
INFO is the table name.
Please advice if there is any error in the above code since I have never worked in Oracle database.I tested the same code to access db2 database and it worked.Please help..... |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 05, 2007 4:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
So what's the error when you try it against Oracle?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
CHAK DE |
Posted: Fri Oct 05, 2007 4:32 am Post subject: Accessing Oracle database using ESQL |
|
|
Novice
Joined: 27 Sep 2007 Posts: 10
|
Hi Vitor,
I am not getting any error in the syslogs but data retrieval is not successful at the output queue.No messages are found on the output queue. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 05, 2007 4:36 am Post subject: Re: Accesing Oracle Database from ESQL. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
CHAK DE wrote: |
I tested the same code to access db2 database and it worked.Please help..... |
This does imply it's a configuration error in the data source rather than a code problem. Check your ODBC settings etc. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 05, 2007 6:52 am Post subject: Re: Accessing Oracle database using ESQL |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
CHAK DE wrote: |
Hi Vitor,
I am not getting any error in the syslogs but data retrieval is not successful at the output queue.No messages are found on the output queue. |
There could be lots of different reasons for that, none of which have to do with the success or failure of the ODBC access. Put a trace node right after the compute node that does the SELECT. Or use the Debugger. Or user trace turned to debug level.
That said, you should have alreayd taken steps to confirm that the Broker machine is capable of accessing Oracle in the first place. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|