Sysschedules Descriptive Essay

What is a descriptive essay? A descriptive essay is a short paper which is all about describing or summarizing a topic. You don't need to collect responses from other people like you do when writing an argumentative essay. Based on my own experience, I can tell that expository essays barely occupy more than one page. They won't take a plenty of time. Still, if you have no desire to work on the stuff like that or you want to impress your essay reader even with such a simple assignment, contact academic writers for hire to have your vivid essay done in several hours.

GET HELP FROM US


No details, no proofs, no special effort... It is the simplest academic homework essay. In general, students should illustrate a descriptive essay with words instead of using pictures. Describe whatever you see, feel, touch, taste, or hear about the target topic. Learn here how to write an A-level college essay.

A descriptive essay about a place, for instance, must provide author's impressions from attending a certain place in the world: from a small town to the biggest country. We explain how to write a descriptive essay based on its types.

How to Write a Descriptive Essay: Types to Consider

Study professional descriptive essay examples to understand each type listed below better. A descriptive essay can describe any of the following issues:

  • Human essay. It is much harder to tell about a person. Overall, such task would mean telling about the appearance, actions, behaviors, mood, and qualities of the chosen individual.
  • Place essay. The primary thing you should understand to find out how to write a descriptive essay about a place is the paper's focus. Focus on describing places with the most breathtaking sights; let your reader feel the might of such cities as New York or Rome in your description.
  • Event essay. You can describe your last vacation, loud rock gig, summer music festival, graduation day, or Euro trip.
  • Animal essay. Wild nature is full of wonders - choose the animal you like most of all or the one you can associate with yourself.
  • Occupation essay. Writing about the job of your dream is good training before preparing an admissions essay or job resume.
  • Behavior essay. If you want to describe the freaky behavior of your best friend to show how the same people act under different conditions, it's your chance!

We can explain just anything in details. The goal is to make it sound both artistically and officially.

Keep in mind you can count on help with writing a descriptive essay from academic experts who care about your performance.

100 Descriptive Essay Topics for Any Taste

We have selected 100 most outstanding descriptive essay topics most of the school and college tutors expect to see from each student. Mind that these are only the examples of the descriptive essay ideas; students can think of their own original topics by replacing some words with more suitable.

Despite there are many topics you might want to describe in detail, it is better to focus on a single person/place/event/object not to lose the point. Consider these 100 topics for your argumentative essay. A descriptive essay refers to showing than telling; deliver the main idea to your readers through drawing a picture of what you want to say.

Person/People Essay Ideas

  1. Make a detailed description of your mother (other relatives).
  2. Provide a vivid description of your role model. It could be your favorite actor, singer, movie director, fashion model, political figure, best friend, parents, etc.
  3. Why does Martin Luther King deserve respect?
  4. Describe a character from your favorite TV show (e.g. Buffy Summers, Piper Halliwell, Clark Kent, etc.)
  5. Choose a famous villain and reveal his personality.
  6. Describe specific traits you enjoy in one of your peers.
  7. List features of your boyfriend/girlfriend (fiancé/bride) which make this person so important in your life.
  8. Would you prefer Wonder Woman or Xena, Warrior Princess?
  9. Essay: Share a description of your most liked teacher.
  10. Why do you believe John Kennedy was a great political figure on the examples of his contribution to the US society?
  11. Explain why your favorite actress is better than the others.
  12. Why would a certain person behave in the way he/she does?
  13. Which psychological factors had the greatest impact on your own behavior?
  14. Describe a person whom you hate.
  15. Share description of your least favorite movie.
  16. Essay: Which horror film character has scared you to death?
  17. How would you act if you meet your favorite celebrity on the street one day?
  18. What traits belong to the term "best friend"?
  19. How would you define your potential enemies?
  20. Describe why you believe in a friendship between man and woman based on your own experience.
  21. Write who your favorite business manager is.
  22. Write how a perfect fashion model should look like today.
  23. Write why you think Abraham Lincoln deserves a special place in the history of the US.
  24. Essay: List specific features which make your mom stand out from the rest of the mothers.
  25. Why is your dad the kindest dad in the world?

