Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Running a DTS Package from Query Analyzer

By Jon Winer,

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!

Total article views: 10406 | Views in the last 30 days: 9
 
Related Articles
FORUM

Scheduling a SSIS package

Scheduling a SSIS package

FORUM

Scheduled Job Does Nothing (SSIS Package)

No Results from a Scheduled job/package

ARTICLE

Starting Query Analyzer

Next in his series on Query Analyzer, Yakov Shlafman brings us a few ways that we can save more keys...

FORUM

Error when scheduling SSIS package

Scheduling SSIS package

FORUM

how to schedule SSIS package

can't schedule SSIS package

Tags
dts    
sql server 7    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones