Scripts

Technical Article

Latest DTS Package Log

This script returns the latest package log for the DTS package specified in the @package_name variable.  The interface for viewing DTS package logs through Enterprise Manager is limited in the fact that it doesn't provide textual descriptions of the values for the Step Execute Status and Step Execute Results.  This makes it difficult to trace […]

You rated this post out of 5. Change rating

2002-10-22

618 reads

Technical Article

WorkingDaysDiff complementary UDF for DATEDIFF

We frequently have to work out a date based on a number of working days before or after a specified date, excluding Saturdays and Sundays.Attached is the script to create the function.  I call another function called fn_Midnight which was designed to help whe programmers get a date with no time portion without having to […]

You rated this post out of 5. Change rating

2002-10-22

478 reads

Technical Article

Format a DOS date as yyyymmdd

Do you run jobs that call BAT files where you wish you could include a formatted date stamp in the output name of an OSQL file? Well, you can using the DOS 'FOR' command. I named a variable FILEDATE and use it as: path\Filename_%FILEDATE%.txt (Note: A BAT file requires double %% in the 'FOR' command […]

4.5 (2)

You rated this post out of 5. Change rating

2002-10-21

1,094 reads

Technical Article

Get Number of Days in month

Have seen existing scripts to work out number of days in month. They tend to work out the month, and then whether it's a leap year.Another approach is to take the date passed in, find the first day of the next month, and then use Datadd to take off one day, ie: last day of […]

4 (1)

You rated this post out of 5. Change rating

2002-10-17

415 reads

Technical Article

sp_checksqlversion

How many times have you seen @@version return a number but failed to interpret what service pack it is? Although SQL 2000 gives a gift (SERVERPROPERTY) of querying a readable value, my script will remedy the puzzle and show more parameters such as CPU speed, memory, windows version, and installation date. The limitations are:1. MSDE […]

You rated this post out of 5. Change rating

2002-10-16

453 reads

Technical Article

Create And Execute Table Script (SQL Server 2000)

This SP will only work on SQL Server 2000 and can be placed in your master database. sp_CreateAndExecTableScript is designed to script one table and create an identical table. I designed it to use with DTS packages so that I can create an identical table with a different name, pump data into the table and […]

5 (3)

You rated this post out of 5. Change rating

2002-10-15

2,506 reads

Technical Article

Linked SQL Servers,  databases, and users Report

Fixed user protion of the script. Sorry had the test script mixed with prod. I was asked to create a report listing all of our SQL Servers, and the databases on them. I was also asked to list everyone that has access to each database and whether it was a standard, windows or windows group […]

You rated this post out of 5. Change rating

2002-10-15

1,053 reads

Blogs

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Read the latest Blogs

Forums

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Do You Want a Microsoft Solution?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Do You Want a Microsoft...

The Density Vector

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Density Vector

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