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 2000 Forums
 SQL Server Administration (2000)
 Executing batch files-SQL Server Agent

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2002-07-31 : 10:28:11
Hi,
I have batch file located in E:\DataXfer\Camra. The E-drive is a local drive. I have set up a job which executes the batch file in the location mentioned above. When the job executes it returns a error saying invalid drive specification. The batch file copies files from the drive H:\ which is a networked drive. What could be the problem here...

Thank you
Bye
Ramdas

Ramdas Narayanan
SQL Server DBA

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-07-31 : 10:34:58
Is there anyone logged into the machine when the job is run ?

Remember that drive mappings are set when a user logs into the machine. If this is running with no one logged in, there will be no E:

Damian
Go to Top of Page

izaltsman
A custom title

1139 Posts

Posted - 2002-07-31 : 10:35:22
First of all, make sure that your SQL Agent service is running in a domain (and not LocalSystem) account. Secondly, you need to log into your SQL Agent service account and create a mapping of the network share to H:. Better yet, change your batch file to use UNC paths instead of mapped drive latters -- this will save you a lot of headaches down the line if drive mapping ever changes.

Go to Top of Page

izaltsman
A custom title

1139 Posts

Posted - 2002-07-31 : 10:40:06
Merkin, it must be really late in Australia right now!
Local drive shall not disappear regardless of whether somebody is logged in or not!
Besides, if SQL Agent Service is running -- it must be logged into its service account!


Go to Top of Page

ramdas
Posting Yak Master

181 Posts

Posted - 2002-07-31 : 16:46:48
Hi,
Thank you folks. I am using UNC names, it works.
Bye
Ramdas

Ramdas Narayanan
SQL Server DBA
Go to Top of Page
   

- Advertisement -