How can apply configure file in ssis by using script task ?

I had  two config file in ssis
 1. config file as per QA
2. config file as per Production
 I think apply dynamically by using script task for above file (acc to server)
How can I apply in script task for config file path in C# script
any one provide Helpful code ??
Thanks

I applied script Task  with below code :
public void Main()
//User::Config,User::Config_Pd,User::Config_QA
Application App = new Application();
Package Pack = new Package();
DTSExecResult pkgResults;
string strPackageName;
string filename = "";
string configvalue;
configvalue = Dts.Variables["Config"].Value.ToString();
strPackageName = Directory.GetCurrentDirectory().ToString() + "\\Excel Reports from Remittance advice\\Child.dtsx";
try
Pack = App.LoadPackage(strPackageName, null);
if (Pack != null)
if (configvalue == "DEV")
filename = Dts.Variables["Config_QA"].Value.ToString();
else if (configvalue == "PROD")
filename = Dts.Variables["Config_Pd"].Value.ToString();
else
Dts.TaskResult = (int)ScriptResults.Failure;
System.Windows.Forms.MessageBox.Show("Unable to bind the XML Configurations");
return;
} System.Windows.Forms.MessageBox.Show("Config:"+filename);
Pack.ImportConfigurationFile(@filename);
Pack.EnableConfigurations = true;
Pack.Configurations.Add();
App.SaveToXml(strPackageName, Pack, null)
pkgResults = Pack.Execute(); //Pack.Execute();
System.Windows.Forms.MessageBox.Show("Results:" + pkgResults.ToString());
Dts.TaskResult = (int)ScriptResults.Success;
But ouput in ssis showing as
But some thing missed in code  plz help me ...

