How can we help you today? How can we help you today?

problem using COPYTO parameter

There are a couple of items that could cause this.

The first is in the syntax that you are using.
With the COPYTO option you need to use two single quotes rather than a single double quote. This is an easy mistake as when looking at the examples it looks like a double quote. Also there should be no comma after the COPYTO option.
Your script should read.
master..sqlbackup '-SQL "BACKUP LOG [Northwind2] TO DISK = ''d:\sql2000\MSSQL\BACKUP\<AUTO>'' WITH NAME = ''Database (Northwind2), 25/02/2005 3:02:01 PM'', DESCRIPTION = ''Backup on 25/02/2005 3:02:01 PM Database: Northwind2 Instance: (local) Server: SGSINSRV04'', COMPRESSION = 1, COPYTO = ''D:\TEST\'' " -U sa -P xxxx'
Copy this script into a text editor and you can see the difference.

The second issues that could cause a problem is one of rights, especially if you intend to copy to a remote drive. The user running the script must have permission to write to the copy to location.

Regards
Dan
Daniel Handley
0

Add comment

Please sign in to leave a comment.