How to Initiate Multiple SQL*Loader Sessions

Oracle db utilities(Chapter-Conventional and Direct Path Loads) talks of parallel data loading models for direct load.
We need to execute the following commands:
sqlldr USERID=scott/tiger CONTROL=load1.ctl DIRECT=TRUE PARALLEL=true
sqlldr USERID=scott/tiger CONTROL=load2.ctl DIRECT=TRUE PARALLEL=true
sqlldr USERID=scott/tiger CONTROL=load3.ctl DIRECT=TRUE PARALLEL=true
The previous commands must be executed in separate sessions, or if permitted on operating system, as separate background jobs.
We want to run these in separate sessions. Our problem is that we have a job running which invokes sqlldr. Now how can we initiate Multiple SQL*Loader Sessions(actually multiple sql sessions which run concurrently,i.e. in parallel)? I need the command for it!
Regds,
Rohit

I tried opening two files but selecting and hitting enter. it opens one SSMS and two tabs.
Balmukund Lakhani
Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog |
Team Blog | @Twitter
| Facebook
Author: SQL Server 2012 AlwaysOn -
Paperback, Kindle

Similar Messages

  • 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]

  • How to open multiple sql files in only one ssms instance

    how to open multiple sql files in only one ssms instance, I can't get anything to work that I find online..I hope you can help us.

    I tried opening two files but selecting and hitting enter. it opens one SSMS and two tabs.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How to run multiple sqls in one jasper report

    Hello!
    Is there any one that can help me in integrating/ viewing my xml file to the web. I have my GUI in jsp format, the jsp makes a call to the bean class and then finally bean class hit my reports java class.The report java class generates the report and shows it in the new window.
    The problem is with writing mutiple sql queries and showing the result from multiple sql queires in one report.
    I do not know how to write multiple queries for just 1 report. I can give a simple example of my problem also.
    My report is as follows:
    First Name Middle Name Last name
    Sandeep               Pathak
    Now First and Middle Name come from 1st sql query and Last Name comes from 2nd sql query.
    I want to join the result obtained from both the sql queries in one Jasper Report (not as 2 separate sections but as one section).
    My problem is how to view my report in the web. furthermore, how to make complex query in jasperassistant, like multiple table in one query, because i�m integrating multiple query in one form or sheets of paper.
    Please help me in this.
    Thanks
    Sandeep
    Calance
    India

    Hi Sheldon,
    we never have issues when we combine standard objects, like a cliear with a load inforprovider, or the master data integration you mentioned in your document. However, from the moment we combine a script logic with a standard package (like a move) it does not work .The data package contains the task needed for the script and for the move. the process chain is called up but always comes in error in the first step (BPC modify dynamically ) ... there is also no log when checking the view status ...
    I can sent you some screenshots if you like ...
    D

  • Executing code within a SQL*LOADER session for RLS

    We are using RLS, and have a need to load some data using sql*loader. More specifically, we need to do the following:
    set the context (sys_context)
    load the data, using sys_context('xxx','xxx') in the data.
    This would require the execution of a package procedure within the session that loads the data. I do not know if this is possible using sql*loader.
    I have a workaround; creating a load user and creating a login trigger that calls the package procedure. This is not a very elegant solution for us and we would like to perform the procedure call within sql*loader.
    We are running Oracle 10g release 1 on linux.
    Thank you in advance.

    Ok -
    I have figured out how to do this, although it is somewhat inefficent. I am populating a table that contains carrier information: British Airways for example. The table is similar to the following:
    carrier_id number(35)
    carrier_code varchar2(3)
    carrier_name varchar2(30)
    modification_date date
    There is a unique id, called a site_id, assigned to each site in our streams environment. The primary key, carrier_id, is built using this ID.
    I have a function that will set the context, and then use sys_context to get the value of the siteid. I also have a function that will get the site_id from a table using the global name. Finding the site_id using these functions and inserting it through sql loader is just a matter of putting the following in the controlfile:
    carrier_id "get_siteid||:carrier_id"
    where carrier_id is a number from 1-n where n is the number of carriers.
    If you have a more elegant way of doing this, please let me know.
    Jamie McLaughlin

  • How can I use sql loader to load a text file into a table

    Hi, I need to load a text file that has records on lines tab delimited into a table. How would I be able to use the sql loader to do this? I am using korn shell to do this. I am very new at this...so any kind of helpful examples or documentation would be very appreciated. I would love to see some examples to help me understand if possible. I need help! Thanks alot!

    You should check out the documentation on SQL*Loader in the online Oracle document titled Utilities. Here's a link to the 9iR2 version of it: http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96652/part2.htm#436160
    Hope this helps.

  • How to refer the SQL*Loader command line parameters in the control file

    The problem I am trying to resolve is to insert the input file name when SQL*Loader is loading the record from the file. I have multiple files to load and it is nice to associate a record with a particular input file.

    Create the control file dynamically (and fill one of the columns with the file name as a constant) before you start SQL*Loader
    Another option is to use external tables
    Re: Data Loading
    Message was edited by:
    Jens Petersen

  • How to execute multiple sql statements

    hi all
    i am wondering if i can execute multiple sql statements in one shot with >> execute immediate command
    for example:
    i define the variable as X := sql statement
    Y := sql statement
    z := sql statement
    can i do execute immediate (X,Y, Z);
    if yes how ?? and if not any possible alternate
    thanks

    Starting with Ganesh's code
    DECLARE
       l_statement                 VARCHAR2 (2000);
       v_passwd                    VARCHAR2 (200);
       v_username                  VARCHAR2 (200) := 'test';
       v_pwd_key                   VARCHAR2 (200) := 'lwty23';
       v_dblink_name               VARCHAR2 (2000);
       v_dblink_drop               VARCHAR2 (2000);
       v_dblink_create             VARCHAR2 (2000);
       v_dblink_check_connection   VARCHAR2 (2000);
       l_number                    NUMBER;
    BEGIN
       --<<c_instance>>
       FOR c_instance IN (SELECT *
                            FROM v_oracle_instances
                           WHERE environment = 'Developement')
       LOOP
          SELECT encpwd_owner.display_db_encpwd (v_username,
                                                 c_instance.host_name,
                                                 c_instance.instance_name,
                                                 v_pwd_key)
            INTO v_passwd
            FROM DUAL;
          v_dblink_name := c_instance.host_name || '_' || c_instance.instance_name;
          v_dblink_create :=
                ' CREATE DATABASE LINK '
             || v_dblink_name
             || ' CONNECT TO '
             || v_username
             || ' '
             || 'IDENTIFIED BY '
             || v_passwd
             || ' USING'
             || ' ''(DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST= '
             || c_instance.host_name
             || ')(PORT='
             || c_instance.LISTENER_PORT
             || '))(CONNECT_DATA=(SID='
             || c_instance.instance_name
             || ')))''';
          v_dblink_check_connection := 'select 1 from global_name@' || v_dblink_name || '.QCM';    --- Notice this change. I am simply selecting 1. That should be enough to test the database link.
          v_dblink_drop := 'drop database link ' || v_dblink_name || '.QCMTLAF';
          -- l_statement := 'BEGIN ' || v_dblink_create ';' || v_dblink_check_connection ';' || v_dblink_drop '; END ;'
          BEGIN
              EXECUTE IMMEDIATE (v_dblink_create);
              DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Created');
         EXCEPTION
            WHEN others THEN
               dbms_output.put_line( 'Failed to create the database link ' || v_dblink_name  );
               dbms_output.put_line( dbms_utility.format_error_backtrace() );
               INSERT INTO error_table( column_list )
                 VALUES( <<list of values>> );
         END;
          EXECUTE IMMEDIATE (v_dblink_check_connection) INTO l_number;    --- Notice this.
          DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Tested');
          BEGIN
             EXECUTE IMMEDIATE (v_dblink_drop); 
             DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Dropped');
          EXCEPTION
             WHEN others THEN
               dbms_output.put_line( 'Failed to drop the database link ' || v_dblink_name  );
               dbms_output.put_line( dbms_utility.format_error_backtrace() );
               INSERT INTO error_table( column_list )
                 VALUES( <<list of values>> );
         END;
       END LOOP;
    END;But I agree with the point that others have brought up that it really doesn't make sense to create and drop a database link like this.
    Justin

  • Run multiple SQL*Loader control files from command prompt

    I have written control files for 15 different tables with specific data files for each table. I have build the control files using toad for each one of them at once. Now I want to run the sql loader for all the tables one time. I know I cannot run multiple files from toad and not sure If I can run from the command prompt.
    Please let me know If I can.

    skvaish1 wrote:
    Hi,
    On unix you can create a script to runn all sqlldr at once like as followes.
    1. Create a script load_sqlldr.sh with following content.
    export ORACLE_SID=<YOUR DB_SID>
    export ORACLE_HOME=<Your Oracle Home>
    export PATH=$ORACLE_HOME/bin:$PATH
    sqlldr (Full command with parameter for 1st table) &
    sqlldr (Full command with parameter for 2nd table) &
    sqlldr (Full command with parameter for 3rd table) &
    sqlldr (Full command with parameter for 4th table) &
    sqlldr (Full command with parameter for 15th table) &
    2. Then execute the script.
    Regards1. Can I also write script load_sqlldr.sh with following content
    sqlldr user/psswd@db_name control=controlfile1.ctl
    sqlldr user/psswd@db_name control=controlfile2.ctl
    sqlldr user/psswd@db_name control=controlfile3.ctl
    sqlldr user/psswd@db_name control=controlfile15.ctl
    2. Then execute the script.

  • How to execute multiple SQL statements thru frontend?

    With SQL Server database, you can execute multiple SQL statements.
    Ex.
    SQLCommand cmd = new SQLCommand();
    cmd.CommandText = "SELECT * FROM EMP; SELECT * FROM DEPT";
    cmd.ExecuteXXX();
    Note that for SQL Server, ";" (semocolon) is used as a separator.
    What separator is required for Oracle ? Or rather, can I execute multiple SQL statements against Oracle database (10g) ?
    (Why I want to do it is a totally diff. subject !)
    Thanks,
    Ami.

    Hello,
    You could use an anonymous PL/SQL block to batch multiple statements.
    If you want to use SELECT statements, you would open a REF CURSOR for each SELECT and return the REF CURSOR to your application. INSERT, UPDATE, and DELETE statements can just be passed as is.
    A simple REF CURSOR example might look like:
    begin
      open :v_refcursor1 for select * from emp;
      open :v_refcursor2 for select * from dept;
    end;Where v_refcursor1 and v_refcursor2 are parameters defined as a REF CURSOR type.
    Hope that helps a bit...
    - Mark

  • 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.

  • How to handle multiple transaction in session method.

    hi experts.
    please tell me how to<b> write code for multiple transaction</b> in session methods.
    Quest.  -de<b>another question is exactly which method we have to follow , how to</b>decide.
    what r the conditions for selecting which method is suitable for which type of
    transaction.

    hi,
    if you have run time validation while updating the data into SAP R/3 Transaction,then use BDC Call Transaction.
    example : when you load the data into Sales order then you need to load the into Header text of sales order.
    for this ,you have to use Update Mode 'S'.
    it is online update and if you small amount of data ,then prefer this one
    2. If you have huge amount of data and then prefer Session Method.
    we have one more advantage in session method...
    suppose file has 1,00,000 records and the if you use all the records at time,then you will get short dump like system time exceed .
    then you can split the each 10,000 records into one session and will process.
    3. Direct Input method : we prefer this method only few Transaction ,
    this will not applicable to when system has customer fields .
    for session method using multiple transactions.
    Have one BDC_OPEN_GROUP, multiple BDC_INSERT s and one BDC_CLOSE_GROUP.
    You should have multiple BDC_INSERT s for multiple transactions.
    call function BDC_OPENGROUP.
    Build BDC data and cal lBDC_INSERT for transaction 1
    Build BDC data and cal lBDC_INSERT for transaction 2
    Build BDC data and cal lBDC_INSERT for transaction 3
    paas the tcodes to bdc_insert.
    call function BDC_CLOSE_GROUP.

  • How to execute multiple sql statements in oracle?

    I want to execute multiple statements in a single transaction in oracle. Following are my queries:
    Create table temp_table as Select * from table;
    SELECT * FROM temp_table d;
    drop table temp_table ;
    I am using sql comment text in asp.net
    I am using executenonquery command in asp.net.
    Thanks,
    Divya

    SigCle ,
    Here's an example that executes 3 statements;
    begin insert into foo values(1); insert into foo values(2); insert into foo values(3); end;
    923354,
    The block doesn't compile because temp_table doesn't exist at the point you're trying to compile the anonymous block. I'd recommend re-reading the doc link and forum link provided to get a better understanding of how temp tables work, as it's simply different with Oracle. You don't create Oracle temporary tables on the fly; you create them ahead of time and then just use them. The data itself is already specific to a particular session; you don't create and drop the table each time.
    Also, you can't just "select * from table" in plsql. The results have to GO SOMEWHERE. Usually you'd either open a cursor and process it in the block, or send out a ref cursor if you want to send the data to a client side app. The ref cursor data wouldn't actually be fetched until the block completes though, so you'd need to use ON COMMIT PRESERVE ROWS, which would also mean you'd need to clean up the data yourself (delete the data from the table when you're done with it).
    Corrections/comments welcome.
    Greg

  • How to execute multiple sql query in one time?

    HI
    I'm trying to convert my sql project In Oracle. In sql i could run multiple select statement/query in once and they return in multiple table result respectively. but in oracle its not executed.
    like:
    sqlQry := "Select * from abc; select * from qwe; select * from kkk; select * from xyz"
    its return 4 table abc, qwe,kkk,xyz to my dataset result
    how it is possible in oracle 10g

    Saten Chamoli wrote:
    I'm trying to convert my sql project In Oracle. In sql i could run multiple select statement/query in once and they return in multiple table result respectively. but in oracle its not executed.
    like:
    sqlQry := "Select * from abc; select * from qwe; select * from kkk; select * from xyz"
    its return 4 table abc, qwe,kkk,xyz to my dataset result That is pretty much a hack - there are no ANSI SQL standards supporting this syntax. It makes no sense either.
    If you want to combine 4 data sets, there are the UNION and UNION ALL set commands.
    If you want to create 4 cursors with a single call, then use the following (anonymous PL/SQL block) call:
    begin
      open :c1 for select * from abc;
      open :c2 for select * from qwe;
      open :c3 for select * from kkk;
      open :c4 for select * from xyz;
    end;Bind 4 client cursor variables to the ref cursors c1 to c4 and make the call to Oracle.
    And I suggest that you read up on Oracle concepts and fundamentals as your approach with you "sql project" shows ignorance in this regard.

  • How to execute multiple sql statement?

    In an single transaction I want to execute two update statements. I don't know how to break those statements and send to oracle from Asp.Net to execute.
    I tried go and ; .
    Below is myQuery string*
    update abc set One = 10 where Two = 3 ; update xyz set Three = 10 where Four = 3 ;
    Additional info
    I am using sql comment text in asp.net
    I am using executenonquery command in asp.net.

    Hi,
    If you want to execute multiple statements in a single transaction, you could either:
    a) create a local transaction (via an OracleTransaction object), then call executenonquery multiple times within that transaction, or
    b) pass them all in an anonymous block for a single round trip.. ie, begin update abc set One = 10 where Two = 3 ; update xyz set Three = 10 where Four = 3 ;end;
    The database doesn't permit multiple statements passed at once (other than in a plsql block).
    Hope it helps, corrections/comments welcome
    Greg
    PS, questions such as this would be better posted in the ODP.NET forum; this forum is for issues regarding ODT.NET (a VS plugin)
    ODP.NET

Maybe you are looking for