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)
 running a batch file via jobs in sql 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-08 : 09:17:06
Eric writes "I am creating a job with several tasks that would backup the database and then copy it to another server. The backup is running but the copy portion (which runs a copy batch file) is not. I can run the batch file via DOS and by clicking it but I cannot run it via job. I am getting an error: Acess Denied. Is this a network issue?

Also, i am planning to have the backup restored in the target server via jobs. Is this possible?"

efelito
Constraint Violating Yak Guru

478 Posts

Posted - 2002-08-08 : 10:06:15
It's a network permissions issue. The batch file is running under the security context of the account you are using to start the SQL Agent Service. This account will need to be a Domain User and have rights to the network share you are trying to access. Be sure to use full UNC paths when you are pointing to a share. Mapped drives are not available to accounts that are not logged on interactively. If you want to test the accounts permissions run the batch file or copy statement from xp_cmdshell in QA. HTH

Jeff Banschbach
Consultant, MCDBA
Go to Top of Page
   

- Advertisement -