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
 SQL Server Administration (2005)
 SQL Server job

Author  Topic 

naushi
Starting Member

10 Posts

Posted - 2009-01-29 : 16:31:24
I am trying to run a job from sql server 2005 - the job runs a batch file (which resides on an app server 6064) which reads a file which also resides on app server 6064 and loads it to a table in the database using bcp command.

when i run the job from the database server 1644 i used a mapped drive to map to the folder where the file is, it does not find the file. I then tried to use the full path of the app server 6064 to read the file i get an error 'access denied' -

I can run the job wihtout an issue manually from 6064. How can I make it work form the database server 1644.

naushi hussain

naushi hussain

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-30 : 00:21:28
The mapped drive would need to be under the SQL Server service account. That's why it is recommended to use a full UNC. I never use mapped drives. If you are getting access denied with the full UNC, then you need to check the SQL Server service account's permissions. If you are using the local system account, then you definitely need to switch to a domain account that has sufficient privileges to carry out this task.

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

Subscribe to my blog
Go to Top of Page

naushi
Starting Member

10 Posts

Posted - 2009-01-30 : 10:45:21
thnanks for your reply - we are using dbaproxy in the sql server agent (this is the 'run as' option in the step mode of the job when you edit it). the account (domain-name\sbudba)we are using has admin privs in the 6064 box where the file exists.

we use proxy option in other jobs to access files and it works

naushi hussain
Go to Top of Page
   

- Advertisement -