Q1. You want to schedule a data export task every 3 hours during the workday (8 A.M. to 5 P.M.), every 6 hours during the night, and every 12 hours on the weekend. What's the best method?

  1. Set up three jobs, scheduling one for the workday with a 3-hour interval, one in the evening on a 6-hour interval, and the third on the weekend at a 12-hour interval.
  2. Set up one job that has three steps in the job flow with the correct time intervals.
  3. Set up one job, and give it three different schedules.

The correct answer is c. Any job can have multiple schedules; your job is to make sure they don't overlap.

Q2. You want to regularly back up a database to a local file by using the SQL Server backup function, then copy the file to another computer where it can be written to tape. What's the easiest way to accomplish this task?

  1. Schedule the SQL Server backup, then use the AT command to schedule an OS-level task in a batch file to copy the backup file.
  2. Set up two SQL Server tasks: one to perform the backup and the next to do the file copy. You would schedule the tasks with a suitable interval between each to let the backup complete.
  3. Set up one SQL Server job that has two steps: a SQL Server backup followed by an OS-level command to copy the file. You would schedule the job as if it were one task.
  4. Set up a SQL Server backup by using a T-SQL command string, then place the command in a batch file and use osql to start the job. You would use the AT command to schedule this batch file, which, on completion, calls another batch file to perform the file copy.

The best answer is c. Although a and b would work, those approaches are more complex than setting up one job with multiple steps. In the same vein, d might work, but it's far too complex; you'd have to be a command-line junky to try this approach.

Q3. Which of the following can you run as a job step? (Select all correct answers)

  1. JavaScript
  2. EXE file
  3. Batch file
  4. Visual Basic (VB) Script
  5. T-SQL command

You can run all of the above from within a job flow.

Q4. You check a job's history and notice that the job history log lists only the job's last few occurrences. You know the job has run successfully each week for the past 6 months, but the history file has only 10 entries for the job. What could be the problem? (Select all possible answers)

  1. The job history log shows the history for this session only since the server was started; you need to look at older job history logs to see the previous entries.
  2. You have set the job history log to a maximum of 10 rows per job.
  3. Someone manually cleared the job history log.
  4. A frequently run job is filling the job history log with entries that are overwriting older entries, including entries for this job.
  5. The system truncated the history log, which was almost full.

You're correct if you chose b, c, and d as possible causes. If you chose a, you're thinking of the SQL Server error log, which starts over each time you restart the service, archives the previous version as a file, and keeps six previous files. Answer e is totally off track; the job history log is an msdb table, sysjobhistory, not a log in the normal database sense.