Solved

DTS Scheduling

Posted on 2001-08-13
6
298 Views
Last Modified: 2013-11-30
 I have an issue that I'm trying to figure out the best way to accomplish.  We have a whole bunch of procedures that run and import data each night into an Oracle database.
  We are migrating some of the stuff over to our SQL Server (SQL Server 2000).  What I need is a way to execute the DTS Package not at a specific time, but after the other packages (in Oracle) finish.  So what I have been thinking is at the end of the Oracle stuff it would INSERT a line into a row in a table (probably in Oracle, but I might be able to insert into a SQL table if needed).
  Now from this point I'm trying to figure out the best way to start the DTS package.  I could write an NT Service that monitors the table, but that seems like a lot of extra overhead for this.
  So how should I do this?
0
Comment
Question by:pcavacas
6 Comments
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6380476
Schedule a task that every 5 mins? checks this table - can do this from sql server if the table is on oracle or sql server. This then starts the dts job when this line appears.

Another way is to have as the first step in the dts job a job which loops (pausing for 5 mins?) waiting for the line to appear before completing successfully to allow the next step to run - I think this is the less complex option.
0
 
LVL 2

Expert Comment

by:MCM
ID: 6381608
i think you could do this:

make a DTS package (i think you've done this)
make an SQL Server Agent package that will run the DTS
make a table in SQL server into which Oracle will insert a record when it is ready to be imported from
make an insert trigger on the SQL table that runs

sp_start_job

From SQL Server Books Online:
sp_start_job (T-SQL)
Instructs SQL Server Agent to execute a job immediately.

Syntax
sp_start_job [@job_name =] 'job_name' | [@job_id =] job_id
    [,[@error_flag =] error_flag]
    [,[@server_name =] 'server_name']
    [,[@step_name =] 'step_name']
    [,[@output_flag =] output_flag]


there might be a smoother way to do this, but this ain't bad.
0
 
LVL 2

Accepted Solution

by:
MCM earned 75 total points
ID: 6381620
on further thought, you really don't need the table/trigger cluge. you should be able to run
EXEC sp_start_job 'DTSPackageName'
as a command through ODBC/OLEDB
0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 2

Expert Comment

by:MCM
ID: 6381628
but i should be clear that I have never done this mese'f; 'spure theory.
0
 
LVL 3

Expert Comment

by:krispols
ID: 6384308
If your import in oracle package could call an cmd command or if your import is done from a cmd script just know that you could run a dts package from a command line or cmd batch with DTSRun utility.
0
 
LVL 2

Author Comment

by:pcavacas
ID: 6384385
MCM:  I'm going to try this solution and see if I can get the Oracle Procedure changed to do the insert into this table, shouldn't be a problem, but you never know with some people.

nigelrivett:  If I can't do MCM solution for politcal reasons, then I will try this solution.

krispols:  I can't do this solution because the stuff that fires off the jobs is on UNIX and has no like to execute commands on a Windows box.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question