• Interests: Cricket, Astronomy, Robotics, Reading and RPG Games

Technical Article

Set logging properties for group of DTS packages

This script will set the Logging properties for a group of DTS packages. To run this script stand-alone, you'll need to set 6 variables. sSvr, sDb, sUid, sPwd, iSec and sPkgMatch. If you use this script in a DTS package, you can assign the values from Global Variables. The sPkgMatch variable is used as a […]

You rated this post out of 5. Change rating

2003-12-01

416 reads

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 […]

5 (2)

You rated this post out of 5. Change rating

2002-11-30

1,118 reads

Technical Article

Execute DTS package using OA procedures

This script will execute a DTS package using the sp_OA stored procedures. It accepts six parameters which specify the server name, security mode flag, userid, password, package name and optional package password.Eg:For SQL SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=0, @vcrUID='UserID', @vcrPWD='Password', @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'For Windows SecurityEXEC usp_ExecDTSPackage @vcrSrvr='Server', @bitIntSec=1, @vcrPkgName='Package Name', @vcrPkgPWD='Package Password'It uses a function […]

You rated this post out of 5. Change rating

2002-10-31

347 reads

Technical Article

Find and Replace VBScript within DTS Package

This script will find and replace specified text within all ActiveXScript tasks with a certain text string in the description. It was designed on SQL 2000, but I think it will run on SQL 7 as it doesn't reference any SQL 2000 specific properties. It opens a package object and then loops through the steps […]

You rated this post out of 5. Change rating

2002-10-31

618 reads

Technical Article

Report DTS Error Code and Description

This stored procedure extract the error code and description form the DTS package log tables in the msdb database.You just pass it the package name, step name and the time that the step started ( because you could end up with many entries in the log ) and it will return the Error Code and […]

You rated this post out of 5. Change rating

2002-10-25

2,659 reads

Technical Article

Return formatted datetime as a string

Pass a datetime value and receive back a formatted string. Much like the Format$ function in Visual Basic.I put this together to provide a date string to add to filename. Also handy when you are creating text files that require datetime data to be output in weird character formats like yyddmm or yyyymm.eg: fnDate2Char(GetDate(), 'dmy', […]

You rated this post out of 5. Change rating

2002-02-27

816 reads

Technical Article

Re-create Transaction log file

This stored procedure detaches and re-attaches a database without specifying a filename for the transaction log. This causes SQL Server to create log file with default size of 512kb.After playing around with SHRINKDATABASE, SHRINKFILE, forcing the virtual log to wrap around, etc... I found this was the quickest and most reliable method of reclaiming the […]

You rated this post out of 5. Change rating

2002-02-25

2,601 reads

Blogs

Deleting Stale Local Database Git Branches with SSMS–#SQLNewBlogger

By

I wrote a post recently about pruning branches in git. That’s part of the...

Microsoft Fabric shortcuts

By

I talked about Microsoft Fabric shortcuts in my blog post Microsoft Fabric – the...

Develop and Test Your Rollback Plan

By

he rollback plan... what to do when things go wrong to get back to...

Read the latest Blogs

Forums

Blocking question

By SQL Guy 1

Hi all, We have a SSIS package that does 2 things in parallel: moves...

can I monitor auto stats updates through extended events?

By Eric Mamet

We have pretty big tables very sensitive to stats with many updates. Our systems...

SSIS upgrade

By Sailor

I have about 40 packages that are dtsx files that were created with SQL...

Visit the forum

Question of the Day

Post Restore Tasks for the Resource Database

I backup the Resource database from my SQL Server 2022 instance. I then install CUs 1, 2, 3, and 4. I have an issue and need to restore my Resource database from backup. Is there anything I need to do after restoring this database?

See possible answers