Page 1 of 1

Unable to copy files to different domains

Posted: Wed Jun 06, 2007 6:01 pm
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

Posted: Wed Jun 06, 2007 6:36 pm
by paddu
Does your routine have other logic or are you using it only for the copy?

Posted: Wed Jun 06, 2007 9:01 pm
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.

Posted: Mon Jun 11, 2007 9:29 am
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

Posted: Mon Jun 11, 2007 10:24 am
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