473,802 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(sev eral 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 4153

"Ryan" <ry********@hot mail.com> wrote in message
news:78******** *************** ***@posting.goo gle.com...
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(sev eral 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 ReleaseConnecti on if necessary.

If that isn't helpful, you may want to post this in a more specialized
forum, such as microsoft.publi c.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 = DTSGlobalVariab les.Parent
Set oConn = oPkg.Connection s("myConnection ")

oConn.ReleaseCo nnection
Main = DTSTaskExecResu lt_Success
End Function

"Simon Hayes" <sq*@hayes.ch > wrote in message news:<40******* ***@news.bluewi n.ch>...
"Ryan" <ry********@hot mail.com> wrote in message
news:78******** *************** ***@posting.goo gle.com...
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(sev eral 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 ReleaseConnecti on if necessary.

If that isn't helpful, you may want to post this in a more specialized
forum, such as microsoft.publi c.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
1434
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): (0x020000af). I've done some internet research and have follewed the suggested procedure of using ildasm and have confirmed that the type "tagTOOLINFOA" is in fact at 0x020000af, but unfortunately I don't know what to do at this point. I have messed...
1
6189
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 been created using the same basic pattern. I using the approach where the following code appears in the .h file: #ifdef MYDLL_EXPORTS #define MYDLL_API __declspec(dllexport)
2
1515
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" ObjAdapter.SelectCommand = new OleDbCommand(StrSQLQuery, ObjConnection) ObjDataSet = new DataSet()
5
27252
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 the wrapper class, but not
3
37084
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 'ConsoleApplication1.Car.process(ConsoleApplication1.Garage.CarDelegate) ' E:\VS2005_Study\Delegates.cs 49 23 ConsoleApplication1 ' using System;
5
2005
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 method to read all the characters (including leading whitespaces) until the new line character (the default line delimiter) or end-of-file is reached. Then I close the stream, reopen it and repeat the procedure. I get the correct answer only the...
1
13974
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 the inconsistent state of the database. 3.Found some orphaned extent numbers in a DMS user tablespace. Any advice on how to change database to be consistent and fix orphaned data? Thanks so much!
20
2626
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 when you give it 2 or more words, but when there's only 1 word the results vary depending on whether it's on Windows or Linux: under MSVC it displays no output (as it should); under gcc/Linux it instead gives "Segmentation fault". Any ideas...
3
6202
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 that database and transactions are not committed or rollbacked" I infact, don't believe it, because i suppose when we do a "force
9
5175
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 for these classes. I have public classes that use the internal classes, but I get a CS0051 error if I use an internal class as a parameter to a protected function of a public class. For example: internal class InternalClass { }
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10538
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.