| Author |
Message |
beachldy
Joined: 14 Sep 2005 Posts: 10
|
Posted: Thu Jun 28, 2012 2:16 pm Post subject: ERASEFILES causes backup error |
|
|
This is the backup script and it fails since adding the ERASEFILES items.
EXEC master..sqlbackup N'-SQL "BACKUP DATABASES [MYDB] TO DISK = ''F:\MSSQL\BACKUP\<AUTO>''
WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COMPRESSION = 3 , ERASEFILES = 3, FILEOPTIONS = 1, ERASEFILES_REMOTE = 3",@exitcode OUTPUT, @sqlerrorcode OUTPUT
I've tried omitting the ERASEFILES_REMOTE, omitting the ERASEFILES, omitting the FILEOPTIONS, and none of these work. |
|
| Back to top |
|
 |
ChrisAVWood
Joined: 18 Dec 2007 Posts: 308 Location: Edmonton, Alberta, CANADA
|
Posted: Thu Jun 28, 2012 2:36 pm Post subject: |
|
|
You are missing a ' at the end.
It should read ERASEFILES_REMOTE = 3'"
There was the ' before -SQL "BACKUP that you have no ending ' for.
Chris _________________ English DBA living in CANADA |
|
| Back to top |
|
 |
beachldy
Joined: 14 Sep 2005 Posts: 10
|
Posted: Thu Jun 28, 2012 3:03 pm Post subject: |
|
|
| THANK YOU! I thought I counted all the quotes....but missed one. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group