spooling database osql command error
Posted on 2010-04-07
I am troubleshooting an Ahsay online backup error and was instructed by their tech support to issue the following osql command to see if the database file in question can be spooled successfully. the command issued was:
osql -E -Q "DECLARE @dbname char(64) SET @dbname = 'database_name' BACKUP DATABASE @dbname TO DISK = 'C:\temp\testdump.txt' WITH SKIP"
'datbase_name' is the name of the database
executing this command I get the following error:
Msg 207, Level 16, State 1, Server SERVERNAME Line 1 Invalid column name 'database_name'
the sql server is sql 2005 (free version). Can anyone explain how to correct. I am not too familiar with SQL