Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS 2012 Project connection manager error

Basically:
I have a project with 4 packages. All on them have different connection managers with the exception of one which is shared between 2 of the packages so I made it a project connection manager.

  • If I try to build the project, I get the error below.
  • If I change the project CM to a package CM, it builds fine

So obviously the fact that I have a project CM is the problem.

What can I be missing?

Error   21  System.ArgumentException: An item with the same key has already been added.  
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)   
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)  
   at Microsoft.SqlServer.Dts.Runtime.ReferenceId.ReferenceMap.Add(String key, String value, Boolean isExternal)  
   at Microsoft.SqlServer.Dts.Runtime.ReferenceId.RefIdProducer.AddRefIdAttribute(XmlElement element, String objectName, String objectId, ReferenceParserState state)   
   at Microsoft.SqlServer.Dts.Runtime.ReferenceId.RefIdProducer.GenerateRefId(XmlElement element, ReferenceParserState state)    
   at Microsoft.SqlServer.Dts.Runtime.ReferenceId.RefIdProducer.ProcessElement(XmlElement element, ReferenceParserState state)    
   at Microsoft.SqlServer.Dts.Runtime.ReferenceId.RefIdConverter.MapRefIds(IDTSPackage100 package, IDTSInfoEvents100 events, XmlDocument document)    
   at Microsoft.SqlServer.Dts.Runtime.DTSManagedXmlSerializationHelper.AfterSavePackageToXML(IDTSPackage100 package, IDTSInfoEvents100 events, String& packageXml)     
   at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackagePersist100.ClonePackageToXML(Object& pvDestination, Boolean vbReturnDOM, IDTSEvents100 pEvents)    
   at Microsoft.SqlServer.Dts.Runtime.Project.SavePackage(IProjectStorage storage, Package package, String streamName, Boolean preserveVersionGuid)    
   at Microsoft.SqlServer.Dts.Runtime.Project.SavePackage(Package package, String streamName, Boolean preserveVersionGuid)   
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow outputWindow)  
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow outputWindow)   
like image 954
Diego Avatar asked Mar 08 '13 15:03

Diego


2 Answers

This occurs when you have the same connection manager twice (eg: copied between 2 packages) and you promote one of them to be a project connection.

The first package will show the connection manager of "(project) remoteSystem". The second package will still show "remoteSystem", and the new project level connection will not be shown.

If you delete the package level connection in the second package you will a) resolve the error, and b) the project level connection manager will become visible.

You will then have to go through all components that referenced the connection manager you deleted and re-direct them to the new project level connection.

like image 176
Andrew Hill Avatar answered Nov 15 '22 16:11

Andrew Hill


Moving the CM back to a package and then back to the project resolved it to where I could build.

like image 39
John Mo Avatar answered Nov 15 '22 18:11

John Mo