SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Set logging properties for group of DTS packages

By philcart, 2003/12/01

Total article views: 172 | Views in the last 30 days: 14

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 filter criteria on the package name when selecting records from msdb..sysdtspackages. If nothing is specified for this variable, all packages will be selected.

EXAMPLE: sPkgName = "Devel", will change all packages with a name that starts with 'Devel'.

Once it has the list of package names, it opens the package using the LoadFromSQLServer method, sets the Logging properties and saves the package.

NOTE: As the package is being modified programmatically, you will lose any text annotations and layout previously applied. Unfortunately there is no way to modify the package outside the DTS Designer and maintain these items.

Questions and comments welcome.

Phill

By philcart, 2003/12/01

Total article views: 172 | Views in the last 30 days: 14
Your response
 
 
Related tags
 
Like this? Try these...

DBxtra Discount

By Press Release | Category: Product News
(not yet rated) | 2,757 reads
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com