I am trying to restore a database that no longer exists from a backup file with the following
sqlcmd -E -S SERVER -d "master" -n -b -Q "RESTORE DATABASE SOPHOS50 FROM DISK = C:\SOPHOS50.bak WITH REPLACE, RECOVERY"
but I got an error
ATABASE SOPHOS50 FROM DISK = C:\SOPHOS50.bak WITH REPLACE, RECOVERY"
Sqlcmd: Warning: '-n' is an obsolete option and is ignored.
Msg 102, Level 15, State 1, Server SERVER, Line 1
Incorrect syntax near 'C:'.
Msg 319, Level 15, State 1, Server SERVER, Line 1
Incorrect syntax near the keyword 'with'. If this statement is a common table ex
pression, an xmlnamespaces clause or a change tracking context clause, the previ
ous statement must be terminated with a semicolon.
any idea?