Place/Location Descriptive Essay Examples

  1. Provide details on the house you're living in. Would you like to change something about it, move away to another location, or stay without fixing anything, and why?
  2. Where would you like to rest next winter and why?
  3. Share an example of a perfect summer location with your readers.
  4. Provide details on your favorite winter location.
  5. Some students want to describe the rooms they are living in on campus. Share ideas how the college/university community could unite to make this place better.
  6. Describe the top favorite place in your native country.
  7. Essay: How do you picture an ideal place to have a wedding ceremony?
  8. Write about the place where people can see the brightest stars in the sky.
  9. Think of the features of the perfect place to have the loudest rock gig ever!
  10. List the names of the countries you would like to visit.
  11. My hometown is in my heart and soul.
  12. Why has Melbourne the heart of Australia despite it is not even its capital city?
  13. Describe the loudest place you used to visit.
  14. Write about the place you think is the best in the whole world.
  15. Essay: Tell more about the place you're studying in.
  16. Describe the places you attended with your parents.
  17. Describe the most beautiful garden you have ever seen.
  18. Name the place you would choose for the summer festival.
  19. Write about 7 Wonders of the World.
  20. Write what you believe is the eighth Wonder of the World.
  21. Write how you feel when attending your childhood places.
  22. Essay: Write down why you prefer your native country over any other places in the world.
  23. Write how you can get to the certain destination.
  24. Describe a location for a perfect student party.
  25. Write about your favorite place which exists only in the fiction.

ORDER CHEAP SOLUTION HERE

Memory/Mind Essay Ideas

  1. Help your readers picture the best day of your life using vivid descriptions, different examples, original comparisons, and more attributes of the talented essay writer.
  2. What was the most special thing on your last trip to the sea?
  3. Do you remember the first birthday of your best friend?
  4. Create a map which would allow people to travel your mind to see a bit of your experience.
  5. Describe the introductory day in any of the existing educational institution - school, college, or university - using the entire spectrum of emotions.
  6. Essay: What would you call the ugliest experience in your life?
  7. Find proper words to describe the memories associated with the beloved person who used to die.
  8. List the things you like doing with your grandparents.
  9. Describe the event in your academic life which makes you proud enough to share it with the admissions officers later.
  10. Provide a description of the first time falling in love.
  11. Provide a description of the day in your life when something you like (e.g. hobby, art, music band, comic book, other objects) has almost changed your vision completely.
  12. Describe what you believe young children tend to memorize best of all.
  13. Essay: Help your readers understand how it feels like in the mountains.
  14. Do you like riding the bicycle?
  15. Describe the last time you were abroad.
  16. Share your feelings with the readers who wish to learn more about taking part in the exchange
  17. How did you feel during your English language exam?
  18. Which event from your life made you feel scared?
  19. Describe something that made you laugh to death.
  20. Offer details on your visit to London.
  21. Describe a silent place in the woods you love since your early ages.
  22. Write how you remember the first snow in your life.
  23. Write why it is important to keep a diary.
  24. Essay: Write down several things you remember from your tenth birthday.
  25. Write how it feels to attend the funeral based on your memory.

Object/Thing Descriptive Essay Topics

  1. Dedicate several powerful paragraphs to what you consider your family relict.
  2. Describe an object which you believe has once saved your life or prevented other adverse consequences for you or one of your close people.
  3. The Silk Road.
  4. Find appropriate words to describe something you wanted so bad you were ready to steal it due to the fact you did not have enough money to buy it.
  5. The most expensive painting ever sold.
  6. Pick one of the recent technological innovations. Make a description explaining why this particular thing plays in important role in the development of modern society.
  7. Essay: There is one more thing every writer should keep in mind to have a full vision of how to write a descriptive essay about yourself.
  8. Providing a description of distance and time from the physical aspect.
  9. Wonderful things every human should know from the Ancient World (choose Egypt, Greece, or Rome)
  10. How would you describe the icons in your home?
  11. The Empire State Building (or any other magnificent construction)
  12. Taj Mahal: historical value.
  13. Solar System and planets in it.
  14. The role of Bible in our life.
  15. Essay: A comfortable bed as a definition of good sleep.
  16. Can a dress make a man?
  17. Why do we love soft toys that much?
  18. Things to take with you on a sea trip.
  19. What can money change in the life of every person?
  20. The true value of vegetables in the markets.
  21. Essay: Write why your old Tamagotchi still matters to you.
  22. Write how your favorite video game has impacted you.
  23. Write down specific attributes which make your favorite doll special.
  24. Describe your living rooms in detail.
  25. Describe the neighboring house in detail.

Want to view several good descriptive essay examples from experts? We have attached the best samples to observe!

Common Structure: How to Write a Descriptive Essay

The structure of such essay depends on the topic. There is no need to follow strict chronology if you write about a person/object, but you should mind the order of events in the essay describing a place. Do not waste time on in-depth research or search for many sources - focus on writing about your feelings.

Work on the senses. To succeed, it is important to create 5 titled columns on a separate worksheet to list five human senses. Any good descriptive essay must cover each of the five senses, taste, sight, touch, smell and sound, to make the reader(s) feel the full spectrum of emotions associated with the chosen topic. It is obvious that some topics are better associated with certain feelings than others; focus on these feelings when describing the issue in detail.

Writing an outline. Create an outline to be your action plan during the entire writing process. No matter whether you're a high school student or the one studying in college, the teachers everywhere expect to see a 5-paragraph descriptive essay. Descriptive essays belong to the category of creative pieces. Use them to expand your imagination by lengthening the text. The standard outline covers five paragraphs: introduction, 3-5 body paragraphs, and conclusion. Descriptive essays do not have a reference page as the obligatory part. Add important sources if you're not reflecting personal experience.

Explore how a professional descriptive writing looks in several great descriptive essay examples!

Descriptive writing is not a piece of cake, but some expert recommendations help students to overcome different obstacles in their academic life:

"Most of my students wondered how to write a descriptive essay about a person, place, or object. The best topic is one that writer has a deep connection with. No matter whether you have a list of wonderful topics or the one your teacher expects to see: brainstorming is the key! I recommend this technique to every student. Once you master brainstorming, it would be easier for you to work in a team within any environment. I like original ideas such as Things to Do in Your City, The Funniest Memory, A Perfect Day with a Favorite Rock Star, Detailed Description of the Self-Invented Food, and more."

Lisa Head, Literature Professor at University College London (UCL)

DESCRIPTIVE ESSAY FORMULA

  1. Pre-writing stage. Do you have a clear image of the object you’re going to describe? Look at all sources you have on hands to define whether they provide all important information on the topic of your choice. Mind that having an experience in the discussed field would be a plus. Focus on your own senses, taste, smell, and other feelings while recalling your example, and then create an action plan for further writing.
  2. How to start a descriptive essay? Start writing with a powerful, eye-catching hook to grab the reader's attention: simile, metaphor, literary quote, famous people quotations, poetry lines, interesting facts, jokes, etc.
  3. Create a draft of your expository essay. You may put all words that come to your mind; you'll have a chance to make your ideas shorter later. It's not enough to tell - show the image of the object with the help of words only. The way you create a mental image for the reader defines your ability to make up a good descriptive essay. It is the quality of a skilled narrator as well.
  4. Adding details to your essay with the help of enriched English vocabulary and online dictionaries. Use your English language vocabulary to add all missing feelings like hearing to the descriptive essay last Play with adjectives and adverbs. Mind your language when writing a descriptive paper - it must be lyrical to deliver all your feelings in full. Involve many different adjectives.
  5. Take time to revise and edit the paper with the help of various free online grammar checking tools. Once you have described your vivid place, check the structure of your essay again to answer several critical questions: Can the sentences or paragraphs be arranged in a better way? Are any transition words missing? Put down all sources used to describe your topic; make sure the descriptive essay is following the tutor's instructions in full.
  6. Edit the descriptive essay. Try to avoid any grammar, spelling, or punctuation mistakes to show how great your knowledge of the language is.

After completing your final descriptive essay draft, it is better to keep in touch with some experts to have the assignment fully checked. You should evaluate your work critically. Proofread and edit the descriptive essay to eliminate or fix any mistakes. You may be interested in adding some details in case you require telling something more about your main object.

  • What does a general revision process involve?
  • Are there enough details to make it possible for your readers to obtain a full and vivid perception?
  • Have you missed any small but significant descriptive details?
  • Are there words that convey the emotion, feeling (touch, smell, etc.) or perspective?
  • Does your essay possess any unnecessary details in your description which can be thrown away or replaced by the more meaningful information?
  • Does each section of your essay focus on one aspect of your description?
  • Are all paragraphs arranged in the most efficient way; are they properly connected with the help of corresponding transition words?

Want a professional academic writing help to get rid of all troubles? Students tend to have too many homework assignments along with the need to study important material for their exams. We would like to offer a better opportunity than hiring expensive freelance writers who lack corresponding experience - place your order with the team of certified online academic tutors, and obtain top-quality descriptive essay on the topic of your choice!


GET YOURSELF AN ASSIGNMENT WRITTEN FROM SCRATCH!

 Seeking professional writing guidance? – This is just the right place! 

Get a price quote & proceed with the order!

Description

Keeping track of our SQL Server Agent jobs is a very effective way to control scheduling, failures, and understand when undesired conditions may be manifesting themselves. This is a brief journey towards a solution that provides us far greater insight into our jobs, schedules, and executions than we can glean from SQL Server by default.

Introduction

When we consider SQL Server performance metrics for use by database professionals, a long list comes to mind:

  • Waits
  • CPU
  • Memory utilization (buffer cache, plan cache, server memory)
  • Contention (locks, deadlocks, blocking)
  • I/O (reads, writes by database/file/object)
  • Many, many more…

A metric often overlooked is job performance. The alert we most often respond to is a failed job. When a backup, warehouse load, or maintenance task fails, we are alerted and know that some response is needed to ensure we understand why and how it failed.

Job failures are not always avoidable, but our goal is to prevent systemic or catastrophic failures. If we discover that an important ETL process is taking 23 hours to complete per day, then it is obvious we need to revisit the job, the work it performs, and rearchitect it to be more efficient. At that time, though, it is too late. We need to keep our important data flowing, but at the same time ensure that the long-running process doesn’t slow to the point of being ineffective, or fail.

Our goal is to take job-related metadata and run statistics from MSDB and compile them into a simple but useful store of reporting data that can be trended, monitored, and reported on as needed.

What Are the Benefits of Job Performance Tracking?

The immediate benefits of tracking this sort of data are obvious in that we can keep an eye out for very long-running jobs and (hopefully) catch a problematic situation before it becomes a 2 am wake-up call!

There are additional insights we can glean from this data that can make it even more useful, such as:

  • Locate short-running jobs that run unusually fast, indicating that they are not performing the expected workload. For example, if the full database backup of a 10TB database completes in 5, we know something is very wrong. Especially if the average runtime of this job is typically 2 hours!

  • Trend job runtime and predict how long jobs will take in the future. This allows us to predict when we may need to evaluate the efficiency of current processes before they become problematic.
  • Track individual job steps to focus on larger jobs and which parts might need attention.
  • Aggregate job performance across a sharded or multi-server environment to determine overall efficiency.
  • Improve our ability to schedule new jobs, by being able to easily view job scheduling data on a server.
  • Allow us to better plan server downtime by reviewing job scheduling and runtime data. This provides us with information on what jobs could be missed (or need to be run later) in the event that a server is brought down. This could also be useful after an unexpected outage, allowing us to review any missed or failed jobs en masse.

With some creativity, other uses can be concocted for this data, including tracking SSIS package execution, replication performance, backups, index maintenance, ETL processes, warehouse data loads, and more!

Why Doesn’t Everyone Do This?

As with many alerting, monitoring, or trending processes, we often don’t see a need for them until something breaks and a need arises. Until a job or related process fails, the need to pay attention to runtimes may not be realized.

To make matters more difficult, SQL Server does not provide a spectacular way to monitor and trend job progress and results over time. SQL Server Agent contains a GUI that can show us details on recent job outcomes, as well as the ability to monitor jobs in progress:

From the SQL Server Agent menu, we can click on Job Activity Monitor in order to view the up-to-the-minute status of each job. From the jobs menu, the history for all or any subset of jobs can be viewed, as well as for any single job:

This information is useful, but its utility is limited in a number of ways:

  • Job history is stored in MSDB for a limited amount of time, based on a server’s configuration. Metrics about previous job runs may be removed once past a set retention period.
  • There are few ways to trend or view any metrics over a period of time.
  • Viewing the combined job history for multiple servers is not intuitive.
  • We have little ability to customize how this data is presented to us.

An alternative to navigating job history data via the GUI is to use a handful of views within MSDB, each of which provides data on job configuration, job schedules, and job history:

  • MSDB.dbo.sysjobs: Provides a list of all jobs on the local SQL Server, along with relevant metadata.
  • MSDB.dbo.sysschedules: Contains all job schedules defined on the local server, along with their details.
  • MSDB.dbo.sysjobhistory: Contains a row for each job and job step that is executed on the local server.
  • MSDB.dbo.sysjobschedules: Contains a row per job/schedule relationship.
  • MSDB.dbo.sysjobactivity: Contains details on recent job activity, including accurate future runtimes.

These views provide valuable information but are not easy to read and consume. While Microsoft provides documentation on their purpose and contents, many of the data types are suboptimal, and the mixed contents of sysjobhistory are not intuitive.

For example, dates and times are stored as integers. 03:15:05 is stored as 31505 and 9/23/2016 is 20160923. Job run duration is stored as an integer in the format HHMMSS, such that 85 seconds would appear as 125 (one minute and twenty-five seconds). Job schedules are stored using numeric constants to represent how often they run, run time, and run intervals.

Given the unintuitive interface for pulling job history data, it’s often seen as not worth the time to pull, convert, and present the data unless absolutely needed. Alternatively, enterprise job scheduler software can be purchased that will manage SQL Server Agent jobs. While convenient, software costs money and not all companies can or want to spend resources on this sort of software.

Building a Job Performance Tracking Solution

Given the constraints presented thus far, we can choose to build our own solution for collecting and storing job performance metrics. Once collected, reporting on them becomes a simple matter of defining what we want to see and writing some simpler queries to crunch our data appropriately.

The steps we will follow to create a self-sufficient solution to the problem presented above are:

  1. Create new tables that will store job performance metrics.
  2. Create a stored procedure to collect job metrics and store them in the tables above.
  3. Clean up old data, as prescribed by whatever retention rules we deem necessary.
  4. Schedule a job to regularly collect our job performance data.
  5. Create reports that consume this data and return useful results (see the next section).

As we build this solution, feel free to consider ways of customizing it. Add or remove columns or tables that you don’t think are important to your needs and adjust processes to fit the data you need. The beauty of any hand-built process is the ability to have complete control over customization and implementation!

Tables

We’ll create four tables to store data pertinent to our metrics. Two will be dimension tables that include basic information about jobs and schedules. The other two will contain job and job step execution results. These tables are structured like warehouse tables in order to facilitate easier consumption by reporting products or processes, though you are free to name & structure based on whatever standards you typically follow.

This table stores a row per Agent job, with the Sql_Agent_Job_Id being pulled directly from MSDB.dbo.sysjobs. Since this is a GUID, we choose to create a surrogate key to represent the clustered primary key on the table to help improve performance when writing to this table.

Persisting this data allows for retention of job data, even if a job is disabled or deleted on the server. This can be useful for understanding how a job previously performed, or how a new and old version of a process compare.

Similar to the previous dimension table, this one stores a row per schedule, as found in MSDB.dbo.sysschedules, with schedule_id being the unique identifier per schedule. This data is somewhat optional in that we do not need schedule details in order to understand when jobs run, for how long, and their results, but the added information is useful for understanding what schedules are used, and for what jobs.

If desired, we could also create a linking table that illustrates the relationships between jobs and schedules, allowing us to understand when jobs are supposed to run, which schedules they run under, and predict future job schedules. This information is also not needed in order to fully comprehend job history but could be useful for predicting the best times for planned maintenance, outages, or to effectively schedule new jobs. Data for this task can be pulled from MSDB.dbo.sysjobschedules and is a linking table that contains a single row per job-schedule pairing (a one-to-many relationship). We can easily create a small table to store and maintain this data:

A surrogate key is used as a more reliable clustered index, but a combination of job_id and schedule_id would also work. Next_Run_Datetime is optional, but could be handy under some circumstances. Note that the accuracy of this column will be based on how frequently this data is updated. If the job runs more often than the collection of our job performance data, then this column will not always be up-to-date.

Now we can introduce the table where job run statistics will be stored. Each row represents a single job run for a given job_id, when it started, its duration, and its completion status. The end time is a computed column, as we can determine it easily once the start time and duration are known. The status will contain a friendly string indicating the job result: Failure, Success, Retry, or Canceled. Note that the schedule that triggered the job is not referenced here. As a result, schedule data is not required for this to work but is nice to have in general.

This table is similar to our last one, and stores the metrics for individual job steps. Completed job data is omitted from this data as it is stored in the other table. In addition, steps in progress are not recorded—only those that have completed. Depending on your use-case, there could be value in combining job and job step data into a single table, much like how MSDB.dbo.sysjobhistory stores it. Here, we choose to separate them as we may not always want individual step data, and having to carve this out from a larger data set could be a nuisance in terms of report/script development and performance.

Metrics Collection Stored Procedure

Now that we have built a number of custom tables to store our job performance data, the next step is to create a process that pulls the data from MSDB, transforms it into a more user-friendly form, and stores it in those tables. We will manage the gathering of data for each table separately, allowing for easier customization and testing of our code.

The name is arbitrary, but this seems descriptive enough. No parameters are used by the stored procedure as I intentionally want to keep this as simple as possible. If you have a need to pass in additional configuration or timing options, doing so should be relatively easy.

We’ll collect job schedules first as this data is relatively small & simple. The TSQL above allows us to find the date/time of the last change in our data set and only collect modifications that have occurred since then. If no data exists, then we set our last modify date/time to a very old date, in order to ensure we collect everything on the first job run.

With this housekeeping out of the way, we can proceed to collect all schedule data from the local SQL Server. A MERGE statement is used for convenience, as it allows us to insert and update rows appropriately all at once. While this TSQL looks long, it’s messiness is primarily due to the need for us to convert integer identifiers in MSDB.dbo.sysschedules into more readable data types. These conversions are not pretty, and there are many ways to accomplish this, but by fixing our data now, we make using it later much, much easier.

 

CREATE TABLE dbo.dim_sql_agent_job

(dim_sql_agent_job_Id INTNOTNULLIDENTITY(1,1)CONSTRAINT PK_dim_sql_agent_job PRIMARY KEY CLUSTERED,

Sql_Agent_Job_Id UNIQUEIDENTIFIER NOTNULL,

Sql_Agent_Job_Name NVARCHAR(128)NOTNULL,

Job_Create_Datetime DATETIME NOTNULL,

Job_Last_Modified_Datetime DATETIME NOTNULL,

Is_Enabled BIT NOTNULL,

Is_Deleted BIT NOTNULL

);

 

CREATE NONCLUSTERED INDEX IX_dim_sql_agent_job_Sql_Agent_Job_Id ON dbo.dim_sql_agent_job(Sql_Agent_Job_Id);

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

 

CREATE TABLE dbo.dim_sql_agent_schedule

(Schedule_Id INTNOTNULLCONSTRAINT PK_fact_sql_agent_job_schedule PRIMARY KEY CLUSTERED,

Schedule_Name NVARCHAR(128)NOTNULL,

Is_Enabled BIT NOTNULL,

Is_Deleted BIT NOTNULL,

Schedule_Start_Date DATE NOTNULL,

Schedule_End_Date DATE NOTNULL,

Schedule_Occurrence VARCHAR(25)NOTNULL,

Schedule_Occurrence_Detail VARCHAR(256)NULL,

Schedule_Frequency VARCHAR(256)NULL,

Schedule_Created_Datetime DATETIME NOTNULL,

Schedule_Last_Modified_Datetime DATETIME NOTNULL

);

 

CREATE NONCLUSTERED INDEX IX_dim_sql_agent_schedule_Schedule_Last_Modified_Datetime ON dbo.dim_sql_agent_schedule(Schedule_Last_Modified_Datetime);

 

 

CREATE TABLE dbo.fact_sql_agent_schedule_assignment

(fact_sql_agent_schedule_assignment_id INTNOTNULLIDENTITY(1,1)CONSTRAINT PK_fact_sql_agent_schedule_assignment PRIMARY KEY CLUSTERED,

Sql_Agent_Job_Id UNIQUEIDENTIFIER NOTNULL,

Schedule_Id INTNOTNULL,

Next_Run_Datetime DATETIME NULL

);

 

CREATE NONCLUSTERED INDEX IX_fact_sql_agent_schedule_assignment_Sql_Agent_Job_Id ON dbo.fact_sql_agent_schedule_assignment(Sql_Agent_Job_Id);

 

 

CREATE TABLE dbo.fact_job_run_time

(Sql_Agent_Job_Run_Instance_Id INTNOTNULLCONSTRAINT PK_fact_job_run_time PRIMARY KEY CLUSTERED,

Sql_Agent_Job_Id UNIQUEIDENTIFIER NOTNULL,

Job_Start_Datetime DATETIME NOTNULL,

Job_End_Datetime ASDATEADD(SECOND,job_duration_seconds,Job_Start_Datetime)PERSISTED,

Job_Duration_Seconds INTNOTNULL,

Job_Status VARCHAR(8)NOTNULL

);

 

CREATE NONCLUSTERED INDEX IX_fact_job_run_time_job_start_time ON dbo.fact_job_run_time(Job_Start_Datetime);

CREATE NONCLUSTERED INDEX IX_fact_job_run_time_Sql_Agent_Job_Id ON dbo.fact_job_run_time(Sql_Agent_Job_Id);

 

 

CREATE TABLE dbo.fact_step_job_run_time

(Sql_Agent_Job_Run_Instance_Id INTNOTNULLCONSTRAINT PK_fact_step_job_run_time PRIMARY KEY CLUSTERED,

Sql_Agent_Job_Id UNIQUEIDENTIFIER NOTNULL,

Sql_Agent_Job_Step_Id INTNOTNULL,

Job_Step_Start_Datetime DATETIME NOTNULL,

Job_Step_End_Datetime ASDATEADD(SECOND,Job_Step_Duration_seconds,Job_Step_Start_Datetime)PERSISTED,

Job_Step_Duration_seconds INTNOTNULL,

Job_Step_Status VARCHAR(8)NOTNULL

);

 

CREATE NONCLUSTERED INDEX IX_fact_step_job_run_time_Sql_Agent_Job_Id_Sql_Agent_Job_Step_Id ON dbo.fact_step_job_run_time(Sql_Agent_Job_Id,Sql_Agent_Job_Step_Id);

CREATE NONCLUSTERED INDEX IX_fact_step_job_run_time_job_step_start_time ON dbo.fact_step_job_run_time(Job_Step_Start_Datetime);

 

 

CREATE PROCEDURE dbo.usp_get_job_execution_metrics

AS

BEGIN

SET NOCOUNT ON;

 

 

DECLARE@Schedule_Data_Last_Modify_Datetime DATETIME;

SELECT

@Schedule_Data_Last_Modify_Datetime=MAX(dim_sql_agent_schedule.Schedule_Last_Modified_Datetime)

FROM dbo.dim_sql_agent_schedule;

IF@Schedule_Data_Last_Modify_Datetime ISNULL

BEGIN

SELECT@Schedule_Data_Last_Modify_Datetime='1/1/1900';

END

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

 

MERGE INTO dbo.dim_sql_agent_schedule ASSCHEDULE_TARGET

USING(

SELECT

sysschedules.schedule_id,

sysschedules.name ASSchedule_Name,

sysschedules.enabled ASIs_Enabled,

0ASIs_Deleted,

CAST(SUBSTRING(CAST(sysschedules.active_start_date ASVARCHAR(MAX)),5,2)+'/'+SUBSTRING(CAST(sysschedules.active_start_date ASVARCHAR(MAX)),7,2)+'/'+SUBSTRING(CAST(sysschedules.active_start_date ASVARCHAR(MAX)),1,4)ASDATE)ASSchedule_Start_Date,

CAST(SUBSTRING(CAST(sysschedules.active_end_date ASVARCHAR(MAX)),5,2)+'/'+SUBSTRING(CAST(sysschedules.active_end_date ASVARCHAR(MAX)),7,2)+'/'+SUBSTRING(CAST(sysschedules.active_end_date ASVARCHAR(MAX)),1,4)ASDATE)ASSchedule_End_Date,

CASEsysschedules.freq_type

WHEN1THEN'Once'

WHEN4THEN'Daily'

WHEN8THEN'Weekly'

WHEN16THEN'Monthly'

WHEN32THEN'Monthly (relative)'

WHEN64THEN'At Agent Startup'

WHEN128THEN'When CPU(s) idle'

ENDASSchedule_Occurrence,

CASEsysschedules.freq_type

WHEN1THEN'Once'

WHEN4THEN'Every '+CONVERT(VARCHAR,sysschedules.freq_interval)+' day(s)'

WHEN8THEN'Every '+CONVERT(VARCHAR,sysschedules.freq_recurrence_factor)+' weeks(s) on '+

LEFT(CASEWHEN sysschedules.freq_interval&  1=  1THEN'Sunday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&  2=  2THEN'Monday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&  4=  4THEN'Tuesday, '   ELSE''END+

CASEWHEN sysschedules.freq_interval&  8=  8THEN'Wednesday, 'ELSE''END+

CASEWHEN sysschedules.freq_interval&16=16THEN'Thursday, '  ELSE''END+

CASEWHEN sysschedules.freq_interval&32=32THEN'Friday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&64=64THEN'Saturday, '  ELSE''END,

LEN(CASEWHEN sysschedules.freq_interval&  1=  1THEN'Sunday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&  2=  2THEN'Monday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&  4=  4THEN'Tuesday, '   ELSE''END+

CASEWHEN sysschedules.freq_interval&  8=  8THEN'Wednesday, 'ELSE''END+

CASEWHEN sysschedules.freq_interval&16=16THEN'Thursday, '  ELSE''END+

CASEWHEN sysschedules.freq_interval&32=32THEN'Friday, '    ELSE''END+

CASEWHEN sysschedules.freq_interval&64=64THEN'Saturday, '  ELSE''END)-1)

WHEN  16THEN'Day '+CONVERT(VARCHAR,sysschedules.freq_interval)+' of every '+CONVERT(VARCHAR,sysschedules.freq_recurrence_factor)+' month(s)'

WHEN  32THEN'The '+CASEsysschedules.freq_relative_interval

WHEN1THEN'First'

WHEN2THEN'Second'

WHEN4THEN'Third'

WHEN8THEN'Fourth'

WHEN16THEN'Last'

END+

CASEsysschedules.freq_interval

WHEN1THEN' Sunday'

WHEN2THEN' Monday'

WHEN3THEN' Tuesday'

WHEN4THEN' Wednesday'

WHEN5THEN' Thursday'

WHEN6THEN' Friday'

WHEN7THEN' Saturday'

WHEN8THEN' Day'

WHEN9THEN' Weekday'

WHEN10THEN' Weekend Day'

END+' of every '

0 thoughts on “Sysschedules Descriptive Essay

Leave a Reply

Your email address will not be published. Required fields are marked *