It is troublesome to back up server data. It is difficult to back up server data manually on a daily basis. Here I will introduce a method to create automatic backup through job scheduling of SQL Server:
1. Choose Enterprise Manager> Manage> SQL Server proxy> job;
2. Create a job and obtain the job name as needed. For example, for data backup, select SA as the owner. Of course, you can select another user, provided that the user has the permission to execute the job;
3. Click the step tab to go to the step panel. Create a step. You can enter the step name as needed, such as step 1. The default type and database do not need to be modified.
backup database [database name] to disk = n'f: \ data \ Database Backup 'with noinit, nounload, name = n' Database Backup ', noskip, stats = 10, noformat
note: the database name must be modified, disk = (here you need to fill in the path and the name of your database backup) followed by name = can be entered at will.
4. Click the scheduling tab to go to the scheduling panel. Create a New Scheduling task and enter the name as needed. If the name appears repeatedly, click Change to schedule the task you want to execute. Such as every day, every 2 days, every week, and every month. Set as needed.
5. After confirming, do not forget one thing. Right-click the job you just created and start the job. If your job is normal, the execution is successful and the corresponding backup file appears on your disk.
6. Another important problem is that your SQL Server Agent server has been started.
If we need to generate a new backup based on the daily date, we can differentiate the backup files. At this time, we need to modify the SQL statement just now. Reference instance: declare @ filename nvarchar (100) set @ filename = 'f: \ addin \ backup \ data' + convert (char (10), getdate (), 112) print @ filename backup database [addin] to disk = @ filename with noinit, nounload, name = n 'addin backup ', noskip, stats = 10, noformat
Summary: Database Backup
------------------------------------------------------
Backup database haomap to disk = 'e: \ baisun. Bak'
------------------------------------------------------