backup up MS-SQL 2005 Error

JaysonJackson
JaysonJackson used Ask the Experts™
on
We have a Microsoft 2003 server running MS-SQL2005. I am trying to create a job for backing up the database.    Here are the job Properties

General.
Name: Daily Backup
Owner = server name\Administrator
Category:  Database Maintenance.

Steps
Name = step1
Type Transact-SQL script (T-SQL)
Run as [empty]
Database = LFPBS8
Command =
EXECUTE master.dbo.xp_create_subdir N'D:\Backup\LFPBS8'
GO
BACKUP DATABASE [LfPBS8] TO  DISK = N'D:\Backup\LFPBS8'LFPBS8_backup.bak'  WITH NOFORMAT, INIT,  NAME = N'LFPBS8_backup', SKIP, REWIND, NOUNLOAD,  STATS = 10


Database is LFPBS8
Backing up to d:\backup\LFPBS8

Here is the log (by looking at this I am sure I left a quote out but were?)

01/29/2010 09:33:06,daily backup,Error,0,PHX-SERVER01,daily backup,(Job outcome),,The job failed.  The Job was invoked by User PHX-SERVER01\Administrator.  The last step to run was step 1 (step1).,00:00:01,0,0,,,,0
01/29/2010 09:33:06,daily backup,Error,1,PHX-SERVER01,daily backup,step1,,Executed as user: PHX-SERVER01\_Service_SQL_Agent. Incorrect syntax near '.'. [SQLSTATE 42000] (Error 102)  Unclosed quotation mark after the character string '<c/> SKIP<c/> REWIND<c/> NOUNLOAD<c/>  STATS = 10  '. [SQLSTATE 42000] (Error 105).  The step failed.,00:00:01,15,105,,,,0
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Consultant
Top Expert 2009
Commented:
EXECUTE master.dbo.xp_create_subdir N'C:\Backup\LFPBS8'
GO
BACKUP DATABASE [LfPBS8] TO  DISK = N'C:\Backup\LFPBS8''LFPBS8_backup.bak'''  WITH NOFORMAT, INIT,  NAME = N'LFPBS8_backup', SKIP, REWIND, NOUNLOAD,  STATS = 10

Author

Commented:
LOL. you guys really make it look simple.  Thanks for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial