Scripts

Technical Article

Stored Procedure to get Job History (with Steps)

This procedure returns the job history for any jobs run on a given day. The parameter should be entered in mm/dd/yyyy format surrounded by single quotes. I use it to produce a report of any jobs that failed on any given day.It should be created on the MSDB database.Example: EXEC usp_job_history '10/02/2004' This is my […]

You rated this post out of 5. Change rating

2004-10-04

2,159 reads

Technical Article

SQL SCRIPT to grant DBC_Execute to all user SP

SQL SCRIPT to grant DBC_Execute to all user defined Stored Procs.This SQL SCRIPT is handy specially after Stored Procs are DROPPED & CREATED; often users dont mention the SQL to grant DBC_Execute permission to the Store Procs.This SQL SCRIPT will grant execute permission to DBC_Execute for all user defined Stored Procs. The SCRIPT can be […]

You rated this post out of 5. Change rating

2004-10-03

178 reads

Technical Article

Verify all DBs are part of a Maintenance Plan

This is a script you can run on a per-server basis, from any database in Query Analyzer or incorporate into a stored procedure, that will examine all databases on that instance of SQL and show what Maintenance Plan(s) they are part of, if any. Shows clearly any databases that are not currently part of a […]

You rated this post out of 5. Change rating

2004-10-01

513 reads

Technical Article

Count elapsed business days between two dates

This is a UDF that counts the days between two dates ignoring weekends and corporate holidays (as supplied in a lookup table). This ignores the time component but could be adjusted should you need to. If both days are on the same work day then the elapsed days is considered 1. If started Monday and […]

You rated this post out of 5. Change rating

2004-09-30

430 reads

Technical Article

Last Day of Month

A script was recently published (Last_Date_Of_Month) that returns the last day of a given month/year combination. I have simplified and improved on that script by eliminating the need to use a WHILE loop. This new script exploits the flexibility of the DATEADD function which allows you to assign negative numbers (thus effectively subtracting a given […]

You rated this post out of 5. Change rating

2004-09-30

150 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers