Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SQL Agent cannot see Mapped Drive

Author  Topic 

smeeluv
Starting Member

20 Posts

Posted - 2009-10-22 : 15:21:48
Hey everyone,
I have been trying to figure this out for a couple days now and still no luck. I have a package that connects to a drive that I mapped on the server that points to another server's directory. I can run it all day in debug mode successfully. However, when I go to schedule the job in SQL Agent, it will run but it cannot access the mapped drive. I also tried changing my package to point to \\servername\ and again, it will run fine in debug, but not in SQL Agent. Why can't SQL Agent see the drive but debug it can. Any help is appreciated!
Thanks,
Lee

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-22 : 16:05:01
You are probably using the Local System Account for the service, which has no access to network resouces. You'll need to use a domain account instead. If that's not it, then it's because the domain account doesn't have permissions to the network resource.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

smeeluv
Starting Member

20 Posts

Posted - 2009-10-23 : 08:01:28
I have tried using a domain account. Only problem with that is that the server that I am trying to connect to is not on our domain! What I do not understand is why can I not use those mapped drives that my account created?
Go to Top of Page

sherrys
Starting Member

37 Posts

Posted - 2009-10-23 : 10:00:12
Try making the drive a share drive. Share out to everybody. Then refer to them as \\server name\sharename\.... This has worked for me within a domain. I am not sure what effect the 'not on the domain' will have.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-23 : 13:26:28
quote:
Originally posted by smeeluv

I have tried using a domain account. Only problem with that is that the server that I am trying to connect to is not on our domain! What I do not understand is why can I not use those mapped drives that my account created?



Because the mapped drive only exists in your session, not in SQL Server's session.

I've never done it without a domain. I have a feeling that's going to cause you lots of issues.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-23 : 15:31:44
How are you connecting to this share that is not in your domain?
What is it? FTP virtual directory? In DMZ?

Go to Top of Page

smeeluv
Starting Member

20 Posts

Posted - 2009-10-26 : 16:56:12
Yeah, it is causing a lot of issues. I've tried running the job in SQL Agent as a different user/proxy and still a no go. The "not in domain" is definitely the head ache. I connect to this server with the address \\servername\ and then pops up a login and password screen. Sherrys, thanks for the advice, I will try that tomorrow. Tkizer, is there anyway that I can create that drive in the SQL Server's session? I really just need to see if my current process is possible, otherwise, I am going to have to use WSFTP pro scripts and call them from the SSIS package, I do not want to do that if I do not have to.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-26 : 20:01:48
You can create the drive in the SQL Server service's session by logging in as that user on the database server and mapping the drive. You can not use "Local System Account" for this reason, so you'll at least need a local account.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

smeeluv
Starting Member

20 Posts

Posted - 2009-10-27 : 16:38:58
Alright, I got it figured out. I removed the job from SQL Agent and scheduled it to run through the windows scheduler. Thanks for all the help.
Go to Top of Page
   

- Advertisement -