Unable to copy files to different domains

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
shepli
Participant
Posts: 79
Joined: Fri Dec 17, 2004 9:56 am

Unable to copy files to different domains

Post by shepli »

I want to perform a file copy within a routine, which copies a file to a folder that is in a different domain as the DataStage server is. For example, perform the following command:
copy \\privnt22\data\datafile_09222006.csv \\pubnt33\data\datafile_09222006.csv
where "privnt22" is in the same domain as DataStage server is, and "pubnt33" is not.

I can do this on DOS command and on VB programs, but when I tried to do it on a DS routine, I got the following error message:
"Logon failure: unknown user name or bad password

Please let me know how to avoid the login problem.

Thanks.

Shepli
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

Does your routine have other logic or are you using it only for the copy?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

On the server machine map a shared folder from \\pubnt33 (using a different user ID) so that you can set up authentication. Or execute the DOS command NET USE to set up the authentication.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shepli
Participant
Posts: 79
Joined: Fri Dec 17, 2004 9:56 am

Post by shepli »

Thank you for your response. I was out of office these days and did not respond to your post soon.

To paddu: in one DS job, I need to scan the source folder and copy files in the folder to the destination folder for other job to process (1 file each time).

To Ray:
On the server machine map a shared folder from \\pubnt33 (using a different user ID) so that you can set up authentication. Or execute the DOS command NET USE to set up the authentication.
both of your approaches look good to me. but the problem is that I have no priviligies to map share folders from \\privnt22. If I ask the IT people to create the share folder use different user name/password, can I setup authentication in this case?
I tried the DOS command NET USE, but there are so many parameters and I did not make it work, can you show me how to setup the parameters so that when I run DS jobs on \\privnt22, I can access files in \\pubnt33? Thanks,

Shepli
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Post by shawn_ramsey »

This should do it. It will authenticate you to the server privnet22 and allow you to use you UNC names to copy.

Code: Select all

net use \\privnet22 <password> /USER:<domain>\<username>
Replace <password> with the password of the user you are using for the connection
Replace <domain> with the domain of server that the user exists in
Replace <username> with the user name
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
Post Reply