[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

DTS Scheduling

Posted on 2001-08-13
6
Medium Priority
?
315 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
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

One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

656 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