Reputation: 4511
My SSIS package uses Script Task
which calls File.Exists()
to determine if file is present.
I have to servers on same domain, e.g. THISDOMAIN
, SERVER1
and SERVER2
I have user THISDOMAIN\ADMIN
which is on both servers.
SERVER1
needs to access SERVER2
folder C:\
which is mapped to SERVER1
as D:\
On SERVER1
there is SQL Server 2008R2 which has SQL Server Agent with Account THISDOMAIN\ADMIN
If I log on to SSIS on SERVER1
with windows authentication as THISDOMAIN\ADMIN
package executes successfully.
But if I execute the same package with SQL Server Agent, it does not see the network drive D:\
on 'SERVER1`
What I tried:
Upvotes: 2
Views: 2430
Reputation: 1216
When going across the network to access files/folders, it's always recommended to use the UNC path.
Especially in a situation like this where the drive may be mapped via Windows Explorer and works when you're logged in, but doesn't work when you're trying to access that same path from a service that isn't logged in.
Upvotes: 3