?
Solved

DTS Scheduling

Posted on 2001-08-13
6
Medium Priority
?
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 225 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
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
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

Technology Partners: 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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

741 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