Creating T-SQL Jobs
T-SQL jobs can perform just about any SQL Server–related task you desire. Most administrative actions can be performed using T-SQL commands. If you do not know the command, but you know how to do it in the GUI interface of SSMS, begin the process within the GUI and use the Script button to learn the T-SQL code. Then, you can take that T-SQL code and schedule the action as a job.
To provide an example of a common T-SQL–based job, Exercise 13.1 steps you through the process of creating a job that will perform a backup of the AdventureWorks database and then create a snapshot of the same database. The job will include two steps: one for the backup and one for the snapshot. Do not worry about the concept of a snapshot at this ...
Get SQL Server® 2008 Administration: Real World Skills for MCITP Certification and Beyond now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.