Kayda_SQL


I need to turn off validation and I've seen some threads saying this is not possible but my situation has a twist.

A customer needs the package to connect to different modem dialup connections to connect to different servers (they use dialup for security reasons). We have written two VB script tasks at the beginning and end of a loop, with data flows in between. Before the loop the dialup connection info is read into a recordset along with Data Source connection information. The first script uses this information to dialup and the last script hangs up the connection. The problem is the package tries to validate the data connections and the package has not dialed up yet, so it fails.

We managed to confirm it works in a test environment by putting a break in the first script, manually VPNing into the test network (to allow validation of the data flow to work), and then manually disconnecting from VPN during the break. The script dials in and pumps the data. But this won't be an option in production.

So if anyone has figured out a way to turn off validation, great. Otherwise, any ideas to make this work I was thinking about setting up a dummy connection that would be connected outside the package before running just for validation (and then the script would disconnect to begin, but I would prefer to handle all of this within SSIS.

Any help While I see the point of validation it's a bummer that MSFT didn't put this in the hands of the user.

Thanks, Kayda




Re: Turning off validation

Jamie Thomson


Kayda_SQL wrote:

I need to turn off validation and I've seen some threads saying this is not possible but my situation has a twist.

A customer needs the package to connect to different modem dialup connections to connect to different servers (they use dialup for security reasons). We have written two VB script tasks at the beginning and end of a loop, with data flows in between. Before the loop the dialup connection info is read into a recordset along with Data Source connection information. The first script uses this information to dialup and the last script hangs up the connection. The problem is the package tries to validate the data connections and the package has not dialed up yet, so it fails.

We managed to confirm it works in a test environment by putting a break in the first script, manually VPNing into the test network (to allow validation of the data flow to work), and then manually disconnecting from VPN during the break. The script dials in and pumps the data. But this won't be an option in production.

So if anyone has figured out a way to turn off validation, great. Otherwise, any ideas to make this work I was thinking about setting up a dummy connection that would be connected outside the package before running just for validation (and then the script would disconnect to begin, but I would prefer to handle all of this within SSIS.

Any help While I see the point of validation it's a bummer that MSFT didn't put this in the hands of the user.

Thanks, Kayda

Set DelayValidation=TRUE on the tasks that are failing validation.

-Jamie







Re: Turning off validation

Kayda_SQL

That helped, but I'm still having a problem. let me outline what the package does (uses 56K modem dialup for different remote servers--customer requirement).

For each ADO loop though remote sites (sets different DSN info, Dialup connection name each time tables same at each site)

-Script task-VB.NET script dials up a new connection (I didn't write these scripts, our programmer did. I wrote the rest of the package)

-a couple of SQL tasks

-10 data flow tasks, basically 10 remote tables that pump to 10 SQL Server tables

-Script task-hangs up dialup connection

End Loop

So, before I set "DelayValidation" at the task level, the package would fail immediately as the package attempted validation before running (because it hadn't attempted dialup and the connection wasn't available). Now that I have set "DelayValidation" = true, it works the first time through but fails on the first data flow the second time through. It seems to fail just after it finishes dialing up the second time. If I set "MaxErrorCount" on the task and package level to something higher, the first data flow fails the second time through but the package keeps on going.

My questions ares:

1. When does it validate exactly when I set "Delay validation" Af the beginning of the task each time it runs As soon as the package starts to run If it fails just after the second connection dials that implies it has started validating before, but I'm not sure whether that is the first time it tried to validate or the second. (from looking at the excution results tab).

2. Should I put some delay in the package Where

3. I"MaxErrorCount" just refers to package errors in general. Is there anyway I can set a "MaxValidationErrorCount"

4. It works when we choose the "Run without debugging" option. Can you run it like that when it is scheduled in SQL Server

Thanks,

Kayda






Re: Turning off validation

DarrenSQLIS

1 - A task is normally validated twice, once when the overal package is validated, prior to anything executing and also when just before it starts to execute. Validate cascades down from containers, so the same trigger for validation pre-execute that causes it to execute before the package starts is the same event for the task level container. Packages, loops and tasks are all based on teh same continer model. Setting delay validate ignores all validation request, apart from the one that must happen immediately prior to the task executing, so each tome it runs.

Something has not been reset in-time for the second validation I would assume, but not sure what. What is failing, and why

2 - Don't thnk it should be required.

3 No

4 The debug option is only avilable in the designer, so it will run as you wish when scheduled or just using dtexec (better than the SQL Agent subsytem) anyway.






Re: Turning off validation

Kayda_SQL

Thanks Darren for the reply. I'm still a little confused though.

The package validates at the beginning and then each time it is run it sound like. So if I am looping through the same DF task (setting source query and destination each time), it should validate several times per execution. Is that correct

The package is saying it can't find the server when it executes the second time around. Somehow it works the first time, even though it goes through the same loop the first time. This tells me, at least the second time around, that it is trying to validate the DF task while the Script that dials is still working. Otherwise it would be dialed and have the connection.

My question is what does "just before it starts to execute mean". Is there a set time before the DF task starts that it starts to validate (if I'm right in that it starts to validate while the script is dialiing, not after all the tasks before it are done.) Or theoretically should validation not be done until all tasks before the DF tasks are complete. That was why I was thinking I could put an extra step with delay before the DF, since then it would be validating while this task is going on, not while it is still dialing to get a connection to the server.

Thanks,

Kayda