Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS Error: VS_NEEDSNEWMETADATA

I'm currently updating all of our ETLs using Visual Studio 2015 (made in BIDS 2008) and redeploying them to a new reporting server running on SQL Server 2016 (originally 2008R2).

While updating one of the ETLs and trying to run on the new server I got this error:


The package execution failed. The step failed.

Sometimes it also produces this error:

Source: Load Fact Table SSIS.Pipeline Description: "Copy To Fact Table" failed validation and returned validation status "VS_NEEDSNEWMETADATA".


I've tried deleting and re-adding the OLEDB Destination, connection strings and opened up the column mappings to refresh the meta data. I also recreated the whole data flow task but I'm still getting the same error.

The package runs fine on my local machine.

UPDATE:

I started taking the package apart and running only pieces of it to try and narrow down which part was failing. It seemed to be failing on loading into the staging table but I couldn't find out why.

I eventually decided to just try and re-create the whole thing. After re-creating the entire package, still no luck. The picture below is from the event viewer on the server itself but it didn't give me any new information.

enter image description here

Package error from event viewer

like image 325
Jonathan Porter Avatar asked Dec 29 '16 21:12

Jonathan Porter


People also ask

What is Vs_needsnewmetadata?

The keyword VS_NEEDSNEWMETADATA is a constant used in the DTSValidationStatus enum defined in the SQL Server Integration Services (SSIS). This enumerator specifies the return value of an SSIS component validation function.

How do I refresh metadata in SSIS package?

Always use a SQL statement to select the data from your source. However, this will not prevent SSIS to screw up the metadata. To refresh the source in this case, replace the select statement with select a = 1. Then, after the metadata is refreshed, paste back your original statement.

Where is validate external metadata in SSIS?

By default, the ValidateExternalMetadata property is set to True, so SSIS validates the external metadata whenever you open the package, add a component, or run the package. If you override this behavior by setting the property to False, SSIS will not validate the data source until it runs that component.

What is delay validation in SSIS?

DelayValidation Property is available on Task level, Connection Manager, Container and on Package level. By default the value of this property is set to false that means that when the package start execution, It validates all the Tasks, Containers, Connection Managers and objects( Tables,Views, Stored Procedures etc.)


2 Answers

I finally found the issue and here's how I did it.

Because the error messages I was getting from SSMS weren't very insightful I first opened up my remote desktop and logged into the server. Then I went to Administrative Tools>Event Viewer and then Windows Logs>Application to see if the failed event would provide greater detail.

enter image description here enter image description here It didn't give me much still.

The next step I took was to run the package from the command line because the messages should be more verbose. Opened up cmd, changed directory to the one my package was in and then...

DTEXEC /FILE YourPackageName.dtsx

Finally, the error message here showed a missing column in the tables the package was trying to write to. I added those columns and voila!

like image 51
Jonathan Porter Avatar answered Sep 24 '22 03:09

Jonathan Porter


I have tried all the solutions provided above and the other sites. Nothing worked.

I got a suggestion from my friend Which worked for me.

Here are the steps:

  1. Right click on the Source/Target Data flow component.
  2. Go to Advanced Editor -> Component Properties
  3. Find ValidateExternalMetadata and set it to False.

Try your luck. This is a pathetic issue and left me clueless for 2 days.

enter image description here

like image 44
Pavithran Avatar answered Sep 23 '22 03:09

Pavithran