I am trying to automate my backups using osql and the Windows task scheduler. I have run into a strange problem - my database name starts with a number (it is "4DHQ"). The SQL BACKUP command does not work with this database.
I racked my brain using osql and then decided to try it in HQ Administrator. I executed the following SQL"
BACKUP DATABASE 4DHQ TO DISK = 'C:\Documents and Settings\All Users\Documents\RMS BACKUP - HQ.BCK'"
The results were: An error occurred while executing query: Line 1: Incorrect syntax near '4'.
I tried the same string using a different test database (named "TEST") and it worked. Unfortunately, it's not so easy to change my database name now. It this a known bug in SQL?
Jason