maximum size of stored procedure

Hello

What is the size of /packages of procedure authorized maximum in the oracle database so that we can avoid the too large program error.

the current size can be considered 'user_object_size' objects, but I don't know if there is no view to get the maximum allowed size of a DB object.

Thank you

Vipin Kumar Rai

the limit is 6 million lines

http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/limits.htm

but I guess you will be hitting an other limit before

Tags: Database

Similar Questions

  • Size limit for the parameter in an Oracle stored procedure

    Oracle 11g on Linux SUSE 11.

    What is the LIMIT on the size of a parameter (setting OUT or IN) routed to oracle (Oracle 11 g) procedure?

    If I create a procedure:

    create or replace procedure test_proc (myid number, mydoc CLOB, BLOB img)

    What is the maximum number of bytes that I can spend for each parameter?

    Thank you

    Hello

    scottjhn wrote:

    Oracle 11g on Linux SUSE 11.

    What is the LIMIT on the size of a parameter (setting OUT or IN) routed to oracle (Oracle 11 g) procedure?

    If I create a procedure:

    create or replace procedure test_proc (myid number, mydoc CLOB, BLOB img)

    What is the maximum number of bytes that I can spend for each parameter?

    Thank you

    Depend on the exact maximum size of CLOB and BLOB depends on settings in your database.  I don't know how small these limits can be defined, but I think it's always on a terabyte.

    There are no special restrictions on the parameters; they can be as large as the other BLOB or CLOB.

  • Maximum number of parameters sent to the stored procedure

    I have a web form where I insert data in Oracle. There are at least 20 fields on the form. For the INSERT, I want to use the stored procedure. But in this case for the section of the VALUES in the INSERT statement, I need to send that many - in this case 20 settings. Is it normal for a procedure to receive 20 parameters? If this isn't the case, then should how I follow to do? I know that technically there is only no problem but isn't normal programming or database managementwise? I think it's the basic thing any developer web do it all the time.

    Is it normal for a procedure to receive 20 parameters?

    Sure. It is very good.

    But what is normal programming or database managementwise

    If you need to insert values for 20 fields then normal.

  • Arguments in a stored procedure.

    Hello

    Please can you tell me:

    What is the maximum size of a VARCHAR2 parameter as passed as an argument to an Oracle stored procedure.

    for example

    Test of CREATE OR REPLACE PROCEDURE (test_param VARCHAR2)

    IS

    ....

    The maximum length of the string of test_param is?

    Thank you
    Duncan

    32767octets
    But be aware that some games characters uses more one byte to store unique. In this case, divide the number of bytes by the number of bytes to store a character.

    1 byte per character = 32767 characters
    2 bytes per character = 16383 characters
    3 bytes per character = 10922 characters

    If you need more you must use CLOB instead of VARCHAR2 data

    With greetings
    Krystian Zieja

  • Deny access to my SkyDrive workbook error: "workbook is greater than the maximum size of workbook can be opened in the browser.

    Original title: deny access to my workbook to SkyDrive

    I have a workbook stored in SkyDrive that I share with several co-workers. We had no problem sharing the workbook for the last two weeks, but this morning, we are all getting an error message saying "Workbook is larger than the maximum size of workbook can be opened in the browser" and cannot access it at all. It's a very important workbook we need on a daily basis at work, then I would greatly appreciate any advice you could provide!

    Thank you
    Samantha

    Hello

    Because the problem is related to SkyDrive, I suggest you to report this problem in windows live support team.
    http://windowslivehelp.com/product.aspx?ProductID=6

  • Can I manually set the maximum size of the thumbnail cache?

    I notice that in a folder with a large number of photos, there seems to be a limit to how much stored thumnails. If I quickly scroll the I get to a point where I have to slow down and wait for the thumnails to regenerate. I wish I could store all thums so I can go to any point in the subdirectory and see them with no delay (the whole point of a cache). I have 4 GB of RAM so I don't care if it uses a fair bit to do this. Y at - it a key option or the configuration of the registry to set the maximum size? I have Vista Home Premium x 64.

    Hello old giza,.

    Thank you for your response back!

    Except there is no way to increase the size for the thumbnail cache.  You are able to clear the cache and I saw on third party internet providers that offer this possibility.  But the operating system is not an option to increase.
    Maybe if you can give more details about what you're trying to do we can get to the best situation.  Please let us know status.  Thank you!

    Engineer James Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Double games of results returned on stored procedure call

    Hello

    I have a stored procedure created Java and called using the Spring JDBC using StoredProcedure class, stored procedure returns duplicate rows, is this a known problem?

    When I run the stored procedure even in DBVizualiser it not show correctly.

    The class below is used to execute the stored procedure:

    public class CustomerSearchProcedureRunner extends StoredProcedure {
     public CustomerSearchProcedureRunner(JdbcTemplate jdbcTemplate) {
      super();
      this.setJdbcTemplate(jdbcTemplate);
      this.declareParameter(new SqlReturnResultSet(RETURN_RESULTS, new CustomerRowMapper()));
      this.declareParameter(new SqlParameter(CUST_SP_IN_PARAM, Types.VARCHAR));
      this.setSql("{CALL INSURANCE.SEARCHCUSTOMER (?) ON ALL}");
      this.setSqlReadyForUse(true);
      this.compile();
     }
    }
    


    and Java Stored Procedure that runs SQLFire is given below:

    public class CustomerSearchProcedure {
     
     private static final String DOLLAR = "\\$";
     private static final String COLON = ":";
     private static final String CUST_NAME = "CUST_NAME";
     private static final String CUST_NO = "CUST_NO";
     private static final String GENDER = "GENDER";
     
     
     public static void searchCustomer (String customers, ResultSet[] outResults,
       ProcedureExecutionContext context) throws SQLException {
      StringBuilder sql = new StringBuilder();
      StringBuilder whereCondt = new StringBuilder();
      String[] tokens = new String[]{};
      
      if (customers != null && customers.trim().length() > 0) {
       tokens = customers.split(DOLLAR);
      }
      
      sql.append("<global>SELECT * FROM INSURANCE.CUSTOMERS ");
      whereCondt.append("WHERE CUST_PRIMARY IN ('Y', 'N') ");
      // Apply dynamic where condt
      for (int i=0; i < tokens.length; i++ ) {
       String token = tokens[i];
       if (token.startsWith(CUST_NO)) {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("CUST_NO = " + token.substring(token.indexOf(COLON)+1));
       }
       if (token.startsWith(CUST_NAME))  {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("CUST_NAME LIKE '"+ token.substring(token.indexOf(COLON)+1).trim() + "%'");
       }
       if (token.startsWith(GENDER)) {
        if (whereCondt.length() > 0) {
         whereCondt.append(" AND ");
        }
        whereCondt.append("GENDER ='"+ token.substring(token.indexOf(COLON)+1).trim() + "'");
       }
      } //End of for
      
      if (whereCondt.length() > 0) {
       sql.append(whereCondt.toString());
      }
      
      Connection cxn = context.getConnection();
      Statement stmt = cxn.createStatement();
      ResultSet rs = stmt.executeQuery(sql.toString());
      outResults[0] = rs;
     } //END OF METHOD
    }
    

    A correction preceding: "for the case on the information in the TABLE of the DataSet to be targeted on each node is also sent for the tag requests will target only this dataset (and avoids duplicates).»

    should read "in the case of on TABLE query Tags will only target the local primary data on the node for tables partitioned, while for replicated tables, it is sent to only one of the lines (and so avoids duplicates in both cases).» WHERE clause to TABLE is not used for cutting data only for the size of the set of nodes to the target.

    The tag prunes yet the query to all of the local primary buckets in all cases (i.e. which WE ALL and on GROUPS of SERVERS) so the comment about and equivalent was incorrect. However, this will always be looking for data in duplicate for replicated tables and TABLE is the only way to avoid it for now.

  • Maximum size of storage for VDR

    Hi all

    I searched on the internet and on this site, and according to what I found, I want to clarify some things:

    Each Server vCenter can have 1 camera VDR branch above

    VDR can save up to 100 mV

    VDR can have a maximum of 2 de-deplication stores connected to it

    Each store deduplication can be of a maximum size of 1 TB

    On this basis, it is a fair assumption that I can have a space for backup storage maximum of 2 TB per vCenter using VDR?

    I ask because I need to implement a backup solution for nearly 100 VM and they employ about 2 TB of space.

    I have a 8TB available to store backups on NAS.

    However IF I can have only up to 2 TB of storage space and virtual machines could increase in the future to more than 2 TB in size, do I need to look at another form of backup (like VCB) has a growth future mind?

    Any suggestions or advice?

    Concerning

    Mark

    a RESUME can support up to 10 devices vDR (not sure about vsphere 5)

    the other elements are correct, however you can expect a certain de-dup so the amount that can be stored in each destination depends on how much initial de-dup on the first pass of backup and well it turns later.

    I used it since beta and my device current back 6 VMS, (DC, monitor e-mail, exchange server 5 GB and a few others).  the destination disk is 150 GB and has stabilized at about 20 GB free after 6-8 months of continuous use.  The Unit indicates that no duplicate backup would be approximately 4.5PB (petabytes).

    After the initial backup pass written new only revenge will be a block not already represented in the destination, as well as a few catalog information.

    at a customer, I recently tested their file server about 500 GB, the first pass used about 187 GB of the destination that is a result good enough to de-dup.

    then he the old result "you mileage may vary."

    the current version is a little slow, so it can be difficult to fit everything in a backup window (you can spread their) without overloading the IO device.  the v2 it is supposed to be faster due to some changes, but he continues to get better with each new version.

    Thus, although it is not your and backup only for production it performs an additional backup very good plus works well as an image backup for a fast recovery of a virtual computer.  Recently, I had a SAN failure which eventually nuking all six servers.  using vDR restore I had them all back within 2-3 hours and fully functional without doing anything other than a restoration and powered on, all the domain and all the work 100% server even the domain controller.

    Wayne

  • Delete records from sys.aud$ stored procedure

    We have a stored procedure that attempts to move the records from the table of sys.aud$ to a history table (in order to keep sys.aud$ to a more reasonable size, I guess - full disclosure, I have not written this proc). Base flow is:
    Select count (*) in the number of lines of sys.aud$
    If {(rowcount > 1000)
    copy all rows in sys.aud$ in the history table
    remove from sys.aud$
    }

    I says this proc used to work perfectly in a troubled past (I'm new on the client) but now has not worked for a while. When we try to compile the proc, we get the error
    "table or view does not exist", and the line is the "deletion of sys.aud$. The line "select count (*) from sys.aud$ ' seems to cause no problems, but the proc does not compile as is. If I comment out the line "remove from sys.aud$", however, the proc compiles very well.

    Confusingly, if I log in as the same account that owns this proc, I can run both the count (*) select from sys.aud$ AND remove clauses sys.aud$ with no complaint at all (by modifying slightly to work with 1 single record at a time, of course), but I can't seem the same to compile in a stored proc.

    I guess that it is related permissions? Can someone point me to the permissions of the owner needs to be able to remove from sys.aud$ in a stored procedure? Or is there something else that needs to be done here? Pointers much appreciated.

    Thank you.

    956928 wrote:
    We have a stored procedure that attempts to move the records from the table of sys.aud$ to a history table (in order to keep sys.aud$ to a more reasonable size, I guess - full disclosure, I have not written this proc). Base flow is:
    Select count (*) in the number of lines of sys.aud$
    If (rowcount 1000 >) {}
    copy all rows in sys.aud$ in the history table
    remove from sys.aud$
    }

    I says this proc used to work perfectly in a troubled past (I'm new on the client) but now has not worked for a while. When we try to compile the proc, we get the error
    "table or view does not exist", and the line is the "deletion of sys.aud$. The line "select count (*) from sys.aud$ ' seems to cause no problems, but the proc does not compile as is. If I comment out the line "remove from sys.aud$", however, the proc compiles very well.

    Confusingly, if I log in as the same account that owns this proc, I can run both the count (*) select from sys.aud$ AND remove clauses sys.aud$ with no complaint at all (by modifying slightly to work with 1 single record at a time, of course), but I can't seem the same to compile in a stored proc.

    I guess that it is related permissions? Can someone point me to the permissions of the owner needs to be able to remove from sys.aud$ in a stored procedure? Or is there something else that needs to be done here? Pointers much appreciated.

    Thank you.

    acquired through ROLE privileges are NOT applicable within the named PL/SQL procedures.

    GRANT DELETE ON SYS. AUD$ ;

  • &lt; Unspecified file name &gt; file is larger than the maximum size supported by the data store ' &lt; indeterminate datastore &gt;

    Hello

    I use vSphere4 and I'm having problems, create snapshots of virtual machines.  I get the following error when I try and take a snapshot...

    File & lt; filename not specified & gt; is larger that the maximum size supported by the store data "& lt; not stated the store data & gt;

    If I check all disks assigned to the virtual machine, the block sizes are ok.  All the disks are of block size of 1 MB and less 60GB, except one that is 600GB and a 4 MB block size.  There are also free space on each data store with being less 5,30 Go which I guess should be much more than enough to create a snapshot.

    In addition, whenever I try and create a snapshot, it creates a file called SERVER - Snapshot1.vmsn, 2, 3, 4 etc. on the main data store.

    Is it possible that because of the single disc of 600 GB, VMware prevents me from taking a snapshot?

    Here is the config...

    See the attached file for disk configuration information.  Operating system drive is the drive where the snapshots are created.

    Basic disks refers to all disks assigned to the virtual machine. Given that, by default, the snapshot is stored the vmx file, this data store should be able to potentially create a VMDK your largest disk size, assuming that you change every block in the vmdk.

    In your case, it should support a snapshot that can potentially reach 600 GB to one of your drives, and so needs a block of size on the VMFS volume to support this. You can redirect the snapshots to another logic unit number and so to work around this problem (Storage VMotion is another option) limitation.

    Trust, this clears up a little.

  • call a stored procedure with OUT VARCHAR2 parameter fails

    Hi all

    I use the Oracle 11.2.0.1 version OLE DB provider. I have a simple stored procedure that contains a VARCHAR2 OUT parameter:

    create or replace procedure TestOut (RESULT_CODE OUT VARCHAR2) is
    Start
    RESULT_CODE: = 'X '.
    TestOut end;

    The following c# code piece fails:

    String ConnStr = "Provider = OraOLEDB.Oracle; User ID = test; Password = test; Data Source = sandbox; « ;
    OleDbConnection Conn = new OleDbConnection (ConnStr);
    Conn.Open ();
    OleDbCommand Cmd new OleDbCommand();
    Cmd.Connection = Conn;
    OleDbParameter Param = Cmd.CreateParameter ();
    Param.ParameterName = "RESULT_CODE ';
    Param.Direction = System.Data.ParameterDirection.Output;
    Param.OleDbType = OleDbType.BSTR;
    Param.Size = 1;
    Cmd.Parameters.Add (Param);

    Cmd.CommandType = System.Data.CommandType.Text.
    Cmd.CommandText = "{TESTOUT (?). CALL} ";
    Cmd.ExecuteNonQuery ();

    If the stored procedure is modified to contain an OUT parameter, the same code works, after you change the type of parameter to appropriate OleDBType (OleDbType.SmallInt).

    What am I doing wrong when handling OUTPUT VARCHAR parameters? Y at - there any limitation on the types of parameters stored procedure using the Oracle OleDB provider?

    Published by: user957565 on 1/Ago/2011 06:31

    I get an access violation, using 11202. What do you get?

    In any case, it works fine for me using OleDbType.VarChar instead of OleDbType.BSTR.

    Hope this helps, comments welcome.

    Greg

  • stored procedures, newbie question

    I am at the point with my Web site where I need to think about the optimization of the query and have started looking at stored procedures for the first time.

    1. am I right in thinking the benefit of the execution of stored procedures is that it is a pre-compiled query?

    2. I'm trying to use the query cache as my 'normal' queries go, but is it possible to cache the results of a stored procedure?

    In practice, using 1 & 2 would provide a significant increase in performance.

    Personally, I use it only for large heavy updates or deletions. For example, I have an Oracle package with a bunch of procedures that run when a person completes an order - this process involves many tables, deletions, updates and a relatively simple logic. I think that the ideal candidate for a stored procedure.

    I use CF as an alternative if, for example, I have to repeat a load of complex business logic in a stored procedure that I have already written in a CFC.

    Keep in mind the benefits of a stored procedure - basically precompiled code. Don't forget that if you are using well trained cfqueries with cfqueryparams, execution plan gets compiled to the top in the first round * anyway *, so if you call a stored procedure or run your query really there is no difference.

    And Yes - do not underestimate the additional time it takes for a developer to do everything in the stored procedures rather than ColdFusion, they don't call it rapid development of applications for anything

    Don't forget as well as someone can write a stored procedure to poorly coded as well as they can write a wrong encoded query. At least if the developer has its application in front of him, he can see instantly what he needs of the index and locate errors, you could go years before realizing a person made a mistake inside a stored procedure, as no one can see the code.

    Regarding security Yes - if you really want to limit security then sprocs will do that for you. However in most of the applications I've seen the right developer has the possibility to write a query, as they see fit.

    Once I use stored procedures while I think of it - if you have more than one application that needs to do the same thing: this should * definitely * be a stored procedure.

    Basically, the same rules apply to them as any other aspect of programming; security of the duplication of code, efficiency, ease of maintenance - it's all a matter of their maximum weight and decide what is best.

  • Create a stored procedure

    This procedure works fine, but I want to make a stored procedure to schedule it to run over time. I'd appreciate any help?

    SET SERVEROUTPUT SIZE 1000000
    declare
    cursor obj_cursor (objname Varchar2) is
    Select object_name, object_type, owner
    from dba_objects
    where owner = 'ITA '.
    and object_type IN ('TABLE', 'SEE')
    and object_name like '% JOB_;

    cursor c_job_status is
    SELECT ownerid jobid, starttime, endtime
    OF ita.tpis32_job_status
    WHERE starttime < sysdate - 800
    AND num_lines > 10000000;
    WK_SQL VARCHAR2 (500);
    WK_JOBSTR VARCHAR2 (500);
    BEGIN
    for c_job loop c_job_status
    wk_jobstr: = 'JOB_ | c_job. JobID | '%';
    for wk_rec loop obj_cursor (wk_jobstr)
    If wk_rec.object_type = "TABLE" then
    wk_sql: = 'drop table' |' ITA.' | wk_rec.object_name | ';';
    dbms_output.put_line (wk_sql);
    end if;
    If wk_rec.object_type = "DISPLAY" then
    wk_sql: = 'drop view ' | wk_rec.object_name | ';';
    dbms_output.put_line (wk_sql);
    -Wk_sql EXECUTE IMMEDIATE.
    end if;
    end loop;
    end loop;
    end;
    I tried this, but it did work ' t:
    create or replace procedure delete_table is
    SET SERVEROUTPUT SIZE 1000000
    declare
    cursor obj_cursor (objname Varchar2) is
    Select object_name, object_type, owner
    from dba_objects
    where owner = 'ITA '.
    and object_type IN ('TABLE', 'SEE')
    and object_name like '% JOB_;

    cursor c_job_status is
    SELECT ownerid jobid, starttime, endtime
    OF ita.tpis32_job_status
    WHERE starttime < sysdate - 800
    AND num_lines > 10000000;
    WK_SQL VARCHAR2 (500);
    WK_JOBSTR VARCHAR2 (500);
    BEGIN
    for c_job loop c_job_status
    wk_jobstr: = 'JOB_ | c_job. JobID | '%';
    for wk_rec loop obj_cursor (wk_jobstr)
    If wk_rec.object_type = "TABLE" then
    wk_sql: = 'drop table' |' ITA.' | wk_rec.object_name | ';';
    dbms_output.put_line (wk_sql);
    end if;
    If wk_rec.object_type = "DISPLAY" then
    wk_sql: = 'drop view ' | wk_rec.object_name | ';';
    dbms_output.put_line (wk_sql);
    -Wk_sql EXECUTE IMMEDIATE.
    end if;
    end loop;
    end loop;
    end delete_table;
    create or replace procedure delete_table is
    cursor obj_cursor(objname Varchar2) is
    select object_name, object_type, owner
    from dba_objects
    where owner = 'ITA'
    and object_type IN ('TABLE', 'VIEW')
    and object_name like 'JOB_%';
    
    cursor c_job_status is
    SELECT jobid, ownerid, starttime, endtime
    FROM ita.tpis32_job_status
    WHERE starttime < sysdate - 800
    AND num_lines > 10000000;
    WK_SQL VARCHAR2(500);
    WK_JOBSTR VARCHAR2(500);
    BEGIN
    for c_job in c_job_status loop
    wk_jobstr := 'JOB_' ||c_job.jobid||'%';
    for wk_rec in obj_cursor(wk_jobstr) loop
    if wk_rec.object_type = 'TABLE' then
    wk_sql := 'drop table ' ||'ita.'|| wk_rec.object_name || ';';
    dbms_output.put_line(wk_sql);
    end if;
    if wk_rec.object_type = 'VIEW' then
    wk_sql := 'drop view ' || wk_rec.object_name || ';';
    dbms_output.put_line(wk_sql);
    --EXECUTE IMMEDIATE wk_sql;
    end if;
    end loop;
    end loop;
    end delete_table;
    
  • Insert table with stored procedure

    Hello

    is it possible to use bind insert table in odp.net that calls a stored procedure, or who loses the point of contact of the table?

    I need to do at once two insertions in a parent table and the child table (get the primary key generated by a sequence in the first table.). Don't know if this can be done without storing seq.next_val somehow?

    Edit: I will extend the question and ask if the table bind sql text can be a block anonymous plsql

    Edited by: KarlTrumstedt 16-jun-2010 02:49

    You can do both. You can table insert a stored procedure and an anonymous block.

    Here's how (these are based on the ArrayBind example provided with the installation of ODP.net/ODT.

    Installation program:

    create table zdept (deptno number, deptname varchar2(50), loc varchar2(50));
    
    CREATE OR REPLACE PROCEDURE ZZZ (p_deptno in number, p_deptname in varchar2, p_loc in varchar2) AS
    begin
        insert into zdept values(p_deptno , p_deptname || ' ' || p_deptname, p_loc );
    end zzz;
    
     /**
     drop table zdept ;
     drop procedure ZZZ ;
     **/
    

    table and link it to the stored procedure call:

       static void Main(string[] args)
        {
          // Connect
          string connectStr = "User Id=;Password=;Data Source=";
    
          // Setup the Tables for sample
          Setup(connectStr);
    
          // Initialize array of data
          int[]    myArrayDeptNo   = new int[3]{1, 2, 3};
          String[] myArrayDeptName = {"Dev", "QA", "Facility"};
          String[] myArrayDeptLoc  = {"New York", "Maryland", "Texas"};
    
          OracleConnection connection = new OracleConnection(connectStr);
          OracleCommand    command    = new OracleCommand (
            "zzz", connection);
          command.CommandType = CommandType.StoredProcedure;
    
          // Set the Array Size to 3. This applied to all the parameter in
          // associated with this command
          command.ArrayBindCount = 3;
          command.BindByName = true;
          // deptno parameter
          OracleParameter deptNoParam = new OracleParameter("p_deptno",OracleDbType.Int32);
          deptNoParam.Direction       = ParameterDirection.Input;
          deptNoParam.Value           = myArrayDeptNo;
          command.Parameters.Add(deptNoParam);
    
          // deptname parameter
          OracleParameter deptNameParam = new OracleParameter("p_deptname", OracleDbType.Varchar2);
          deptNameParam.Direction       = ParameterDirection.Input;
          deptNameParam.Value           = myArrayDeptName;
          command.Parameters.Add(deptNameParam);
    
          // loc parameter
          OracleParameter deptLocParam = new OracleParameter("p_loc", OracleDbType.Varchar2);
          deptLocParam.Direction       = ParameterDirection.Input;
          deptLocParam.Value           = myArrayDeptLoc;
          command.Parameters.Add(deptLocParam);
    
          try
          {
            connection.Open();
            command.ExecuteNonQuery ();
            Console.WriteLine("{0} Rows Inserted", command.ArrayBindCount);
          }
          catch (Exception e)
          {
            Console.WriteLine("Execution Failed:" + e.Message);
          }
          finally
          {
            // connection, command used server side resource, dispose them
            // asap to conserve resource
            connection.Close();
            command.Dispose();
            connection.Dispose();
          }
        }
    

    "anonymous plsql block.
    Well Yes

        static void Main(string[] args)
        {
          // Connect
          string connectStr = "User Id=;Password=;Data Source=";
    
          // Setup the Tables for sample
          Setup(connectStr);
    
          // Initialize array of data
          int[]    myArrayDeptNo   = new int[3]{1, 2, 3};
          String[] myArrayDeptName = {"Dev", "QA", "Facility"};
          String[] myArrayDeptLoc  = {"New York", "Maryland", "Texas"};
    
          OracleConnection connection = new OracleConnection(connectStr);
          OracleCommand    command    = new OracleCommand (
            "declare dnumber number; dname varchar2(50) ; begin dnumber := :deptno;dname := :deptname;insert into zdept values (:deptno, :deptname, :loc); update zdept set deptname=dname || :loc where deptno = :deptno; end;", connection);
    
          // Set the Array Size to 3. This applied to all the parameter in
          // associated with this command
          command.ArrayBindCount = 3;
          command.BindByName = true;
          // deptno parameter
          OracleParameter deptNoParam = new OracleParameter("deptno",OracleDbType.Int32);
          deptNoParam.Direction       = ParameterDirection.Input;
          deptNoParam.Value           = myArrayDeptNo;
          command.Parameters.Add(deptNoParam);
    
          // deptname parameter
          OracleParameter deptNameParam = new OracleParameter("deptname", OracleDbType.Varchar2);
          deptNameParam.Direction       = ParameterDirection.Input;
          deptNameParam.Value           = myArrayDeptName;
          command.Parameters.Add(deptNameParam);
    
          // loc parameter
          OracleParameter deptLocParam = new OracleParameter("loc", OracleDbType.Varchar2);
          deptLocParam.Direction       = ParameterDirection.Input;
          deptLocParam.Value           = myArrayDeptLoc;
          command.Parameters.Add(deptLocParam);
    
          try
          {
            connection.Open();
            command.ExecuteNonQuery();
            Console.WriteLine("{0} Rows Inserted", command.ArrayBindCount);
          }
          catch (Exception e)
          {
            Console.WriteLine("Execution Failed:" + e.Message);
          }
          finally
          {
            // connection, command used server side resource, dispose them
            // asap to conserve resource
            connection.Close();
            command.Dispose();
            connection.Dispose();
          }
        }
    
  • Call the stored procedure to support bean w / table setting dimensional bi

    Hi all, I use jdeveloper 11g

    I have a requirement where instead of calling several times a "insert into" statement rather call a stored procedure, a table shipping two-dimensional bi as a parameter.

    The table must have size [n] [4] and [0] [0] = string and others must have numbers.

    This is because users will be inserting thousands of records at a time, remote sites, so the load of sending of a should be avoided.

    Any suggestions?

    Thank you.

    Miguel,
    If you use ADFbc (VO and EO sense), you can use batch insert for this archive.
    However, he must think about the user interface and how to transfer data from the client to the server taking the place of the insert.

    How you accumulate the data to insert into the DB?
    Are able to collect you say 1000 records a time and transfer them in a single segment on the server?
    How about data validation and exception handling while inserting into the db?

    I'm sure you can use a pl/sql procedure to do the Insert, but the questions above should always be answered.

    Timo

Maybe you are looking for

  • FF does not start yesterday; running Linux Mint 14 in VirtualBox; updated to 39.03

    Since yesterday, Firefox does not start when I click the icon. There seems to be some activity, but the window never opens. I use the version of Linux Mint 14 in Virtual Box. In the terminal, I tried firefox-safe-mode I get:"Error: platform version '

  • How to merge two partitions, C and D

    Hello I HAVE A HARD DRIVE BUT ITS IN TWO SEPARATE PARTITIONS, ALL MY EXISTING FILES AND PROGRAMS ARE ON DRIVE C:\, DRIVE D:\ IS EMPTY. I WANT TO MERGE D:\ BY C:\ SO MY LAPTOP DISPLAYS ONLY A READER. HOW CAN I DO THIS WITHOUT LOSING ANYTHING ON C:\ DR

  • Tecra A3: Bluetooth information exchanger cannot transfer documents

    I have a Tecra A3 and I have already installed the Bluetooth information interchange. The problem is I want to make a copy of my cell phone, a Nokia 6230 safety, I have Windows XP and the problem is that bluetooth does not iniciate... as it says. The

  • Question of binary threshold

    I created a simple VI based on the example of binary threshold provided with Vision.  It contains a Subvi whose binary threshold is defined in an interactive way and went back and apply the binary threshold parameters to an image in the main window. 

  • Update blackBerry Z10 BB 10

    I have two questions. (1) I just got a BB z10 & did an update, it shows that it is version 10.2.1.2977 of the software OS Version 10.2.1.3247 When I low swip I noticed that I don't have bedside or location in the list mode, the alarm only allowing 1