I am trying to execute a basic command to backup my database using the sqlcmd utility that comes with Sql Express 2005.
Unfortunately, my database name has a dash in it Database name is "SAMPLES-DATA". When I try to execute the following command, I get an error:
SQLCMD -S FILESERVER -E -Q "BACKUP DATABASE SAMPLES-DATA TO DISK =N'c:\temp\data.bak'"
I know the reason is because the database name has a dash '-' in it, but I cannot change that because it will break a lot of other scripts.
So, is there some solution to this problem?
Unfortunately, my database name has a dash in it Database name is "SAMPLES-DATA". When I try to execute the following command, I get an error:
SQLCMD -S FILESERVER -E -Q "BACKUP DATABASE SAMPLES-DATA TO DISK =N'c:\temp\data.bak'"
I know the reason is because the database name has a dash '-' in it, but I cannot change that because it will break a lot of other scripts.
So, is there some solution to this problem?