dbTalk Databases Forums  

Error with DTS package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Error with DTS package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fr@nk
 
Posts: n/a

Default Error with DTS package - 12-22-2005 , 02:37 AM






Dear all,

Since I'm reasonably new in this field, I hope you can help me with a
strange problem. At least: for me it's strange!

I have made a few data copy-and-filter steps, copying data from one table to
another, using DTS-packages based on queries. These DTS-packages are combined
in a DTS-package (workflow) which is scheduled to run several times a day.
The functionality of one of these copy-steps is to check if the data to be
copied is new: there is a socalled "check-table" which contains all data
since this functionality exists. The query on which this is based is the
following:

<start query quote>
"SELECT dbo.tblWBGent_002.*
FROM dbo.tblWBGent_002 LEFT OUTER JOIN
dbo.tblWBGent_check ON
dbo.tblWBGent_002.AllocationNumber = dbo.tblWBGent_check.AllocationNumber AND
dbo.tblWBGent_002.Time2ndWeighing =
dbo.tblWBGent_check.Time2ndWeighing AND
dbo.tblWBGent_002.Date2ndWeighing =
dbo.tblWBGent_check.Date2ndWeighing
WHERE (dbo.tblWBGent_check.Date2ndWeighing IS NULL)
"
<end query quote>

If I run this query, no problem exists. If I run the DTS-package which uses
this query to copy data from table 1 to table 2, execution takes forever and
I have to kill the process manually. However, this does not happen all the
time (to make it even stranger in my eyes).

Is there anyone who would have any suggestions in which direction I have to
look for solving this problem? Any help is much appreciated!

Thanks in advance,

Frank Hepkema
Infoprofs
Amsterdam, The Netherlands


Reply With Quote
  #2  
Old   
Enric
 
Posts: n/a

Default RE: Error with DTS package - 12-22-2005 , 06:03 AM






Hi Frank,

What do you mean exactly? That query is inside a Execute Script Task or is
embedded with VbScript inside a ActiveX Script Task.
Let me know

"Fr@nk" wrote:

Quote:
Dear all,

Since I'm reasonably new in this field, I hope you can help me with a
strange problem. At least: for me it's strange!

I have made a few data copy-and-filter steps, copying data from one table to
another, using DTS-packages based on queries. These DTS-packages are combined
in a DTS-package (workflow) which is scheduled to run several times a day.
The functionality of one of these copy-steps is to check if the data to be
copied is new: there is a socalled "check-table" which contains all data
since this functionality exists. The query on which this is based is the
following:

start query quote
"SELECT dbo.tblWBGent_002.*
FROM dbo.tblWBGent_002 LEFT OUTER JOIN
dbo.tblWBGent_check ON
dbo.tblWBGent_002.AllocationNumber = dbo.tblWBGent_check.AllocationNumber AND
dbo.tblWBGent_002.Time2ndWeighing =
dbo.tblWBGent_check.Time2ndWeighing AND
dbo.tblWBGent_002.Date2ndWeighing =
dbo.tblWBGent_check.Date2ndWeighing
WHERE (dbo.tblWBGent_check.Date2ndWeighing IS NULL)
"
end query quote

If I run this query, no problem exists. If I run the DTS-package which uses
this query to copy data from table 1 to table 2, execution takes forever and
I have to kill the process manually. However, this does not happen all the
time (to make it even stranger in my eyes).

Is there anyone who would have any suggestions in which direction I have to
look for solving this problem? Any help is much appreciated!

Thanks in advance,

Frank Hepkema
Infoprofs
Amsterdam, The Netherlands


Reply With Quote
  #3  
Old   
Fr@nk
 
Posts: n/a

Default RE: Error with DTS package - 12-22-2005 , 06:16 AM



Hi Enric,

What I have done is this:
- first made the query (saved as a view) as shown below.
- then made an "import" task, using this view as source and the target table
as destination.
- I saved this task as a DTS-package.

By the way: the columns in source and destination are identical.

When I run this query/view there is no problem. When I run the DTS-package,
every now and then it does not terminate (I have to kill the process
manually). I have not been able to spot any reason for this in the data which
has to be copied.

Hope this explanation will help.

Cheerio,

Fr@nk



"Enric" wrote:

Quote:
Hi Frank,

What do you mean exactly? That query is inside a Execute Script Task or is
embedded with VbScript inside a ActiveX Script Task.
Let me know

"Fr@nk" wrote:

Dear all,

Since I'm reasonably new in this field, I hope you can help me with a
strange problem. At least: for me it's strange!

I have made a few data copy-and-filter steps, copying data from one table to
another, using DTS-packages based on queries. These DTS-packages are combined
in a DTS-package (workflow) which is scheduled to run several times a day.
The functionality of one of these copy-steps is to check if the data to be
copied is new: there is a socalled "check-table" which contains all data
since this functionality exists. The query on which this is based is the
following:

start query quote
"SELECT dbo.tblWBGent_002.*
FROM dbo.tblWBGent_002 LEFT OUTER JOIN
dbo.tblWBGent_check ON
dbo.tblWBGent_002.AllocationNumber = dbo.tblWBGent_check.AllocationNumber AND
dbo.tblWBGent_002.Time2ndWeighing =
dbo.tblWBGent_check.Time2ndWeighing AND
dbo.tblWBGent_002.Date2ndWeighing =
dbo.tblWBGent_check.Date2ndWeighing
WHERE (dbo.tblWBGent_check.Date2ndWeighing IS NULL)
"
end query quote

If I run this query, no problem exists. If I run the DTS-package which uses
this query to copy data from table 1 to table 2, execution takes forever and
I have to kill the process manually. However, this does not happen all the
time (to make it even stranger in my eyes).

Is there anyone who would have any suggestions in which direction I have to
look for solving this problem? Any help is much appreciated!

Thanks in advance,

Frank Hepkema
Infoprofs
Amsterdam, The Netherlands


Reply With Quote
  #4  
Old   
mattb
 
Posts: n/a

Default RE: Error with DTS package - 01-06-2006 , 02:32 PM





"Fr@nk" wrote:

Quote:
Dear all,

Since I'm reasonably new in this field, I hope you can help me with a
strange problem. At least: for me it's strange!

I have made a few data copy-and-filter steps, copying data from one table to
another, using DTS-packages based on queries. These DTS-packages are combined
in a DTS-package (workflow) which is scheduled to run several times a day.
The functionality of one of these copy-steps is to check if the data to be
copied is new: there is a socalled "check-table" which contains all data
since this functionality exists. The query on which this is based is the
following:

start query quote
"SELECT dbo.tblWBGent_002.*
FROM dbo.tblWBGent_002 LEFT OUTER JOIN
dbo.tblWBGent_check ON
dbo.tblWBGent_002.AllocationNumber = dbo.tblWBGent_check.AllocationNumber AND
dbo.tblWBGent_002.Time2ndWeighing =
dbo.tblWBGent_check.Time2ndWeighing AND
dbo.tblWBGent_002.Date2ndWeighing =
dbo.tblWBGent_check.Date2ndWeighing
WHERE (dbo.tblWBGent_check.Date2ndWeighing IS NULL)
"
end query quote

If I run this query, no problem exists. If I run the DTS-package which uses
this query to copy data from table 1 to table 2, execution takes forever and
I have to kill the process manually. However, this does not happen all the
time (to make it even stranger in my eyes).

Is there anyone who would have any suggestions in which direction I have to
look for solving this problem? Any help is much appreciated!

Thanks in advance,

Frank Hepkema
Infoprofs
Amsterdam, The Netherlands

Hand write all column names DO NOT use '.*' in your query.
in dts -
click 'ole db provider for sql server' for connection 1 - select new conn,
data source, server ,Authentication and DBase
THIS WILL BE SOURCE
Do the same thing for destination.
THIS WILL BE DESTINATION

Highlight conn 1, 'ctrl' conn2 >> in order (now both conns should be
highlighted)
click - 'transform data task'
double click the arrow for the transform data task
ON SOURCE TAB - Select SQL query >> COPY IN YOUR QUERY (handwritten out for
all columns)
ON DESTINATION TAB - Select table

ON TRANSFORMATIONS TAB - Make sure all columns are lined up with each other

CLICK OK

**NOW PUT THESE STEPS INTO YOUR COPY LOCATION IN YOUR DTS PACKAGE**



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.