Reading SQL from file to extract data from Oracle Tables

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

kool78
Participant
Posts: 104
Joined: Sat Aug 20, 2005 2:02 pm

Post by kool78 »

parameswar wrote:
ray.wurlod wrote:OK, we've proven that the SQL is being passed to the job successfully. The next step is to establish that the SQL is being passed from the job to Oracle. You will need to enlist the help of your DBA to monitor the connection and record the SQL that was actually received by the Oracle database server. Then compare that against what you think it ought to be.
Hi,

Passing a sql file as parameter is working fine if file contains very simple statement like " select ID, NAME, TR_DATE,AMT from Table1 ". Job is running successfully without any warning. But when I am passing any complex query it is throwing error :( . Anyway I will try with our DBA and if solved will post the steps.

Thanks you all for inputs.

Regards,
Parameswar

try the above simple query with a WHERE condition in it. let us know how its treating the where condition when passed from a seq file.
"Attitude always and almost determines the altitude of your Life"
parameswar
Premium Member
Premium Member
Posts: 66
Joined: Sun Apr 08, 2007 12:34 pm

Post by parameswar »

kool78 wrote:
parameswar wrote:
ray.wurlod wrote:OK, we've proven that the SQL is being passed to the job successfully. The next step is to establish that the SQL is being passed from the job to Oracle. You will need to enlist the help of your DBA to monitor the connection and record the SQL that was actually received by the Oracle database server. Then compare that against what you think it ought to be.
Hi,

Passing a sql file as parameter is working fine if file contains very simple statement like " select ID, NAME, TR_DATE,AMT from Table1 ". Job is running successfully without any warning. But when I am passing any complex query it is throwing error :( . Anyway I will try with our DBA and if solved will post the steps.

Thanks you all for inputs.

Regards,
Parameswar

try the above simple query with a WHERE condition in it. let us know how its treating the where condition when passed from a seq file.
Hi,
With simple query, it is working fine . even when I am passing through file this simple query, it is working fine. Problem is when very long sql query I am passing, it is throughing the error.

Thanks,
Parameswar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If just the length is the problem then you are probably out of luck, having passed some internal size limit such that the sql ends up getting truncated.

Have you opened a case with your support provider?
-craig

"You can never have too many knives" -- Logan Nine Fingers
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

I did face this problem sometime back... A query of length greater than 1020 (or so) was not getting executed through DS, through the query was being successfully parsed to the job.

But when the length of the query was reduced by a few characters it ran absolutely fine.

Got around this by splitting the query into 2 :(.

Aneesh
------------------
Aneesh
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

You might want to check out the OSH generated for the job to see if the SQL query is being taken in completely.
------------------
Aneesh
Post Reply