Similar Messages

  • How can I configuration MBean in weblogic server  using the console ?

    How can I configuration MBean in weblogic server using the console ?
    I hear people talking about mbeans in weblogic server I have look in the console I can not find where , or how to do it.
    can some body explain that or a link that explain it, how to do it on the console ?

    Hi,
    Registering Custom MBeans from Admin Console is not yet possible. But yes there are ways to Configure and Utilize Custom MBeans ...
    http://weblogic-wonders.com/weblogic/2010/02/16/registering-and-invoking-custommbeans/
    Thanks
    Jay SenSharma

  • How can I configure MA to display "speaking" OpCode and Task names

    If you have a custom ETW Eventsource definition: PerfView reads and Displays from the etl files the OpCode and Task values not as integer but as defined in EventSource inner classe for Task and in the
    System.Diagnostics.Tracing.EventOpCode. My question is, how can I configure the MA to display the values not as "magic numbers" or can MA get this feature?
    Regards,
    Alexander
    Kind regards, Alexander

    Hi Paul,
    please take a look to the attached picture. I've tried to make a comparison between automatically behavior of PerfView and Message Analyzer by displaying of the same performance log. The Message Analyzer got metadata, generated with wevtutil. The related
    part of the manifest is here:
    <tasks>
    <task name="ReadingFromGdb" value="1"/>
    <task name="LogReadPreInvoke" value="65532"/>
    </tasks>
    <opcodes>
    </opcodes>
    <keywords>
    <keyword name="Perf" message="$(string.keyword_Perf)" mask="0x8"/>
    <keyword name="Gdb" message="$(string.keyword_Gdb)" mask="0x10"/>
    </keywords>
    <events>
    <event value="8" version="0" level="win:Verbose" message="$(string.event_LogGdbReadPreInvoke)" keywords="Perf Gdb" opcode="win:Start" task="ReadingFromGdb" template="LogGdbReadPreInvokeArgs"/>
    </events>
    <templates>
    <template tid="LogGdbReadPreInvokeArgs">
    <data name="fullName" inType="win:UnicodeString"/>
    <data name="methodName" inType="win:UnicodeString"/>
    </template>
    I hope, it helps you to understand details of my questions.
    Regards,
    Alexander
    Kind regards, Alexander

  • How to build ear files for ADF application using Ant task

    How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
    Any help is highly appreciated.
    Thanks
    Shiva

    Hi Timo
    Thanks for your reply.
    I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
    error :
    weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
    Please advise how to handle this.
    As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
    Appreciate your help.
    Thanks
    Shiva

  • How can I get file from multiple instance using file adapter

    Hi.
    Our system(PI7.1) have three application instances running with each physical servers.
    We use sender file adapter.
    The file data is sent to one of the servers.
    Now, how can I get the file using three file adater?
    Should I put the file "sapmnt(\usr\sap)" .
    Or are there another solution?
    regards,

    Hi Ashutosh
    You will have to use sapcar.zip which contains the utility Sapcar.exe utility for unzipping the files from SAP compressed files. (*.car file)
    Regards
    Gaurav
    PS: Reward points if solved

  • How Can insert the records into Excel_sheet by using SQL Task-SSIS ?

    As per requirement ,
    insert the records in excel sheet(DT)  by using SQL Task-SSIS .
    I used SQL query in SQL Task-SSIS:
    e.g.., INSERT INTO [DT$B1:B1] VALUES ('COMMM')
    but error:Executing the query "INSERT INTO [DT$B1:B1] VALUES ('COMMM') " failed with the following error: "This table contains cells that are outside the range of cells defined in this spreadsheet.". Possible failure reasons: Problems
    with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Please any suggestion  ...
    -MADHU

    then first create a table inside Excel sheet based on your source data. You can Execute sql task for that using excel connection. then use insert to populate it
    see an example here where I create a dynamic sheet using execute sql task
    http://visakhm.blogspot.in/2013/09/exporting-sqlserver-data-to-multiple.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How Can Hide The File Name in URL Using Jsp

    I Want source code for Hiding The File name in url address using jsp.
    for example www.website/login.jsp is view but i want www.website/ only.

    Hi Praveen - how does that DEF would be determined?
    Have a look at the below blog for executing os commands
    SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki
    XI/PI: Command line sample functions
    Is there any problem in using the dynamic file name configuration??
    Message was edited by: Hareesh Gampa

  • How can a jar file is download and used on client automatically from server

    i am using JAI.jar(sun jar file),tiffimage.jar(my jar file) and some fonts(Hindi) on the client side in my project.can we download and use the above files from the server on the client side automatically without the client installation.
    please reply me as soon as possible

    you can use Java Web Start to load all the jar files. JDK 1.4.1 is come with Java web Start.

  • How can I spool file in SQL*Plus using sysdate as filename?

    Dear Oracle Experts,
    Would you help me to solve following problem?
    I want spool a file in SQL*Plus but using sysdate as filename.
    e.g. today is 30-Nov-1999
    then the filename is 19991130.lst
    tommorrow is 1-Dec-1999
    then the filename is 19991201.lst
    My e-mail address is [email protected]
    Thanks!!!
    Tony Sit
    null

    Tony Sit (guest) wrote:
    : Dear Oracle Experts,
    : Would you help me to solve following problem?
    : I want spool a file in SQL*Plus but using sysdate as filename.
    : e.g. today is 30-Nov-1999
    : then the filename is 19991130.lst
    : tommorrow is 1-Dec-1999
    : then the filename is 19991201.lst
    : My e-mail address is [email protected]
    : Thanks!!!
    : Tony Sit
    Tony, hi!
    Let you test this way:
    set ECHO OFF
    set TERMOUT OFF
    set FEEDBACK OFF
    set VERIFY OFF
    SET PAGESIZE 0
    SET LINESIZE 80
    SET HEADING OFF
    spool setout.sql
    SELECT 'SPOOL '

  • How can I send files via Bluetook from my Tour to other phones?

    How can I send files via Bluetook from my Tour to other phones?
    I have even been able to pair to the other device, but I don't see the option to send/copy/move files through Bluetooth.
    I can only send my Address book via bluetooth.
    Please help!!

    Hi and Welcome to the Community!
    See this KB:
    KB05409 Transfer a file using Bluetooth technology between two BlackBerry smartphones
    Substitute, in the KB, the appropriate instructions for your other device in place of the KB section for the receiving device. Be aware that RIM only supports BT file transfer between BBs...with other devices is technically unsupported. But, it usually works, as long as the two devices are paired, trusted to each other, and each have all of the correct BT services enabled for the configuration of the other device.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can I hide file names in a photostream?

    How can I hide file names in a shared photo stream on icloud.  I don't want people to see how many pictures I take at an event.  Can this be done to pictures already posted?

    The Shared Photo Stream uses the filename of the original image file as the title that is shown in the stream.  If you want to hide the original filename, export the image to a folder in the Finder, rename it, then reimport it to share it.  You can rename the files directly when exporting.
    Or, if you do not mind to change the names of the originals in Aperture use the command "Metadata > Batch change" and change the title of the image, with the option "Apply to Original file" enabled and "Add metadata from" set to "None".
    To rename the photos already shared, delete them from the Shared Album and share them again.

  • How can I configure ReFS to NOT fail read operations when a checksum error is detected (on non-Storage-Spaces volumes where data integrity streams are enabled)?

    According to William Stanek, in his Windows Server 2012 R2 Inside Out: Configuration, Storage & Essentials book, this is apparently possible: (pg. 615 - here it is on Google Books: https://books.google.ca/books?id=0IyfBAAAQBAJ&pg=PT819&lpg=PT819&dq=read+operation )
        Integrity can be enabled when the system is not running on Storage Spaces. When
        integrity is enabled and ReFS detects a checksum mismatch, ReFS logs an event and
        fails the read operation by default. If you don’t want the read operation to fail, you
        can configure ReFS to continue with the read operation. A related event will be logged
        regardless.
    So then how do I configure it to do that???
    (And just to make it super-clear, I'm NOT using Storage Spaces, so there is no redundancy via mirroring/parity, and I'm not expecting any file repair - just detection of corruption. It's just a basic volume formatted with ReFS and
    with integrity streams enabled, via format E: /fs:ReFS /i:enabled
    For those who want more details, here's the situation: 
    I try to perform a read operation on a file with corrupted data (purposely done for testing using a low-level disk editor), I get a the following error message:
    And an event ID 133 from ReFSv1 gets logged in the System log:
    Clicking "Try Again" just brings up the same message, and clicking "Skip" skips the operation entirely.
    This is indeed the correct default behaviour.
    What I want instead is for the read operation to be allowed to complete, with corrupt data and all, and ONLY for the event to be logged. And according to William Stanek, this is supposed to be configurable somewhere - and after hours of searching, I haven't
    been able to find anything.

    Hi Tommy,
    >>How can I configure ReFS to NOT fail read operations when a checksum error is detected
    We can use PowerShell command Set-FileIntegrity to configure this. The specific parameter for controlling this behavior is
    -Enforce <Boolean>which indicates whether to enable blocking access to a file if integrity streams do not match the data.  
    Regarding this point, the following article can be referred to as reference.
    Set-FileIntegrity
    https://technet.microsoft.com/en-us/library/jj218351.aspx
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Best practice with respect to wcf configuration files for SSIS

    So after reading a lot of posts and blogs on how to configure SSIS to read from configuration files , I am still not clear and would like any expert to provide a definitive stance. In my case the WCF service consumption is wrapped into a separate assembly.
    I am referencing the assembly in an embedded C# script within my SSIS package.
    When I make the helper class call to the webservice , I get the endpoint not found WCF exception.
    Keep in mind I am running this from VS 2012 IDE and did the following to make sure the WCF call works:
    1. Googled and found that you need to have config entries in DtsDebugHost.exe.config file. But it still did not work
    2. Had the same entries in the associated app.config file for C# script but it still did not work.
    It seems like SSIS is very fragile w.r.t consuming WCF entires in a config file. Is the best practice to just have the end point created in code and externalize the end point as a SSIS variable / xml file or is there really a way to get these config files working.
    Attached is the wcf snippet of my config file.
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="ITransactionProcessor">
    <security mode="TransportWithMessageCredential" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor" binding="basicHttpBinding" bindingConfiguration="ITransactionProcessor" contract="CyberSource.ITransactionProcessor" name="portXML" />
    </client>
    </system.serviceModel>
    SM

    I have the code working without use of config files. I am just disappointed that it is not working using the configuration files. That was one of the primary intents of my code re-factoring. 
     Katherine
    Xiong , If you are proposing this as an answer then does this imply that Microsoft's stance is not to use configuration files with SSIS?? Please answer.
    SM

  • HT4623 please help!! how can i configure my iphone 3gs because i've been updated a new version i did it but it's hard to activate it again.

    please help!! how can i configure my iphone 3gs because i've been updated a new version, i did it but it's hard to activate it again. this message i always recieved in my iphone
    "We're sorry, we are unable to continue with your activation at this time."

    You phone was hacked. You can not get help with it here. Hacking / Jailbreaking voids any warraty and forfeits your right to support. Discussing jailbroken / hacked devices is forbidden by the terms of service here.

  • How can i open file from adobe reader..i already have adobe read

    how can i open file from adobe reader..i already have adobe reader installed and cannot open a
    file and i cannot convert my file into pdf..

    Is the file really a PDF? Where is it? Have you tried opening it from within Reader?

Maybe you are looking for

  • How to setup CCMS with Solution Manager

    Hi, All My question is how to setup or satallite connection with Solution manager 4.0 for CCMS alerts Is that RFC connection using both sites, trusted and satellite system ? I would like to setup CCMS alerts through Solution manager and R/3 ccms plea

  • Connector Won't Fit

    Before I bought the iPhone 4 I was using the 3GS iPhone. I have a cable that is installed in my car connected to the car stereo to play music from the iPhone/iPod. I'm using the 30 pin connector on the bottom and not the earphone jack. Besides playin

  • Trying to insert "second" value in DATE column using SQLLDR ORA-01861

    Don't know suddenly with the same piece of control file the number issue got resolved. :30 :30 :30 :30 :30 :30 :30 :30 :30 :30 :30 Now I was using for this FORECASTED_ASA EXPRESSION "TO_DATE(SYSDATE,':SS')" ...but it's not working throwing error like

  • Switch status

    i have a motor which  rotates in clockwise if switch s1 is actuated or  rotates in Anti-clockwise if switch s2 is actuated. (both are separate switches) In my logic it is stated that s1 state must be saved . (can i use a flip flop or latch or shift r

  • Implementing F4 Help functionality of ABAP work bench on Adobe form

    Hi , http://help.sap.com/saphelp_nw2004s/helpdata/en/42/c8a3ccc84e136ee10000000a1553f7/frameset.htm Above link gives following description about Web Dynpro Form – UI Element ValueHelpDropDownList <b>ValueHelpDropDownList contains the script that is r