Re: Running Periodic Tasks
- From: Perfect Reign <theperfectreign@xxxxxxxxx>
- Date: Wed, 18 Jan 2006 10:10:34 -0800
On 18 Jan 2006 16:10:59 GMT, someone posing as ThePsyko took a five minute
break from flipping burgers to boot up the etch-a-sketch and scribbled:
>>
>> What are your thoughts/experiences? Could DTS handle this or should I
>> be looking at an app? If I'm running an app, should it simply be a
>> scheduled task (AT/Schtasks) or run as a polling service? Also would
>> MSMQ be relevant here?
>>
>> I want a beer.
>
> Couldn't you write a .sql file to dump the data from DB1 into a flat
> file, use the DB2 utility to import, process and export the file, then
> have another .sql file reimport the data to DB1?
A .sql file? You mean one created by isqlw?
I could setup a DTS to export a query out to a flat file.
In fact, here's a current look at the query I'm messing with...
SELECT
afm.wrcf.wr_id as WorkOrder,
afm.wrcf.cf_id as UserID,
afm.wrcf.comments as Description,
(CAST(DATEPART(mm, afm.wrcf.date_assigned) AS nvarchar)
+ '/' + CAST(DATEPART(dd, afm.wrcf.date_assigned) AS nvarchar)
+ '/' + CAST(DATEPART(yyyy, afm.wrcf.date_assigned) AS nvarchar)
) as DateAssigned,
(select convert(varchar, afm.wrcf.time_assigned, 114)) as TimeAssigned,
afm.wr.ac_id as Account,
afm.bl.address1 as Building,
afm.city.name as City,
afm.city.state_id as State,
afm.bl.zip as Zip
FROM afm.wrcf, afm.wr, afm.bl, afm.city
WHERE
afm.wr.wr_id = afm.wrcf.wr_id
AND
afm.wr.bl_id = afm.bl.bl_id
AND
afm.bl.city_id = afm.city.city_id
ORDER BY
afm.wrcf.wr_id
That part is pretty much done. This is a pathetic database which is
completely un normalized. (Is that a word?)
> You'd have to know how
> long the processing by DB2 will take so you can have an idea when to
> schedule the second .sql file, but it should work.
Hmm. Interesting point. Processing generally takes less than a second.
Thanks for the tip. I'll follow up.
--
kai - theperfectreign at yahoo dot com
remember - a turn signal is a statement, not a request
.
- Follow-Ups:
- Re: Running Periodic Tasks
- From: ThePsyko
- Re: Running Periodic Tasks
- References:
- Running Periodic Tasks
- From: Perfect Reign
- Re: Running Periodic Tasks
- From: ThePsyko
- Running Periodic Tasks
- Prev by Date: Re: IE Tab for Firefox
- Next by Date: Re: Why is it so hard to learn C or C++
- Previous by thread: Re: Running Periodic Tasks
- Next by thread: Re: Running Periodic Tasks
- Index(es):
Relevant Pages
|