Create a new task and add a new “SQL Task” action. Right-click on the new task, select properties and then click on the settings page.

You need to specify a database connection to use, if you don’t have one use the data source manager to create a new connection to the database server.

To perform the backup enter the following SQL command:This will perform a backup of the “Northwind” database and create the output database to ‘C:\NorthwindSQLBackup.bak’.

BACKUP DATABASE Northwind TO DISK = 'C:\NorthwindSQLBackup.bak'
 

One additional setting you will need is the Command Timeout. In this example I’ve set the timeout to 3600 seconds (1 hour), otherwise the command will timeout before the SQL backup is completed.

backup-sql-database-from-optitask