473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Inconsistent DTS Error - Help please

I get an error every so often with a DTS package on SQL 7. Error as
follows.

The connection is currently being used by a task. The connection
cannot be
closed or re-used.

This doesn't happen all the time and I can sometimes (more often than
not) get the DTS package to complete in it's entirety.

To explain what the DTS package does...

Truncate tables in reporting environment(several in a batch)
Clear Transaction Logs
Copies data from live environment into CSV (for speed)
Copies data from CSV files into tables previously truncated.
Builds up a table based on the data copied (for reporting)
Clear Transaction logs

I'm using a pretty basic set up, Connection (1st DB) -> Transformation
to CSV -> Transformation to Connection (2nd DB). It seems to fail on
either the first or second transformation at random (?).

I've checked the transformations so that they close the connection
afterwards so it should in theory be releasing the CSV files for the
next step. I suspect that there is a timing issue with this. I can
copy the CSV files over, but this is a little sloppy and I would
prefer not to do it.

Any ideas how to find a tidy way to ensure these are closed both
before and afterwards ?

Thanks

Ryan
Jul 20 '05 #1
2 4142

"Ryan" <ry********@hotmail.com> wrote in message
news:78**************************@posting.google.c om...
I get an error every so often with a DTS package on SQL 7. Error as
follows.

The connection is currently being used by a task. The connection
cannot be
closed or re-used.

This doesn't happen all the time and I can sometimes (more often than
not) get the DTS package to complete in it's entirety.

To explain what the DTS package does...

Truncate tables in reporting environment(several in a batch)
Clear Transaction Logs
Copies data from live environment into CSV (for speed)
Copies data from CSV files into tables previously truncated.
Builds up a table based on the data copied (for reporting)
Clear Transaction logs

I'm using a pretty basic set up, Connection (1st DB) -> Transformation
to CSV -> Transformation to Connection (2nd DB). It seems to fail on
either the first or second transformation at random (?).

I've checked the transformations so that they close the connection
afterwards so it should in theory be releasing the CSV files for the
next step. I suspect that there is a timing issue with this. I can
copy the CSV files over, but this is a little sloppy and I would
prefer not to do it.

Any ideas how to find a tidy way to ensure these are closed both
before and afterwards ?

Thanks

Ryan


I don't know of a specific solution to your problem, but you may be able to
use an ActiveX step to check the DTS Connection object's Connected property,
and call ReleaseConnection if necessary.

If that isn't helpful, you may want to post this in a more specialized
forum, such as microsoft.public.sqlserver.dts.

Simon
Jul 20 '05 #2
That's done the trick. Thanks for the help. Used the following code :

Function Main()
Dim oPkg
Dim oConn

Set oPkg = DTSGlobalVariables.Parent
Set oConn = oPkg.Connections("myConnection")

oConn.ReleaseConnection
Main = DTSTaskExecResult_Success
End Function

"Simon Hayes" <sq*@hayes.ch> wrote in message news:<40**********@news.bluewin.ch>...
"Ryan" <ry********@hotmail.com> wrote in message
news:78**************************@posting.google.c om...
I get an error every so often with a DTS package on SQL 7. Error as
follows.

The connection is currently being used by a task. The connection
cannot be
closed or re-used.

This doesn't happen all the time and I can sometimes (more often than
not) get the DTS package to complete in it's entirety.

To explain what the DTS package does...

Truncate tables in reporting environment(several in a batch)
Clear Transaction Logs
Copies data from live environment into CSV (for speed)
Copies data from CSV files into tables previously truncated.
Builds up a table based on the data copied (for reporting)
Clear Transaction logs

I'm using a pretty basic set up, Connection (1st DB) -> Transformation
to CSV -> Transformation to Connection (2nd DB). It seems to fail on
either the first or second transformation at random (?).

I've checked the transformations so that they close the connection
afterwards so it should in theory be releasing the CSV files for the
next step. I suspect that there is a timing issue with this. I can
copy the CSV files over, but this is a little sloppy and I would
prefer not to do it.

Any ideas how to find a tidy way to ensure these are closed both
before and afterwards ?

Thanks

Ryan


I don't know of a specific solution to your problem, but you may be able to
use an ActiveX step to check the DTS Connection object's Connected property,
and call ReleaseConnection if necessary.

If that isn't helpful, you may want to post this in a more specialized
forum, such as microsoft.public.sqlserver.dts.

Simon

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jlea | last post by:
I'm getting the following link error in my C++/.NET C++ project: error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (tagTOOLINFOA):...
1
by: Peter Steele | last post by:
I've created an unmanaged C++ DLL and when I compile it I get numerous errors of the form xyz.cpp(nnn): warning C4273: '<somefunction>' : inconsistent dll linkage I have other DLLs that have...
2
by: Neo Geshel | last post by:
I have the two subs: Sub UniqueHits() Dim StrSQLQuery As String Dim ObjAdapter as New OleDbDataAdapter() Dim ObjDataSet as DataSet StrSQLQuery = "SELECT * FROM Browser WHERE IsUnique = True"...
5
by: Andy Fish | last post by:
Consider the following code fragment public class Wrapper { protected enum E { IN, OUT }; public class C { protected void foo(E e) { } } } I want the class C to be accessible from outside...
3
by: AAV | last post by:
what is wrong with the code i get 'Error 1 Inconsistent accessibility: parameter type 'ConsoleApplication1.Garage.CarDelegate' is less accessible than method...
5
by: Generic Usenet Account | last post by:
I have been able to recreate a problem that I am having with the file stream using the simple sample code given below. I am trying to read the number of lines in a file, relying on the getline...
1
by: James | last post by:
When I ran db2dart to check a database, I got the following warning and error messages. 1.Warning: The database state is not consistent. 2.Warning: Errors reported about reorg rows may be due to...
20
by: Francine.Neary | last post by:
I am learning C, having fun with strings & pointers at the moment! The following program is my solution to an exercise to take an input, strip the first word, and output the rest. It works fine...
3
by: Rahul Babbar | last post by:
Hi All, When could be the possible reasons that could make a database inconsistent? I was told by somebody that it could become inconsistent if you " force all the applications to a close on...
9
by: dylan.miller | last post by:
I'm having trouble understanding the internal access modifier. There are many classes in my assembly that should not be accessible outside of the assembly. I've used the internal access modifier...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.