Backup batch file error

Oct 31, 2007 2 Replies

Created batch file as... osql -U sa -P password -S mypc -Q "BACKUP DATABASE 995 TO DISK 'C:\TEST_BACKUP\995.BCK'"



when I run it, I get error mssg is "incorrect syntax near '995'



the database name is 995; I tried using single quotes between 995 but to no avail - same error mssg



I appreciate any help on this - thanks


hi Convoluted, do this: osql -U sa -P password -S mypc -Q "BACKUP DATABASE [995] TO DISK 'C:\TEST_BACKUP\995.BCK'"

Rate >

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required