In this article, I am going to describe, how to create a SQL Server Agent job step, which executes SQL scripts in SQL Server 2012, using SQL Server Management Studio. I am giving you a example to take backup (.BAK) file of SQL Server database on a daily basis at some specific time, which is given in the job scheduler.
SQL Server Management Studio can be used to create a database backup job to take backup of a user database. Just follow some steps and UI work processes to create a simple backup job, run the job and you can see the results on the screen.
Step 1- SQL Server Management Studio and login with your credentials.
Step 2- After connecting to SQL Server, Expand Object Explorer=>SQL Server agent=>Expand Job=>Right click=>select in menu "New job". See the image, given below-
Step 3- Select General=>type name of SQL agent job. You can write the description also. See the image, given below-

Step 4- Select Steps=>Click "New"=>"OK" on bottom of the screen. See the image, given below-
After clicking new, open new tab and see in next screen.
Step 5- Select General=>type Step name=>Command. In command panel, you can use SQL query. See the image, given below-

Here, my query is used to take backup of SQL database. I have created a cursor to take backup files of the database.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.







Manav PandyaPosted Sep 15, 2016, 10:19 AM
Great approach for beginner ...
SubashPosted Sep 14, 2016, 12:24 AM
Nice one sir
Bikesh SrivastavaPosted Sep 6, 2016, 12:35 PM
Thanks
Midhun TpPosted Sep 6, 2016, 11:55 AM
Good one
Prasanna MuraliPosted Sep 6, 2016, 11:39 AM
Nice post....