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

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

Package configuration file with multiple connection strings

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :Sql Server

I am using the configuration file to read the connection string in the SSIS packages. In one of my packages i have to use two different connection strings. If i specify the second connection string in the config file, then the current package works well but other packages fails during validation saying the second connection manager does not exist in the package. Is it not possible to have multiple connection string in a single config file?

View Complete Post

More Related Resource Links

SSIS package - change Web reference's addres from Configuration file?

Greetings. The SSIS packages provide very nice options to configure them from an XML file, which allows to change credentials, database names etc w/o editing the package. This lets me, say, transfer package from one server to another or from test to production w/o any hassle - just changing the xml. Problem is, i need to acces a web service in my package, and built-in SSIS web service task is useless and just SUCKS. It fails to work even with miscrosoft's own sharepoint web service. So, i have to use scripting task. And scripting task uses "web reference" to access web services, which in turn gives no way to change it's url.  So, if i want to test and then move to production, i'll have to edit my package to change the web reference url from "testserver:5123/mywebservice" to "productionserver:81/webservices/mywebservice". And then change it again to test it again. Etc. Is there a solution to this? A way to programmatically change web reference's url from inside scripting task?

n-tier, configuration info, specifically connection strings



I have an ASP.NET project which is pretty n-tier, by namespace, but I need to separate into three projects:  Data Layer, Middle Tier and Front End.

I am doing this because... 

A) It seems the right thing to do, and

B) I am having all sorts of problems running unit tests for ASP.NET hosted assemblies.

Anyway, my question is, where do you keep your config info?

Right now, for example, my middle tier classes (which uses Linq to SQL) automatically pull their connection string information from the web.config when instantiating a new data context.

If my data layer is in another project can/should it be using the web.config for configuration info?

If so, how will a unit test, (typically in a separate assembly) provide soch configuration info?

Thank you for your time!


Package Configuration on multiple environments


Hello Experts,

I have enabled package configurations to Sql Server, so that it would help me to change the connection properties through TSQL.

I have created these packages on 32bit OS (Windows XP), now i facing problem while running these packages on Win 2008 64bit OS.

though it connects to DB and picks up configurations, it's still giving me "connection failed validation" (i have four file folder connection managers)

How should i over come this issue ? please help me


Thanks, Krishna Nellutla

SSIS package is not reading from the configuration file in job step configuration tab

Hi everyone,

I have the following question. I have an SSIS package and it has in SSIS in BIDS 'Enable package configuration' and a full path to a file. The packages works ok and reads from this file.

 If I invoke the same package from sql agent as a job step and apply another configuration file in the job step (in tab COnfigurations), the package still uses the one in BIDS. Shouldn't this new config file overwrite the one from BIDS or?

Thank you


Package Configuration causing problems with Oracle Connection


Hi All,


We need to import the data from Oracle 10g database to SQL Server 2005 database.

Solution Picked:

In order to accomplish the above, we used SQL Server Integration Services along with Business Intelligence Developer Studio.


Base Details:

There are around 17 packages, each retrieving data from Oracle and storing into SQL Server based on current date. Following are the steps used:

  1. Get current date from SQL Server [Execute SQL Task].
  2. Create Query based on date obtained from step (1) [Script Task].
  3. Based on query obtained from step (2). Inside a [Data Flow Task] following sub actions are performed:

    Actions performed in [Data Flow Task]

  1. Retrieve data from Oracle database using query through [OLE DB Source].
  2. Perform any data modifications to correct the data [Derived Column].
  3. Store data in SQL Server [OLE DB Destination].
  4. Rejections are saved in text file [Flat File Destination].

How to Create multiple flat file import package?

Hello Everyone,

I am an absolutely beginner to SSIS and need to perform the following task.

  • Need to import Master data from (semi colon) ; delaminated flat files into separate tables in SQL Server
  • Each file will create a separate table in SQL Server
  • While importing I need to perform validation on each file and only extract data that is valid e.g. CNIC column must be numeric and 13 digits long.
  • Any data that is not valid will be sent to a separate table with same TableName_bad suffix
  • After the data is extracted I will extract the details data of only those records that have been extracted in master table before

I know about basic data flow controls etc but I don’t know which control will be better for which task. Please tell me what will be the procedure to fulfill my requirements. I will be extremely thankful.



Syed Afraz Ali


Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Protect It: Safeguard Database Connection Strings and Other Sensitive Settings in Your Code


Protecting application secrets, such as database connection strings and passwords, requires careful consideration of a number of pertinent factors such as how sensitive the data is, who could gain access to it, how to balance security, performance, and maintainability, and so forth. This article explains the fundamentals of data protection and compares a variety of techniques that can be used to protect application settings. The author discusses what to avoid, such as hiding keys in source code and the use of Local Security Authority. In addition, he presents some effective solutions such as the Data Protection API.

Alek Davis

MSDN Magazine November 2003

Multiple Submit Connection Problem


Hello everyone,

I have an InfoPath form with two Submit Connections. One of them is a regular submit connection to a SharePoint Document Library. The other is a submit connection to the UpdateListItems web Service.

I have one button using rules that submits the forms fields to the Document Library. Some of those fields have data validation rules like entry must be four digits, and field cannot be blank.

The other submit button uses rules to submit an XML template to the UpdateListItems Template. My problem is that even though this second button does not have the first submit connection as an action, the form will still check all of the forms fields to see if they violate the validation rules before it will submit to the Web Service.

How do I tell InfoPath to ignore the validation rules when I only want to submit to the Web Service? I want the user to be able to enter data into the XML template fields and submit to the Web Service, even if some of the rest of the fields are blank. Right now if any of the other fields fail validation it prevents submittal to the web service even if the fields that failed validation are not being submitted to the web service.

Thanks for any advice that can be offered,
Bill Hurt

Using the single *.rpt file with multiple data sources


I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:

protected void BTN_RunReport_Click(object sender, ImageClickEventArgs e)
CrystalReportViewer_ClientLetter.Visible = true;

ConnectionInfo con = new ConnectionInfo();
con.ServerName = Constants.ServerIP;
con.DatabaseName = Constants.DatabaseName;
con.UserID = Constants.UserID;
con.Password = Constants.Password;

CrystalReportViewer_ClientLetter.ReportSource = Server.MapPath(Constants.ClientLetters);
ParameterFields parameter = CrystalReportViewer_ClientLetter.ParameterFieldInfo;
ParameterField batchdate = new ParameterField();
batchdate.Name = "@BatchDate";
ParameterDiscreteValue batchdate_value = new ParameterDiscreteValue();
batchdate_value.Value = Convert.ToDateTime(txtBatchDate.Text);

foreach (TableLogOnInfo tlf in CrystalReportViewer_ClientLetter.LogOnInfo)
tlf.ConnectionInfo = con;

.Net Framework zip package file

Has anyone idea about .net package files?? I seriously have no clue about this & have asked to do a POC on this. I am told that this feature has come up along with .Net Framework 3.5 but couldn't find any pointer after googling even. It would be great if somebody can explain this & its usage??

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.

Can not get excel connection when calling an SSIS package from ASP

I have an SSIS package importing data from excel. I have coded it and deployed it on the sql 2008 server. I then execute it via a stored procedure with the following: select @cmd = 'C:\"Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /sq "HRIS"' select   @cmd = @cmd + ' /SET \Package.Variables[User::path].Properties[Value];"' + @path + '"' exec   @rtn = master..xp_cmdshell @cmd   This works fine when  i execute it on my local machine. But when I try to call this Stored proc from my asp app (classic asp, not .net) I get the error: Code: 0xC0202009 Source: HRIS Connection manager "SourceConnectionExcel" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error". End Error   Any help would be greatly apprecitated

Web Folder problem : This file cannot be saved to this location because there is no connection to th

When I check out a Word 2007 document from a list, I cannot save it back to the server.  I get:   This file cannot be saved to this location because there is no connection to the server.  Check your network connection and try again.   I am using a Virtual Machine (Virtual PC).  I have the Microsoft Loopback adapter installed.    The server has a static IP address and is a domain controller. I am able to access the web folder through Windows Explorer.   How do I set up Office, Sharepoint and Webdav so that I can check files out of sharepoint and save them back, on a virtual machine?

using application configuration file in AppData special folder

Hi! So I understand it is a best practice to save the application configuration files under the AppData folder, rather than in Program Files, since UAC will restrict write acces to the Program Files folder, which is fine. Now, saving the configuration file to another location is no problem, using the SaveAs method. However, when I load the application, I expect some settings to be read. From what I know, this is done either using direct calls to the ConfigurationManager class, either initializing a Configuration object. For the first case, a example is this: if (ConfigurationManager.AppSettings["Title"] != null) { this.Title = ConfigurationManager.AppSettings["Title"]; titleTextBox.Text = ConfigurationManager.AppSettings["Title"]; } For the second case, I would use it like this: Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); string setting = config.AppSettings.Settings["Title"].Value.ToString(); So, if the application runs in the Program Files folder, an exception is thrown when I save the file. However, if I save the file using SaveAs and save it to AppData folder, obviously, when loading, the settings are not loaded from the AppData folder, but from the configuration file existing in the Program Files folder. One way to solve
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