Re: Acessing password protected network drive
Date: Mon, 17 Feb 2014 10:48:38 -0800 (PST)
Message-ID: <1e72a264-21ef-4e90-98bd-43a5ffbc9876_at_googlegroups.com>
On Friday, February 14, 2014 4:32:29 PM UTC-3, Tiago wrote:
> Oracle 11.2.0.2 running on Windows 2008 server 64 bit.
>
>
>
> I need to access a remote network path using UTL_FILE and a DIRECTORY component, to collect and process some XML files.
>
>
>
> The problem is the server where the files I want (over the network) does not belong to me, but the fine folks who run this server granted me access to a shared folder, something along the lines of //theirserver/mydata.
>
>
>
> Trouble is, they demand password authentication. If I connect through windows explorer, it will prompt for username and password and after entering the authentication data I have access granted, no problems. Unfortunately, UTL_FILE.FOPEN does not provide a way to enter username and password and then Oracle can't connect and can't read files. Does anyone know a workaround? Is there any way, even if a Java way?
>
>
>
>
>
> Thanks in Advance,
>
> Tiago
Hi Guys!
Thanks for the answer!
I found the solution.
1 - Get SysInternals (yeah, right... One would expect the server mgmt tools to come with the server) You need it so you can become "root", or in Win lingo, NT Authority/SYSTEM. 2 - With an administrator user, run "psexec -i -s cmd.exe" 3 - run "net use s: \\myserver\mysharing mypassword /user:mydomain\myuser", replacing the obvious for your data.
done!
However, if you reboot your server, you'll have to do all that again *or* enter a scheduled task to run the "net use" command, as SYSTEM, every system start up.
I have seen elsewhere that this will give everyone access. Not the case on my testings (Win2008). It seems only SYSTEM will be able to use the shared letter, despite the fact other users see it on the Explorer screen, other users give "invalid username/password" when clicking on the share and I didn't waste time figuring it out, as it worked for UTL_FILE. Nonetheless, I am reading billions of XML files now and users are happy, so am I.
- Tiago