"VS_NEEDSNEWMETADATA" error when using dynamic connection string

  • In my ssis package, I'm specifying the name of my database via a variable, called @DatabaseName. When I go to open this connection via a Data Flow Task however, I receive the following error:

    [SSIS.Pipeline] Error: "component "OLE DB Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

    I have a sql connection manager (which I named "DynamicDB"). In my connection manager's properties, I added an expression for the "ConnectionString" property, with the following expression:

    "Data Source=<My_Server_Name>;Initial Catalog="

    + @[User::DatabaseName] + ";Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;"

    So far so good, but when I run it, I get the error I mentioned, somewhere in my Data Flow Task. Within my task, I have an OLE DB Source, in which I set the connection to the name of my sql connection manager ("DynamicDB").

    Any idea what I'm doing wrong?

    Thanks

  • Your seeing a validation warning. You can either add a default value to your variable that you know exists (and then SSIS will validate against it and have it's required metadata) or you can set the 'ValidateExternalMetadata' property to False on your source/target components that are dynamic.

    I always start with a default value for variables that are to be set dynamically at least during the development phase of the package. It helps to get the data flows all working against one source/target and then introduce the dynamic logic after your package flow works as desired. It helps sometimes with the confusion and complexity that dynamic connections add during development.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply