Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 11th, 2004, 08:47 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DTS: Need advice on solution

Hi,

I am looking for some advice on the best way to implement a solution. Some background info might help.

I am using MS SQL 2000.

2 databases are involved in the solution: Human Resource (HR) and Time Tracking (TT)

The TT db is also tracking vacations balance (in hours) but we want to turn off its "Accrual" feature because it does not meet our business requirement.

The HR db already have the information to compute the vacation accrual between two dates for each employee

What I have so far :

An SQL user-defined function that compute the accrual for an employee based on 2 dates; typically the last accrual and today, but having parameters is easier for testing.

An SQL stored procedure in TT that received the employee id and accrual and will first increase the vacation balance and then insert a trace in an audit table.


My intention is to create another stored procedure in HR that will received an employee ID, then figure out the last accrual for this employee, call the function to compute the new accrual and then call the TT store procedure to record the accrual. I then want to use a Data Driven Task in DTS to loop throug a view of all active employee and call this store procedure.


Problem is that I also need to create a log (text file) of all activities, error and actual accruals by employee. I can program the VBScript to write the log file. I can program the store procedure to return as output parameters the result of the computation and the success/Error codes. But I have not figured out how to get that information back in to DTS. I thought of using multi-phases tasks and programing some logic in the Post-row transform event.

Constraints: I am a fervent believer of well structure system where componnets have a specific responsibiliies, much easier to test and reuse. I my view, writing to the log is a responsibility of the "looping" program. But if DTS can't get the information, then I will need to write a master store procedure with a cursor that will loop and write the log. And then simply schedule a job to call this procedure. But then I will be reinventing the wheel has I will need to implement features already in DTS....





Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice sarah lee ASP.NET 1.0 and 1.1 Basics 2 December 26th, 2006 12:11 PM
need advice from you alsafwa C# 2005 12 September 16th, 2006 07:44 AM
some advice please? liquidmonkey Java Basics 1 May 4th, 2006 08:54 AM
Need some advice wariental HTML Code Clinic 1 March 25th, 2006 09:48 PM
dts calls a lot of dts steffi_ma SQL Server DTS 2 May 24th, 2004 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.