1. Number of database backup scripts:
Database backup:
DECLARE @BcpFile varchar (+), @SQLBACKUP varchar (+), @BcpFullFile varchar (100)
SELECT @BcpFile =convert (CHAR (8), GETDATE (), 112)
SET @BcpFullFile = ' E:\BACKUP\AlarmMonitor_ ' [email protected]+ '. Bak '--here is the path to backup remember to delete when copying
SET @SQLBACKUP = ' BACKUP database alarmmonitor to disk= ' [email protected]+ '--alarmmonitor is the database name. You can change it to your own.
EXECUTE (@SQLBACKUP)
2. Open database Select SQL Server Agent, right-new job
3.
4. Note here that the command is just the beginning of the script, it is better to test the console first and then paste
5. Click Schedule Next. Set general actions
And then that's what's going to happen.
At the end of the final, you're done.
SQL Server Management Studio uses jobs to implement database backups