Hi,
I'm trying to run a backup in a batch windows file (CMD).
It works fine with database with standard name, but the one I have contains dash, e.g. : my-database
when I try the following :
sqlcmd -E -S myserver\myinstance -Q "BACKUP DATABASE my-database TO disk=N'c:\backup\my-database.bak'"
I get error message 102 level 15 state 1...
Can you tell me how to use a dash in a database name with no interpretation from sqlCMD ?
The sql script works fine when I try it directly with Enterprise manager.
I also tried to save the sql script file and run it with -i in sqlCMD but I get the same error message.
Thanks for your help