![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I am trying to make a decision on the approach to use for making some daily updates from a SQL Server database to an Oracle database. I currently have a DTS package pumping some data over to staging tables in the Oracle database. I have also built a script to move the data from the staging tables into the application tables. I could certainly put the steps in the script below in one or more SQL Tasks, but that doesn't seem like the best approach. It doesn't tell me how many rows were inserted, deleted, or updated. It doesn't give me any performance statistics on how long each step took. We have a pretty nice UNIX scripting package. The down side is that I would need to link my DTS loads of the staging tables to the UNIX script to process those loads. Can anyone provide any advice? Yes, link them through the scheduler -or- No, do them in DTS. Are there some examples out there to show me how to do this in DTS? I have the WROX SS 2000 DTS book which has been helpful, but I need more direct, specific examples of how to do this. (A nice way to say I don't know what I am doing in DTS!) The SQL script looks something like: /* Step 1: delete products whose IPIS Record_ID is no longer present in the staging table */ DELETE FROM PM_PRODUCT_RELATIONSHIPS WHERE ...; DELETE FROM PM_PRODUCTS WHERE ...; /* Step 2: delete contributors no longer associated with existing IPIS-related products */ DELETE FROM PM_CONTRIBUTORS WHERE contributor_id ...; /* Step 3: update PM_PRODUCTS data for existing IPIS-related products */ UPDATE PM_PRODUCTS SET ...; /* Step 4: add new IPIS-related products (including relationship records) */ INSERT INTO PM_PRODUCTS (product_cd, product_date, name, last_change_uid, last_change_date) SELECT ...; /* Step 5: add contributors. This list includes updates to preexisting IPIS-related products as well as those added in Step 3 */ INSERT INTO PM_CONTRIBUTORS ( ...; |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |