Home Forums SQL Server 2005 Development How to Execute *.sql scripts using SQLCMD in batch file format RE: How to Execute *.sql scripts using SQLCMD in batch file format

  • I am trying to setup a scheduled task using a .cmd file. I want to backup the databases. I have a script, but when the command runs the backups are not generated. I think it is the way I am calling the instance. This is for our Windows Internal database. Here is what I have in the .cmd file.

    sqlcmd -S\\.\pipe\mssql$microsoft##ssee\sql\query-E -i"E:\SQL_Backups\scripts\backupDB.sql"