Scripts

Technical Article

Delete old versions of DTS packages

This script will remove old versions of DTS packages. It accepts a single parameter which is used as a filter criteria on the package name. It will also remove package log records for the version that is deleted.EXAMPLE: EXEC usp_DelOldDTSPkgVersions @vcrPkgName = 'Devel'This will delete old versions for packages that have 'Devel' in the nameQuestions […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2002-11-30

1,188 reads

Technical Article

Remove old DTS Package versions

This Procedure is what I use to clean out all the old DTS package version on my server periodically. You just place it in the msdb database and run it as you need to.Note: Although I have never had an issue with it, I do suggest backup msdb database beforehand, just in case you wack […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2002-11-30

346 reads

Technical Article

Setting permissions (Updated: UDF's now set)

Here is a script I wrote to automate updating of permission on a database. Often running as sa I forget to set the rights for objects when distributing db objects. It provides the capability to process only certain object types, and whether or not to print and execute the persmissions change or just print out […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-22

472 reads

Technical Article

Grant/Revoke EXEC permissions  for all procs in DB

Useful in dev environments when you need to periodically assign execute permissions on all procs in a db (drop/create scripts may have been run without re-assigning permissions)Accepts DB name, ProcLike for matching 'starts with' pattern against proc names in DB, revoke (optional - defaults to 0/True) specifies wheter to GRANT or REVOKE permissions

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-21

424 reads

Technical Article

Monitoring SQL Server downtime

The following script creates a monitoring utility to find out for how long a sql server was down prior to the latest startup. The script creates one table (tblHeartbeat), four stored procedures (uspFillHeartBeat, uspGetDowntimeSummary, uspCleanHeartbeat, uspAtStartup) and two jobs (FillHeartbeat and CleanHeartbeat).Notes:1. By convention I introduced in my company (UGO Networks, Inc.) all "service" database […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-21

861 reads

Technical Article

Creat a Pivot Table with several options

Create a pivot Table similiar to Microsoft Access Pivot Command, Specify if there should be totals at the bottom, right or both..Uses a temporary table to hold the values..Bad part is the SQL that is generated can have no more than 4000 Characters..If not using any NVARCHAR characters, could make the sql up to 8000 […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-11-18

2,033 reads

Blogs

The Book of Redgate:A Prehistory

By

I’ve covered the values in a number of previous posts on the Book of...

Evidence-bound: what AgentDBA will and won’t link

By

When the evidence names the database, it says so. When it doesn’t, it stops....

Prep data for AI vs. Fabric Data Agent Instructions: What Goes Where?

By

Making Data AI-Ready, Part 3 (This is the final article in a three-part series...

Read the latest Blogs

Forums

Alamat BCA KCP Gondangdia Lama Telp:08218520153

By R4nt4u

WhatsApp CS 628218520153 Jl. RP. Soeroso No.25, RT.9/RW.5, Cikini, Kec. Menteng, Kota Jakarta Pusat,...

Alamat Kantor BCA KCP Alaydrus Telp:08218520153

By m4rt1n4

WhatsApp CS 628218520153 Jl. Alaydrus No.47 & 47 A, RT.8/RW.2, Petojo Utara, Kecamatan Gambir,...

SQL Server 2025 section missing?

By deubel_m

Hello, the title says it all. Is the SQL Server 2025 section missing?

Visit the forum

Question of the Day

Hyperscale Replicas III

In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?

See possible answers