Discrepancy in the execution of the unix comnmand

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
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Discrepancy in the execution of the unix comnmand

Post by Ragunathan Gunasekaran »

Hi
I have set up the environment of using the non interactive public key authentication without any passphrase and when i use the below scp command to transfer the file to the machines( the same server is used as source and target , the only difference is the directory path from which the scp picks the file and lands the file). The command works fine in the unix box and when i try to execute with the datastage it is not .The error that i recieve is its not connecting to the server and comes out with an authentication failure from the unix box.
Please find the code that i use to connect within the server

Code: Select all

>scp CopyFileName.txt UserName@ServerName:TargetDirectoryPath
Regards
Ragu
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Could you post an explanation of where and how you are doing this from DataStage?
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Hi ,
I am doing this in a Execute command stage in a datastage sequence. The preliminary environment for setting the public key authentication is made manually . The problem is it connects when i execute the posted scp command manually without any authentication failiure ,but fails to do so in the execute command stage.The preliminary set up is set once and left untouched for the subsequent execution of the scp command . Any help please :(
Regards
Ragu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What directory do you believe the Execute Command activity is executing in? What directory is the file in? Are these the same?

Always use full pathnames in commands executed from DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Yes the files are at the same location .ie the execute command stage is picking the files from the location from where it is intended to . Rather after your advise i changed the filename to contain the filepath and the file name . still i am getting the same authentication failiure .
Regards
Ragu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is DataStage executing from the same user ID that you used in UNIX?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Yes i am using the same id that i using for unix and datastage.
Regards
Ragu
Sudhindra_ps
Participant
Posts: 45
Joined: Thu Aug 31, 2006 3:13 am
Location: Bangalore

Post by Sudhindra_ps »

hi,

Just open up any of the job log you have run, from Datastage director. And see "Environmental Variable Settings" info, where you would see all environmental variables being exported to run your ETL job. In that list try to find these two variable values "LOGIN" and "LOGNAME". And let us know whether these values are same or are they different.

Thanks & regards
Sudhindra P S
Post Reply