How to display list process, when i run sql*loader in c#

Hello,
How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
This is my code:
string strCmd, strSQLLoader;
string strLoaderFile = "XLLOAD.CTL";
string strLogFile = "XLLOAD_LOG.LOG";
string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
System.IO.DirectoryInfo di;
try
System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
di = new DirectoryInfo(strCSVPath);
strSQLLoader = "";
strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
StreamWriter writer = new StreamWriter(strLoaderFile);
writer.WriteLine(strSQLLoader);
writer.Flush();
writer.Close();
// Redirect both streams so we can write/read them.
cmdProcessInfo.RedirectStandardInput = true;
cmdProcessInfo.RedirectStandardOutput = true;
cmdProcessInfo.UseShellExecute = false;
cmdProcessInfo.LoadUserProfile = true;
//System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
// Start the procses.
System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
// Issue the dir command.
pro.StandardInput.WriteLine(strCmd);
// Exit the application.
pro.StandardInput.WriteLine("exit");
//Process[] processlist = Process.GetProcesses();
//foreach(Process pro in processlist){
Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
Console.WriteLine(pro.StandardOutput.ReadLine());
// Read all the output generated from it.
string strOutput;
strOutput = pro.StandardOutput.ReadToEnd();
pro.Dispose();
catch (Exception ex)
return;
finally
Thanks.

friend
sqlldr is an application residing in the OS. procedure runs in the dbms engine.
you cannot run an os command directly from a procedure or a function or a package .
If you want to do so you need to use either a daemon process created by a PRO*C program
or a JAVA stored procedure to do so.
just refer to previous question forums, you can find the solution. Somebody has already given a solution using
java to run an OS command . check it out
prakash
[email protected]

Similar Messages

  • ADF how to display a processing page when executing large queries

    ADF how to display a processing page when executing large queries
    The ADF application that I have written currently has the following structure:
    DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
    I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
    The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
    I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
    Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
    I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

    Hi Steve,
    After a few attempts - yes I have a hit a few snags.
    I'll send you a copy of the example application that I am working on but this is what I have done so far.
    I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
    DataPage --> DataAction (refresh Collection) -->DataPage
    I have then added this code to the (refreshCollectionAction) DataAction
    protected void invokeCustomMethod(DataActionContext ctx)
    super.invokeCustomMethod(ctx);
    HttpSession session = ctx.getHttpServletRequest().getSession();
    Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
    if (nominalSearch == null)
    synchronized(this)
    //create new instance of the thread
    nominalSearch = new ns(ctx);
    } //end of sychronized wrapper
    session.setAttribute("nominalSearch", nominalSearch);
    session.setAttribute("action", "nominalSearch");
    nominalSearch.start();
    System.err.println("started thread calling loading page");
    ctx.setActionForward("loading.jsp");
    else
    if (nominalSearch.isAlive())
    System.err.println("trying to call loading page");
    ctx.setActionForward("loading.jsp");
    else
    System.err.println("trying to call results page");
    ctx.setActionForward("success");
    Created another class called ns.java:
    package view;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.generic.DCRowSetIteratorImpl;
    public class ns extends Thread
    private DataActionContext ctx;
    public ns(DataActionContext ctx)
    this.ctx = ctx;
    public void run()
    System.err.println("START");
    DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
    ((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
    //b.executeQuery();
    System.err.println("END");
    and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
    package view;
    import javax.servlet.http.HttpSession;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class ProcessingAction extends DataForwardAction
    protected void invokeCustomMethod(DataActionContext actionContext)
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.invokeCustomMethod(actionContext);
    HttpSession session = actionContext.getHttpServletRequest().getSession();
    String action = (String)session.getAttribute("action");
    if (action.equalsIgnoreCase("nominalSearch"))
    actionContext.setActionForward("refreshCollection.do");
    I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
    Thanks in advance for your help
    David.

  • How to display List of Members

    Hi,<BR><BR>I would like to verify a calc script to check whether it return correct members,<BR>for example:<BR><BR>==============<BR>FIX(@REMOVE(@DESCENDANTS("TOTALOPERINCOME_05",0), @LIST(@UDA("GL Account", "TCACCOUNT"))))<BR><BR>ENDFIX<BR>==============<BR><BR>Can anyone advise how to display List of members from the above selection?<BR>The objective is to select level 0 descendants of "TOTALOPERINCOME_05", and remove the members if they have "TCACCOUNT" UDA.<BR><BR><BR>Thanks,<BR><BR>Norliansyah

    1) The log file is woefully inadequate for validating a list of more than a dozen or so members.<BR><BR>2) Creating a temporary database or application for this is like going from Dallas to Fort Worth by way of India.<BR><BR>3) Neither of the above check your syntax, only the selected elements.<BR><BR>Using member select: you have to rebuild the logic by using subset functionality, but you can both preview the list and generate the members in a useable form (although like I said, it doesn't check your syntax, just the functionality).<BR><BR>Using report generation: you have to replace the @relative with dimbot, and again it only validates the functionality if you successfully re-design the logic.<BR><BR>Overall, I believe the member select (using subset selection) is the quickest, easiest, and most useful.<BR><BR>-Doug.

  • How many bytes i get when i run some method through soap

    Hi everyone,
    I have a small problem. I have some web service. From wsdl file i create java classes (wsimport was used) and add them to my program. All works very good but i don't understand how to get information about how many bytes i get when i run some method.
    For example i have a method:
    service.getNewData(); How to check how many data i get BEFORE this method will complete.
    I know that i can check Content-Length but how i can do it?
    Thanks.

    * Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install.
    * Install the new version that you have downloaded.
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • How to I run SQL Loader in a procedure

    Hi
    Can somebody tell me how can i run SQL Loader in a pl/sql procedure ?
    i tried this:
    host sqlldr73 tiger/scott load.ctl
    then this
    host sqlldr73 tiger/scott "c:\load.ctl"
    but none works.
    Please advise.
    Thanks.
    regards
    Esther

    friend
    sqlldr is an application residing in the OS. procedure runs in the dbms engine.
    you cannot run an os command directly from a procedure or a function or a package .
    If you want to do so you need to use either a daemon process created by a PRO*C program
    or a JAVA stored procedure to do so.
    just refer to previous question forums, you can find the solution. Somebody has already given a solution using
    java to run an OS command . check it out
    prakash
    [email protected]

  • Records are Missing when we run Delta Load( FIGL-ACCOUNT ITEMS)

    Hi,
      Some records are missing when we run Delta load.
    We have one generic data source on FAGLFLEXA table.
    We select  Field nm TIMESTAMP
    TIME STAMP IS LOCAL.
    upper limit is Blank
    Lower limit is 1000.
    we run this process chain every day.
    we select delta settings is New status for changed records.
    Please give me any idea why records are missing when we run deltas.
    Thanks
    Naik

    Hi Anju,
    Please ensure that you are following the below steps while Initilizing the application 13:
    1. All the users in source system, must be locked.
    2. Ensure that SMQ1 and RSA7 are having no data for application 13. Delete the application 13 datasource entries from RSA7.
    3. Delete and refill the setup tables for application 13.
    4. Run a INIT with data transfer load for the required datasources of application 13.
    5. The Deltas can follow from the next day.
    This will ensure that your deltas are fetching correct data. Note that, delta will pick up the same conditions on which the INIT load was run.
    Please let me know if you need any more information.
    Regards,
    Pankaj

  • How to get the process id of a sql statement or a session  ....

    How to get the process id of a sql statement or a session . ..?
    Thanks

    What about this?
    SELECT pid
      FROM v$session s, v$process p
    WHERE p.addr = s.paddr
       AND s.sid = :sid;   -- replace :sid with your session idRegards.
    Al

  • How do you run sql loader?

    I can not find suitable documentation on running sql loader in 9i on win2000. Can anyone give me a hint on the syntax of this command? Can I run it in SQL/Plus?
    Thanks.

    sqlldr.exe is it's own utility. it's not part of sqlplus. To run it in sqlplus you typically have to 'host sqlldr'. To run it, try typing 'sqlldr HELP=Y' from a DOS command prompt. It should get your the parameters.

  • Run SQL Loader script from Unix env

    Hi,
    We are using HP-UNIX server. The control file of SQL Loader is placed in oracle home\bin folder in the unix server. I created Executable for this SQL Loader control file in concurrent program and attached into a request group.
    Then I ran it from a responsibility, I am getting the below error.
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    SQL*Loader: Release 8.0.6.3.0 - Production on Sun Sep 5 15:28:45 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    My Actual Control file is,
    LOAD DATA
    INFILE '/usr/........xyz.txt'
    BADFILE '/usr/........xyz.bad'
    DISCARDFILE '/usr/........xyz.dsc
    APPEND
    INTO TABLE gl_interface_stg
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    CATEGORY_NAME,
    JOURNAL_DESCRIPTION,
    JOURNAL_NAME,
    BATCH_NAME,
    BATCH_DESCRIPTION,
    ACCOUNT_CODE,
    PROCESSING_STATUS CONSTANT 'N'
    If I run the above control file from my local machine (windows) using SQLLDR username/pwd @servername control='c:/abc.ctl' from the command prompt, then all the records from xyz.txt file pushed into staging table.
    Where as, If I schedule the above control file and trying to run from a GL responsibility, I am getting the above error message.
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.
    Thanks in advance.

    Hi,
    SQL*Loader-350: Syntax error at line 16.Please see if these docs help.
    SQL*LOADER-350 SYNTAX ERROR [ID 1019271.102]
    LDR-00350 TOKEN LONGER THAN MAX ALLOWABLE LENGTH ERROR WHEN LOADING ASCII FILE [ID 1020091.6]
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.See these docs.
    How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]
    11i FND:How to specify Record Terminator In Sql*Loader type of concurrent program [ID 252850.1]
    Thanks,
    Hussein

  • When clause in SQL Loader

    hi,
    i am facing a problem during when clause in sql loader
    here is my control file
    options(direct=true)
    load data
    infile 'data_file.txt'
    truncate
    into table "TABLE_NAME"
    when col1 = '1'
    trailing nullcols
    col1 integer external TERMINATED BY ',',
    col2 integer external )
    into table "TABLE_NAME"
    when col1 = '2'
    trailing nullcols
    col1 integer external TERMINATED BY ',' ,
    col2 integer external )
    =======================================
    this file loads only data when col1=1 and does not load data when col1=2
    can any body help me
    thanks in advance

    Hi,
    I currently have the same problem. Seems that SQLLDR WHEN clause only apply for columns that based on datafile. Also, data that to be compared in WHEN clause is get from datafile and you can not make any modification on that data.
    How did you do to work around with that?

  • OWB 10gR2 : How to configure ctl and log locations for Sql*Loader mappings?

    Hi all,
    I'm using OWB 10gR2 to load data in tables with Sql*Loader mappings.
    In my project I have a datafile module and an Oracle module.
    When creating an sql*loader mapping in the oracle module, there is two properties for this mappings that I want to modify. The first is Control File Location and the second is Log File Location. Values for those properties are equal to the data file module location. When trying to change those values I can only chose "Use module configuration location".
    Somebody knows how to configure those properties with different locations as the one of the flat file module?
    What I want to do is to store the data file in one directory, and control file and log file in other directories.
    Thank you for your help.
    Bernard

    Hi,
    You're right, my problem is that the dropdown only show the location associated with the flat file location even if I have other file locations created in the design repository.
    The good news is that I have found the solution to solve the problem :
    1) Edit the file module and in tab "Data locations", add the locations you want to use for control file and log file.
    2) Open configuration window of the mapping and then the dropdown for properties Control File Location and Log File Location show new locations
    I have tested my mapping after changing those properties and it's working.
    Bernard

  • Need help to run sql loader from Form6i

    Hi All,
    I have some problem with the sql loader running from form 6i.
    I have done following steps for that.
    1. have created bat file to run sql loader.
    2.Alos created ctl and txt files inside the same folder.
    In the form , in button press i have written below code
    HOST('cmd /c C:\load1.bat > C:\output.txt');
    But it is giving error as -
    "Unable to open Load1.ctl."
    but i have run that bat files from command prompt ; and it is running fine.
    I guess probably it is not getting the correct path.
    Will pls help me, wt exacly I'm doing wrong?
    Rg,
    Subir

    Hi Francois,
    Thanks for reply.
    It is not a problem with the batch files. Coz, I just able to run batch files, but that is not correct solution.
    Once the host command id firing, that time it is going to path -
    "c:\orant\Form60\"
    And in this path it searching for that batch files and all the require files; but the require files are present in some different folder. So i think I need to change the path as well, but that I'm unable to do.
    To resolve the problem, I have copied all the files in "c:\orant\Form60\" folder, and then it is working.
    So I think I need to changed the path, so how to change the path. If I able to change the path I think it will worked. How to change the path?
    Best Rg,
    Subir

  • Run SQL*Loader from forms

    How can we run SQL*Loader from forms. I guess HOST command will run the OS comman on the clinet. How do I invoke the Loader script on the server from the forms clinet?
    -Ravi.

    Look..the oracle server is in UnixWare 7 and the client PC
    is on Windows XP Pro, but before install the Oracle Client Software into the client pc the builtin HOST doesn't work
    then I install the Software in Windows XP pc and now I'm
    working loading the txt file into the server on Unix,
    Try to install the Oracle Client Software into the Citrix
    client, I think it work.

  • How to convert epoch time to datetime in sql*loader Oracle

    Hello,
    I wan't to question how to convert epoch time to datetime in sql*loader Oracle. I try this script for convert epoch time to datetime in sql*loader, but error:
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    This is my loader:
    LOAD DATA INFILE 'C:\Documents and Settings\Administrator\My Documents\XL_EXTRACT_211\load.csv'
    into table TEMP_TEST_LANGY append
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    DATADATA CHAR "TO_DATE('01-JAN-1970','DD-MON-YYYY')+:datadata/86400"
    This is my csv file:
    79314313.7066667
    79314336.2933333
    79314214.3466667
    This is my table:
    CREATE TABLE TEMP_TEST_LANGY
    DATADATA DATE
    Thanks
    Edited by: xoops on Sep 21, 2011 8:56 AM
    Edited by: xoops on Sep 21, 2011 8:58 AM

    thanks for your answer, but I asked to use sql loader instead of the external table, which so my question is why can not the epochtime converted to datetime, if there is no way to convert a datetime epochtime using sql loader, so I'm required to use the external table. thank you.
    This is my error log:
    Column Name Position Len Term Encl Datatype
    DATADATA FIRST * , CHARACTER
    SQL string for column : "TO_DATE('1-Jan-1970 00:00:00','dd-MM-YYYY hh24:mi:ss') + (:DATADATA/60/60/24)"
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Edited by: xoops on Sep 21, 2011 12:33 PM

  • Problem trying to run sql loader

    hi ,
    i'm trying to run sql loader but i'm getting an error message. it was working a few days ago but not now. i am on oracle version 8.0.6.2.0
    from a unix prompt line i type....
    sqlldr system/manager id3com.ctl
    the error message i get is......
    ORA-01017: invalid username/password; logon denied
    SQL*Loader-704: internal error: ulconnect: OCISessionBegin [-1]
    does anyone know what this is for? i've always used system/manager in the past but just recently i've been getting error messages.

    I'd say someone changed the password. Try running sql*plus as system.

Maybe you are looking for

  • How to get workitem ID parameter in BSP application in UWL?

    Hello All, okay, it's been a long day and i stuck with this seemingly simple problem - how to get a workitem id in my BSP application when calling from UWL. Points are guaranteed to all who post an answer. i got MVC BSP iview is configured to be call

  • There was an error opening this document. This file is already open or in use by another application

    I cannot open any PDF documents. I receive one of two error messages: "There was an error opening this document. This file is already open or in use by another application." "This file is in use. Enter a new name or close the file that's open in anot

  • Retina MacBook Pro Flickering

    I had my screen replaced because I had the image retention issue that most LG screens had. Ever since I got it replaced my screen will flicker randomly. I got some video of it and hope they will replace it. What is your experience with this isssue? (

  • Can't log on to website to start download

    I'm having trouble getting onto the site (www.adobe.com/go/getserial) to redeem my purchace. The problem is only with my pc, I just get a buffering symbol after i type the web address. I tried it on my iPad and it works fine but obviously I can't dow

  • If i get Logic express, what besides composing is it good for?

    I want to get a nice application for sound track for movies.. sound effects and all kinds of stuff. But Logic has a lot for midi and composing.. is it mostly for that? Of course i compose too, so it's super useful but i was just wondering what people