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
Unable to copy files to different domains
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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:
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
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:
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?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.
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
-
- Participant
- Posts: 145
- Joined: Fri May 02, 2003 9:59 am
- Location: Seattle, Washington. USA
This should do it. It will authenticate you to the server privnet22 and allow you to use you UNC names to copy.
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
Code: Select all
net use \\privnet22 <password> /USER:<domain>\<username>
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
"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams