Share via

How to close datareader for ADO.NET source

Nicky 121 Reputation points
2021-03-17T17:09:32.62+00:00

Hi

I have created a package for data migration. My package use both execute SQL Task and Data flow task.
First data flow task(using ADO.NET source) works smoothly, when package flow reach second data flow task (using ADO.NET source), I get error

"There is already an open DataReader associated with this Command which must be closed first."

[SSIS.Pipeline] Error: "ADO NET Source" failed validation and returned validation status "VS_ISBROKEN".

SQL Server Integration Services
0 comments No comments

Answer accepted by question author

Yitzhak Khabinsky 27,116 Reputation points
2021-03-17T20:19:06.497+00:00

Hi @nikz22,

You need to set connection property RetainSameConnection value as False.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Nicky 121 Reputation points
    2021-03-18T14:22:59.94+00:00

    @ YitzhakKhabinsky-0887

    Thanks! I chnaged the property to false and my solution is working perfectly fine.

    Was this answer helpful?

    0 comments No comments

  2. Monalv-MSFT 5,926 Reputation points
    2021-03-18T02:03:34.42+00:00

    Hi @Nicky ,

    First data flow task(using ADO.NET source) works smoothly, when package flow reach second data flow task (using ADO.NET source), I get error
    "There is already an open DataReader associated with this Command which must be closed first."

    Please create 2 ADO.NET connection managers in SSIS package.
    First data flow task(using ADO.NET source) can use ADO.NET connection manager1, and second data flow task(using ADO.NET source) can use ADO.NET connection manager2.

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.