.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Connect to an existing connection manager from within a custom transformation?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Sql Server
I'm developing a custom data flow transformation and have hit a roadblock.  I need to create an ADO connection to one of the connection managers that's defined in the package already.  I can either hardcode the name of the connection manager, or define it as a custom property....the problem I'm having is accessing it at all.  What I've found is that ComponentMetaData.RuntimeConnectionCollection[0].ConnectionManager only has the connection managers defined by the component itself, not already existing in the package.  How do I create a connection to a connection manager that's defined at the package level at design time? Thanks

View Complete Post

More Related Resource Links

BIDS Connection Manager Cannot Connect to Remote Oracle Db

Hi All,
I'm not having much luck getting an 'Oracle Provider for OLE DB' remote connection in connection manager to work when creating an SSIS package in BIDS.

I've covered off all the steps in the following link

The local machine is running SQL 2005 Sp2 Enterprise Edition on W2003 Sp2 Standard Edition X64

Using the Oracle 'Net Configuration Assistant' I can connect successfully to the remote service

I'm using ODAC 10g Release 2.

The steps to reproduce the error are as follows

1. in BIDS after creating an SSIS Solution
2. Right click in the  Connection Manager and select new OLE DB Connection
3. Click 'New'
4. Select 'Oracle provider for OLE DB'
5. Under server I enter the service name that I created in the Oracle 'Net Configuration Assistant'
6. Enter the user name and password as I entered in the Oracle 'Net Configuration Assistant'
7. When I click 'Test Connection' I get the following error

Test connection failed because of an error in initializing provider. ORA-12154: TNS could not resolve the connect identifier specified

I've spent a lot of time trying to get this to work and tried othe

SQL Server Integration Services 2005 x64 (DTEXEC.EXE) cannot recognise a custom "Connection Manager"


I have built a custom SSIS component for connecting to SQL Reporting Services in SSIS - including a custom data source and custom connection.

It works fine using 32bit DTEXEC and dtsdebughost, but I cannot get it to load in a 64bit environment.

Initialy I was compiling the dlls as MSIL (target=any), then I recompiled specifically targetting x64 (copying the dlls to the 64bit location and deploying to the GAC), just to see whether the problem was because of using an MSIL binary.

The 32bit version works as expected - are there any additional registration steps required for a 64bit Connection manager beyond copying to the /connections directory and installing  into the GAC?

The output from DTSEXEC:

c:\Program Files\Microsoft SQL Server\90\DTS\Binn>DTExec.exe /f "e:\temp\SSISCus
tomADComponent\TestSSISSolution\Integration Services Project1\Package.dtsx"
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.4035.00 for 64-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started:  12:07:30 p.m.
Error: 2010-09-22 12:07:43.89
   Code: 0xC0014005
   Description: The connection type "SSRS" specified for connection manager "SQL
 Server Reporting Services" is not recognized as a valid

Custom Connection Manager -- how to use in SSIS 2008 R2 without a DataReader source?


We have a custom connection manager in an SSIS 2005 package. We're able to click on "New Connection" in the Connection Manager section of the data flow task, and see the connection manager in the list. But how do we leverage this new custom connection manager as a source? The DataReader source doesn't seem to be an option anymore. We can't seem to create a new data flow task using this new connection manager as a source.

Ironically, the package runs as is after conversion from 2005 to 2008. It's just that we can't change it or add new data flow tasks using this new connection manager as a source.

Steve Coleman

Going Places: How Connection Manager Connects


Marcus Perryman explains the correct use of Connection Manager when a Windows Mobile application requires network data.

Marcus Perryman

MSDN Magazine December 2008

XML Schemas: Take Advantage of Existing External XML Schemas with a Custom Import Framework in ASP.N


Over the years, many industry-standard XML schemas and dialects have been developed. These industry-specific schemas embrace the original purpose of XML and are extremely valuable in promoting and supporting B2B interaction. Unfortunately, the ASP.NET Web Services runtime does not allow developers to directly reference external schemas from within their XML Web Services interface (the WSDL file). This article builds an external schema framework as an extension to the ASP.NET Web Services runtime to enable you to reference external schemas within your XML Web Service interface.

Scott Short

MSDN Magazine December 2002

Connect to existing sql 2005 database


Hello There,

I had successfully restored sql 2000 database to sql 2005. It works like charm

Now i am creating a database model in MVC

I follow these steps

Right click on model > ADO.NET entity data model > Generate from database > New connection (Microsoft sql server) > server name > select or enter database name

But no server name AND database name show in both drop down lists. When i mannually enter database name (which exists in sql 2005) then click on TEST CONNECTION. It gives follwoing error

"A network-related or instance-specific error while establishing a connection to sql server. the server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections.

Kindly help me with this


Basic ODBC Connection to connect to Crystal ???


I have visual studio 2008 professional with the inbuilt crystal reports version 10 I think.  I create everything from my laptop and IIS runs from my laptop as well.

I have created the most basic report to try and figure out a problem I have, anyways the report contains one database field that is it .... which I connect to by ODBC.  I then create a web form add the crystal report viewer to the report and the crystal report source run the web page and it loads the data from the field as I would expect to the crystal report viewer !!

I have several ODBC connections setup on my machine one using integrated security the other using SQL authentication both are system DSNs.  Now when I publish my application and access it from IIS and not the localhost I can access everything from my application ok except when I go to form that has the crystal reports I get this error (ODBC used here is the 'sa' account)

Logon failed. Details: IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Error in File

If I use the other ODBC that uses Windows authentication I get this error message

Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database  requested by the login. T

An existing connection was forcibly closed by the remote host


I get this message when I try to launch a report (.rdl) from Windows Sharepoint 2007.  I have followed the steps to integrate SQL 2005 SP2 with Sharepoint 2007.  I can launch the report by navigating to "http://server:880/reportserver/.."  I am using a shared datasource that I created within sharepoint.  Any help would be appreciated.

Remoting from WebService throws: An existing connection was forcibly closed by the remote host

Hello everyone, I have a problem with using .NET remoting from webservice. When using remoting from console application, there is no problem. I suppose problem is somewhere in IIS. My system is Windows Vista. Thank you for any help. Best regards, Jozef

WCF issues sending large data - "An existing connection was forcibly closed by the remote host"

Hi Guys I have posted the following on www.asp.net but thought it might be productive posting here too.I have been pulling my hair out trying to fix an issue with sending data over WCF, I have read pretty much every THREAD on this forum regarding or similar to this issue without any successful solution.  I have a simple data object which has a [DataMember] with a data type of byte[]. I use this to send binary data from my web app as follows: Asp.net MVC website --> WCF Client (Has my Service References) --> My Services (MyServices.svc) --> Business/Data Tier Everything is being executed from within VS 2008 Pro.   Now I have successfully sent data up to 2.2MB, however it fails if i try and send a file such as 2.3MB or larger i get the following exceptions: General Exception Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at SoftApp.WCFClient.MyServiceReference.IMyService.Document_Save(DtoDocument dtoDocument, Int32 usercode)   at SoftApp.WCFClient.MyServiceReference.MyServiceClient.Document_Save(DtoDocument dtoDocument, Int32 usercode) in c:\dev\softapp\softapp.wcfclient\service references\myservicereference\refe

Excel Connection Manager Problem

I am building a package that has 2 tasks that need to use the same excel connection manager. I use a execute sql task to dynamically build a table from the headers of the excel sheet  ,then I use an excel source component to load the data from the sheet. However when I try to edit the excel source and switch the data access mode to a variable and select the variable(for the path), when I try to close the editor I get this message 'S:\myfolder'.  It is already opened exclusively by another user, or you need permission to view its data. I need this package to access the same folder each time because the files will be placed in that folder. This package also has a branch for loading a text file into sql server. It access the same folder but uses a flatfile connection manager It looks like permissions on the folder are correct

Custom security via connection string

Hi Is it possible to pass information into the SQL Server relational engine via the connection string in the same way as it can be done for Analysis Services? I need to generate a user context for a forms authentication application (i.e. no windows user accounts). SSAS allows you to pass in a list of database roles or a customdata parameter on the connection string. These can be used inside the database in lieu of a windows identity. I am wondering if there are equivalent parameters available for the SQL connection string.  I guess that I could create SQL logins from each of the forms users with a system generated password and then pass the uid and password on the connection string but this seems unnecessarily complicated. Andrew Wiles - www.it-workplace.com - MDX made simple

SQL Server Configuration Manager: Connection to target machine could not be made in a timely fashion

I have a SQL Server 2005 box that was moved from a domain environment to a non-domain environment and was never dropped from its original domain before moving over.  Subsequently a new domain was created at the data center this SQL Server box now resides in.  The machine was dropped from its old domain and joined to the new one.   All the while the service accounts were set to the local admin account.  When I tried to start the Configuration Manager I got the message "Connection to target machine could not be made in a timely fashion.".  I read some blog entries and tried changing all the service accounts to Local System and the error message still came up.   All of the SQL Server services run fine.  It is just this management console that I cannot open.  I wasn't with this employer when this box was moved to the data center so I do not know if it worked prior and there isn't anyone here that could give me its history.   Any help would be appreciated.

errorCode=-1073573417 description=No connection manager is specified.

Hi again,It's me once again trying to migrate a dabatabase from SQL 2000 to SQL 2008 x64. During the migration of one of my databases I get the following error:OnError,LISSQLTEST3,SQLServices,LISSQLTEST2_LISSQLTEST3_Transfer Objects Task,{3CF1D4C8-28CB-4B82-B405-A261E0A173BE},{221EA3F0-32E2-412D-BFDE-76AD1D1715A0},16/08/2009 11:53:07,16/08/2009 11:53:07,0,0x,ERROR : errorCode=-1073573417 description=No connection manager is specified. helpFile= helpContext=0 idofInterfaceWithError={C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}StackTrace:    at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer()   at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()   at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()OnError,LISSQLTEST3,SQLServices,CDW_LISSQLTEST2_LISSQLTEST3_15(atashtiot),{E47ED1C2-0D25-48D2-9B4F-14A5DAF96F0A},{221EA3F0-32E2-412D-BFDE-76AD1D1715A0},16/08/2009 11:53:07,16/08/2009 11:53:07,0,0x,ERROR : errorCode=-1073573417 description=No connection manager is specified. helpFile= helpContext=0 idofInterfaceWithError={C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C}StackTrace:    at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer()   at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()   at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsi

Cannot enable Ribbon Edit Tab buttons and "connect" them to a list item in my custom webpart

I have one list with some custom fields and I want to develop a custom page. So, I created an ASPX page and added my custom webpart. This webpart has just a RichTextField, in edit mode, "linked" to one item of the list, like below: SPSite _SPSite = SPContext.Current.Site; SPWeb _SPWebProjects = _SPSite.OpenWeb("/Projects"); SPList _SPListProject = _SPWebProjects.GetList("/Projects/Lists/Project"); int _ID = Convert.ToInt32(this.Page.Request.QueryString["ID"]); RichTextField _RTF = new RichTextField(); _RTF.ID = "RTF"; _RTF.ControlMode = SPControlMode.Edit; _RTF.FieldName = "History"; _RTF.ItemContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); _RTF.RenderContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); this.Controls.Add(_RTF);   Then, I "turned on" the edit tab on the ribbon by doing the follow: protected override void OnPreRender(EventArgs e) { SPRibbon _CurrentRibbon = SPRibbon.GetCurrent(this.Page); _CurrentRibbon.TrimById("Ribbon.WebPartPage"); _CurrentRibbon.MakeTabAvailable("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.Minimized = false; _CurrentRi

Error handling on Connection Manager Expression

I am using a connection manager with an expression to set the connection string. (see my question http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/1ea71f9a-df5c-4c1c-a2fd-9e24632afbd8) I would like to put some error handling just incase things go wrong. Can anybody give me some tips on where to place error handling?Mr Shaw
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend