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

Running a DTS Package from Query Analyzer

By Jon Winer, 2001/05/07

Total article views: 9195 | Views in the last 30 days: 101
Can you run a DTS Package in Query Analyzer?...You sure can!

The approach to running a DTS Package in Query Analyzer is not intuitive, but it is elegant. Query Analyzer uses T-SQL and DTS uses COM, so at first glance you would not think it was possible.

I actually have had a need to accomplish this and I have read several postings in discussion groups inquiring about this same dilemma.

Here are the steps...

1)     Create your DTS Package
  • A DTS package can be made in several ways. From within Enterprise Manager, click on Data Transformation Services, Local Packages, then New Package. Another option would be to right click on a table, click on All Tasks, then either Import or Export Data. When asked, save as a DTS package.
2)     Schedule the DTS Package.
  • This can be done either during the creation of the package or after it is complete.
3)     Edit the newly created job and delete the schedule.
  • Drill down from Management to Jobs and find the job that now appears. Right click on the job and click on Properties. Click on the Schedule tab and delete the schedule.
4)     Now you have an unscheduled job that is ready to be run from within Query Analyzer.

5)     Execute the stored procedure sp_start_job, passing in either the GUID of the job or the job's name from Query Analyzer.

Voila!

By Jon Winer, 2001/05/07

Total article views: 9195 | Views in the last 30 days: 101
Your response
 
 
Related tags

DTS    
SQL Server 7, 2000    
 
Related content

Locking Down DTS

By Brian Knight | Category: DTS
| 8,073 reads

DTS Basics

By Brian Knight | Category: DTS
| 10,394 reads

Using DTS Global Variables

By Brian Knight | Category: DTS
| 12,749 reads
Like this? Try these...
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