• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1525
  • Last Modified:

Job schedules move files

I have to schedule the following as jobs

1.backup Db Customer to \\serverA\backups\customercomplete.bak
2.move the file to another server    \\serverA\backups\customercomplete.bak To \\serverb\backups\customercomplete.bak
Step 2
Move  "\\serverA\backups\customercomplete.bak "  "\\serverb\backups\customercomplete.bak"

Job schedule :
Step one is done
I used move to accomplish step 2.  No luck
0
ohemaa
Asked:
ohemaa
1 Solution
 
YveauCommented:
What is the error ?
Enough permissions for the SQL Server Agent account, as that is the account that performs your jobs for you ?

Hope this helps ...
0
 
QPRCommented:
As Yveau says...
The account that is used to run the Windows Service - Server SQL Server Agent must have write permissions to the backups folder on server B. IF using move then it also needs to have delete (or modify?) permissions on the backup folder on server A.
0
 
dbbishopCommented:
declare @sql varchar(500)
set @sql = 'move  "\\serverA\backups\customercomplete.bak "  "\\serverb\backups\customercomplete.bak"'
exec master..xp_cmdshell @sql
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
QPRCommented:
The above would assume that the account running SQL Agent has the necessary permissions to run xp_cmdshell
0
 
ohemaaAuthor Commented:
I get the WARNING: The following job steps cannot be reached with the current job step flow logic.
 [2] Move File to ServerB
Is this the intended behavior?
0
 
dbbishopCommented:
NO, is it two separate job steps (backup, then move. If so, you'll need to check your workflow and make sure that after successful completiong of step 1, you execute the next step.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now