ORA - 12154 Error TNS could not resolve service name

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

ORA - 12154 Error TNS could not resolve service name

Post by ketfos »

Hi,
I datastage job Comb which runs fine without any error.-- OCI - Transformer - OCI

When I execute the same job through sequencer, it gives ORA - 12154 Error.
What I doing in sequencer is

1. Wait for file to appear.
2. Run the job Comb.

When I check the error log for Sequencer , it reads as

File already present
Sequencer-> Comb Job run requested.
Sequencr-> DSRUnJOB - waiting for job Comb to start
Sequencer-> DSWAITFORJOB Waiting for COmb to finish.
JDSWAITFORJOB Job Comb has finished, status = 3 (Aborted).

Error log for Job Comb reads as -

Starting job Comb(...)
Comb ...TransFile DSD StageRunActive stage tracemode = 0
Comb...COMBHC: ORA-12154: TNS could not resolve service name
Job Comb aborted.

Oracle Manual reads ----
Cause: The service name specified is not defined correctly in the // TNSNAMES.ORA file.
// *Action: Make the following checks and correct the error:
// - Verify that a TNSNAMES.ORA file exists and is in the proper place and accessible. See the operating system specific manual for details on the required name and location.
// - Check to see that the service name exists in one of the TNSNAMES.ORA files and add it if necessary.
// - Make sure there are no syntax errors anywhere in the file. Particularly look for unmatched parentheses or stray characters. Any error in a TNSNAMES.ORA file makes it unusable. See Chapter 4 in the SQL*Net V2 Administrator's Guide. If possible, regenerate the configuration files using the Oracle Network Manager.
-----

Any clues.

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

Post by chulett »

If the job runs fine standalone but not via the Sequencer, I would guess you're not passing job parameters correctly. Are you using job parameters for Oracle connection (DSN, User, Password) and passing them to the job from the Sequencer?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
I am using the Job parameters in the sequencer and same parameters in the actual job.

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

Post by chulett »

Double-check which ones you've hooked up to what. I've seen something like this when, say, the userid parameter is sent to the DNS parameter or something similar.

If you go the the job's log after it fails and look for the entry that details all of the current run's parameter values, do they look fine there? I'm guessing not - again, banking on the fact that the job runs fine standalone. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

You can cross check the parameters passed to the Job and the parameters you are passing to the top level sequencer.

This kind of problem we also observered then finally we found out that the parameter which we were passing to the Job was not DSN but USER. That is by mistake in job sequence you might have passed some other parameter in place of DSN from top level sequencer.

In that case from top level sequencer, you will see that you are passing the right value for DSN but actually the down stream job is getting some other value as it is Not of DSN.

Please verify that.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
Post Reply