How to create .ctl (control file) to calide excel rows in ssis ?

In my package i have a requirement to use .ctl control file to valide excel rows. can anyone tell me how to create a .ctl file which will have all of this information. 

A few assumptions 1st:
1) I understood the .ctl file can be any ASCII (flat) file of arbitrary format; and that
2) You will drive the validation rules.
Since you seem like want to apply the validation as the first step in your package I advocate plugging the Script Transformation task in which happens to expose the "ProcessInputRow" method that in turn allows a developer to intercept each row for inspection.
This is where you will need to apply much thinking to how to make the validation rules applied in retrospect to the incoming data.
You drive the code (logic). More through help is a click away here http://www.codeproject.com/Articles/193855/An-indespensible-SSIS-transformation-component-Scr which only covers how to make the row-by-row processing possible.
If you expected SSIS to have this functionality provided for free - unfortunately this is not happening.
One of many reason is, what you want to do is extremely laborious.
Arthur My Blog

Similar Messages

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • How to Create a Control In Notepad

    Hello:
    I am need help creating a control file. I have never done this before. I have to load the following script into notepad:
    load data
    infile 'names.txt'
    badfile 'names.bad'
    truncate
    into table names
    fields terminated by ','
    trailing nullcols
    (first,last)
    I then went to Command Prompt to begin the SQL Loader command and recieved the following message.
    SQL*Loader-500: Unable to open file (names.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system

    DUPLICATE post
    How to Create a Control In Notepad

  • How to restore a control file without having its backup

    Hi,
    Can any one please suggest me how to restore a control file without having its backup.
    Thanks

    To add to what SB said, in years past the instructions for re-creating the control file manually were contained in the DBA Administration manual. It used to be and may still be common to be taking and saving a "backup control file to trace" for this purpose.
    If you lost only the primary copy of the control file and it is an OS file then while the database is shutdown you can copy the secondary over the primary and then use if to start the database. If the control file is stored in ASM then there should be a way to perform the copy via ASM.
    If you use rman for backups then a copy of the control file should be part of the backup process and you can retrieve it from the backup set then perform recovery using the backup control file though I do note the OP said something to the effect no backup exists. Still, I have knows of instances where the DBA did not realize that the backup set contained the control file and the spfile so I think this is worth mentioning just in case.
    HTH -- Mark D Powell --

  • Is it possible to create a control file without the datafiles

    Hi All,
    Is it possible to create a control file without the datafiles?
    on any OS or DB version
    regards,
    sachin

    if I understand properly:
    - you have a script to recreate the controlfile
    - you have all of your database files backed up except your controlfiles
    This should work as this is how we sometimes refresh dev databases:
    1) restore the copies of the database files
    2) recreate the controlfile
    3) recover the database files to the desired point in time (if hot backup or archivelogs are available, otherwise, it would be as of the time of the backup)
    4) add temp files to temporary tablespace(s)
    The simpler solution would be to backup your controlfile at the same time as your datafiles (RMAN or o/s copy).
    I hope I understood your question properly.

  • How to recreate the control files

    Can someone tell me how to recreate the control file?
    Thanks in advance
    Himanshu

    Hi, You can use the following statement.
    CREATE CONTROLFILE
    SET DATABASE prod
    LOGFILE GROUP 1 ('/u01/oracle/prod/redo01_01.log',
    '/u01/oracle/prod/redo01_02.log'),
    GROUP 2 ('/u01/oracle/prod/redo02_01.log',
    '/u01/oracle/prod/redo02_02.log'),
    GROUP 3 ('/u01/oracle/prod/redo03_01.log',
    '/u01/oracle/prod/redo03_02.log')
    NORESETLOGS
    DATAFILE '/u01/oracle/prod/system01.dbf' SIZE 3M,
    '/u01/oracle/prod/rbs01.dbs' SIZE 5M,
    '/u01/oracle/prod/users01.dbs' SIZE 5M,
    '/u01/oracle/prod/temp01.dbs' SIZE 5M
    MAXLOGFILES 50
    MAXLOGMEMBERS 3
    MAXLOGHISTORY 400
    MAXDATAFILES 200
    MAXINSTANCES 6
    ARCHIVELOG;
    Thanks

  • How to create table control without wizard....???

    Hello experts !!
    Plz tell me how to create table control without wizard.
    for sflight table.
    Scenario 1
    I have one screen like 1000.
    There i have taken carrid, connid, fldate as criteria.
    Now i want to display Planetype, Price, Seatsmax in the table control.
    Scenario 2
    i have two screens 1001, 1002.
    in the screen 1001 i have taken carrid, connid, fldate as criteria and there is a Button.
    when i will click the button it will show the price, planetype and seatsmax in the table control in the next screen, i.e 1002
    plz help me out...
    and how to save new record in the dictionary table from that table control....

    Hi
    see the sample programs and design accordingly
    syntax:
    CONTROLS .
    if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.
    u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.
    Go through this urls.
    www.****************
    www.sap-img.com
    Check the below links.
    just refer to the link below
    http://www.sapmaterial.com/tablecontrol_sap.html
    step by step procedure with screen shots
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://sap.niraj.tripod.com/id25.html
    Also you can see the below examples...
    Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    Regards
    Anji

  • Re createing the control file

    alter database backup controlfile to trace;
    How do I re create the control file using what's in trace(Oracle 9i Solaris 9)
    Thanx.

    See Note 1012929.6 How to Recreate the Controlfile, the trace contains the syntax to recreate the controlfile, you can copy the contents to a sql file such as newctl.sql, edit the contents removing the header and make other changes such as increasing maxlogfiles, then run the sql file.
    HTH
    Enrique
    PS Why do you need to rebuild the controlfile?

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How to create one ISO file large than 2G

    hi,
    here when I create one ISO with 3G(larger than 2G) on solaris 10 machine, I met below error:
    mkisofs: File too large. cannot fwrite 32768*1
    Anyone has suggestion for this problem? How to create one ISO files larger than 2G?
    See the detail logs information:
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    mkisofs -o my.iso -A "Software DVD" -D -L -P "Study "-p CBC/XLE -r -T -V R50 -v iso
    mkisofs: The option '-L' is reserved by POSIX.1-2001.
    mkisofs: The option '-L' means 'follow all symbolic links'.
    mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-L'.
    mkisofs: Use -allow-leading-dots in future to get old mkisofs behavior.
    mkisofs: The option '-P' is reserved by POSIX.1-2001.
    mkisofs: The option '-P' means 'do not follow symbolic links'.
    mkisofs: Mkisofs-2.02 will introduce POSIX semantics for '-P'.
    mkisofs: Use -publisher in future to get old mkisofs behavior.
    Warning: creating filesystem that does not conform to ISO-9660.
    mkisofs 2.01 (sparc-sun-solaris2.10)
    Scanning iso
    Scanning iso/rac_stage3
    Using RAC_S000 for /rac_stage2 (rac_stage1)
    Using RAC_S001 for /rac_stage1 (rac_stage3)
    Using INSTA000.1;1 for ..
    Writing: The File(s) Start Block 48
    0.42% done, estimate finish Thu Feb 1 16:12:35 2007
    0.84% done, estimate finish Thu Feb 1 16:12:36 2007
    1.26% done, estimate finish Thu Feb 1 16:12:36 2007
    1.69% done, estimate finish Thu Feb 1 16:12:36 2007
    2.11% done, estimate finish Thu Feb 1 16:12:36 2007

    87.65% done, estimate finish Thu Feb 1 16:14:54 2007
    88.07% done, estimate finish Thu Feb 1 16:14:54 2007
    mkisofs: File too large. cannot fwrite 32768*1
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Thanks!

    does it matter "copy protection" ? for the problem that i have?
    my computer is alwyes get stuck while i trying to made a dvd or image
    i made few disks wite menu in the past & i had not problems at all

  • How to create a *.lnk file in the ipaq

    how to create the .lnk file and where in the Ipaq?
    if yes so how or can u write me an example
    thanks itzik

    -Connect your PDA to your Desktop
    -Using windows Explorer you can make shortcuts by right clicking on the file you want...
    Marco

  • How to create a .jar file in wlcs3.1

    hello friends,
    hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
    thanks.
    hari

    $JDK_HOME/bin/jar (%JDK_HOME%\bin\jar) shows you the syntax
    where JDK_HOME is your jdk installation directory.
    Kumar
    hari wrote:
    hello friends,
    hi friends, im working on weblogic commerce server3.1 . i dont know how to create a .jar file in weblogic commerce server3.1. can any one knows send email to me.
    thanks.
    hari

  • How to create a PAR file in Web Dynpro

    Hi !!
    Could any one tell me how to create a par file of the java application developed in WebDynpro..
    thanks
    ChandraSekar Maheswaran

    Hi,
    Refer the link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/a-c/creating%20your%20first%20web%20dynpro%20application.pdf
    Webdynpro concepts
    Regards,
    Tamil K

  • How  to  Create a PSD file  in C#

    How  to  Create a PSD file  in C#

    Converting an image file to .psd is easy in Aperture - just export the image version with one of the export presets "PSD - Original size" or   "PSD - Half size".
    But I suspect, that will not solve your problem, since you are trying to create a watermark in Aperture and probably want to create a transparent background for the watermark, to give it an arbitrary shape. That cannot be done in Aperture. Aperture does not support compositing and layers. If you want to create an image of an arbitrary shape with a transparent background you need to use  a program that supports compositing. Since you do not have Photoshop, you could try the free GIMP instead (afaik, there is no Lion version of GIMP; the most recent version is Mt. Lion only; you could try if the Snow Leopard version works on your system).
    Any program that you own, that lets you write or draw on a transparent background will be fine. The Watermark file does not necessarily need to be a psd-file. A png will also work. You can also use Preview to convert between image formats or to annotate an image with text.
    Regards
    Léonie

  • How to create a CSV file in java

    how to create a CSV file in java

    this is the code that I have used in a hp project:
    private static final String DELIMIT = ",";
    StringBuffer buf = new StringBuffer();
    public void addString(String str){
    buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim())).append(DELIMIT);
    public void sendFile( String strData ,
                                String strTitle,
                                String strContType,
                                HttpServletResponse res ) throws IOException {
              byte[] _filedata=strData.getBytes();
              res.setContentType( strContType );
              res.setHeader( "Content-Disposition", "attachment;filename="+ strTitle );     
                     DataOutputStream out = new DataOutputStream( res.getOutputStream() );
              out.write( _filedata, 0, _filedata.length );
              out.close();
    public void addStringWhithReturn(String str){
              buf.append(toEscapedStringLiteral(str.replaceAll(" ","").trim()));
              buf.append( "\n" );
    private String toEscapedStringLiteral( String charSeq ) {
              if ( null == charSeq ) {
                   charSeq = "";
              return "\"" + charSeq + "\"";
    ....hope its help
    kou

Maybe you are looking for

  • Converting ASCII text (byte array ending in null) to a String

    Hi all, I am trying to convert a null terminated ascii string stored in a byte array to a java String. When I pass the byte array to the String constructor it does not detect/interpret the null as a terminator for the ascii string. Is this something

  • Exporting and Importing Data of Application Log

    Hello, We do migrate an application from SAP System A to SAP System B. Despite the application logic, we do need to migrate some data, too. For this we do write an export report in System A that writes the data of some tables to  files on the app ser

  • How to re-show a dialog with the parent window

    I am writing an Menu drivern application: -- A JCMDIPane is put in the JFrame. -- Multiple JCMDIFrames are added to the JCMDIPane via menu selecting events -- Each JCMDIFrame (call it parent) may pop up a Dialog window (child) (Thes dialogs are modal

  • Hard Drive Light remains on even when system is powered off

    HP xw8600 Workstation running XP SP3 In the past couple of weeks I am getting a lot of blue-screen errors with varying error codes, mostly pointing to problems with the C: drive. But what troubles me is that my hard drive activity light remains lit c

  • Want to connect sqlplus through linux

    Hi Friends I am newbie to Linux . I am working as oracle DBA on 10g . Till last day I had worked on windows platform. Now my company want me to work on Linux platform . I am first time using Linux dont know A,B,C of Linux . I want to connect sqlplus