Question

Requirements - Schedule task in SQL Express Edition.

But SQL server Agent functionality is not available in express edition.

Possible Solution- Schedule batch file execution to execute sql script. Tried

Batch File-cmd /k sqlcmd -i backup.sql

Sql Script-backup database DB_user1212 to disk = 'E:\backups\MyBackup.bak'. But error occurred while executing sql script A network related or instance specific error occurred while establishing a connection to SQL Server

Possible Reason- Something like connection string missing. Help me how to solve this, i am using windows authentication for connection.

Was it helpful?

Solution

All you need to do is add the additional parameters to your call to sqlcmd.

 sqlcmd -S yoursqlserver -E -i C:\pathto\backup.sql
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top