Introduction
This post lists how to create new jobs in SQL 2012.
- Open ssms login in SQL Authentication:
- Start the SQL server agent if it is red color turn on like this:
- After starting the SQL Server agent double-click this agent, create a new job like this:
- Give name to this job I created name as
sampledb_backup
:
- Then, you can choose which logins you decided to authorize and category, also choose what we needed:
- Go to the second tab STEPS for what we performed in the database:
- Click new and give new name, then what type of language is to be selected. I am selecting T-SQL:
- After selecting this, you have to insert your queries like this or by using open button, you have to browse your queries:
- Then, pick the advanced button whether you have arranged one more step or finished my job you have used by this window:
- If job is a failure, what's next? You can run another job or quiet the job:
- Also, you can save that success or failure in a T-SQL format set path for output:
- After completing all these steps which login to perform this job, so you choose logins:
- Click ok, then click on the SCHEDULING tab:
- Give the name that you already created, time, occurs, time, date for user options:
- Other three tabs like alerts, notifications, targets is your choice of action can be performed like sending mail, etc.
That’s all. If there are any modifications to be done after saving that job,
go to SQL Server agent->jobs->
sampledb_backup
->double click, then modify it: