0

I have the ff: scenario,

I have two servers, 1 outside(ServerB), 1 inside a domain(ServerA)

ServerA has an sp that uses xp_cmdshell to call a batch file from ServerB

Inside the batch file is an "XCOPY", when I execute the stored procedure I'm getting an "ACCESS IS DENIED" message,

I know it has something to do with permission but who's permission, where do I start?

mirageservo
  • 2,387
  • 4
  • 22
  • 31
  • 1
    you need to check under which user SQL Server Service is running (under windows services), that user needs to have access for your XCOPY command. its not a good practice anyways on production servers...why not execute batch file using windows scheduler or something else? – highwingers Jun 03 '13 at 07:21
  • Make sure you are using an appropriate user on serverA that has access to serverB. – Mark Kremers Jun 03 '13 at 07:29
  • because i need to execute the batch after the process has executed, it sorta recursive process. its 1 to N – mirageservo Jun 03 '13 at 07:30
  • how do i know which service account in used? any specific commands? – mirageservo Jun 03 '13 at 07:45

1 Answers1

0

You should check the rights of the account used for the SQL Server service. You can see the name of this account (or change it to annother account) using the SQL Server Configuration Manager.

Razvan Socol
  • 5,426
  • 2
  • 20
  • 32