Insert parallel use

What does that last statement?  It is as if the query is executed without any evidence.

doc Oracle:

Using the parallel execution

Examples of parallelization of Distributed Transaction

This section contains several examples of distributed transaction processing.

Example 1 Distributed Transaction parallelization

In this example, the DML queries a remote object:

INSERT /* APPEND PARALLEL (t3,2) */ INTO t3 SELECT * FROM t4@dblink;  

The query operation is executed serially without notification, because it refers to a remote object.

UPDATE: this comment is nonsense - see more of the two comments.

I think the manual is misleading.

The Insert CAN run in parallel and can be more effective for parallel execution, since two slaves PX can write to disk twice as quickly in one sitting, notwithstanding the fact that the QC distribute data to the PXs. The select statement must serialize the data link-, but the query sent to the remote database could still be parallel to the remote database.

Here's some output showing the insert might do are parallel, in the way (10.2.0.4 rather than manual 9.2.0.x referenced the OP):

SQL > insert / * + append parallel (t2, 2) * / into t2 select * from t1;

66312 lines were created.

SQL > start pq_tqstat;

DFO_NUMBER TQ_ID SERVER_TYPE INSTANCE PROCESS NUM_ROWS BYTES EXPECTED DELAYS AVG_LATENCY
---------- ---------- --------------- -------- --------------- ---------- ---------- ---------- ---------- -----------
1 0 1 QC 66312 6548488 producer 0 0 0
Consumption 1 P000 33156 3274244 54 51 0
1 P001 33156 3274244 53 50 0

1 producer P000 1 107 1379 618 1 0
1311 107 1 614 P001 1 0
Consumption 1 QC 2 214 16 4 0

6 selected lines.

The pq_tqstat script is just a call for formatting of v$ pq_tqstat - parallel work. Notebook of the Oracle

Concerning

Jonathan Lewis

Tags: Database

Similar Questions

  • How much will be / * + PARALLEL * / use?

    Hello

    I've always used / * + PARALLEL (tablename, degree) * / but I recently saw a query using just / * + PARALLEL * /.

    How much will be / * + PARALLEL * /. use? the degree with which the table is created? If Yes, what happens if the table is created without any parallelism.

    I tried to search the Internet but no conclusive answer, so approaching again the expert forum is not found.

    I've always used / * + PARALLEL (tablename, degree) * / but I recently saw a query using just / * + PARALLEL * /.

    How much will be / * + PARALLEL * /. use? the degree with which the table is created? If Yes, what happens if the table is created without any parallelism.

    I tried to search the Internet but no conclusive answer, so approaching again the expert forum is not found.

    Interesting - I searched using "parallel index of oracle 11 g" and this was the FIRST link

    http://docs.Oracle.com/CD/E11882_01/server.112/e25523/parallel002.htm

    Then I searched the page for "parallel" and find section 19.1.2.7 tips for parallel execution which was State

    You can specify the parallelism at the level of the object or statement. If you do not explicitly specify an object in the indicator, then parallelism occurs at the level of instruction.

    Then, this article explains the difference between the EDUCATIONAL level and OBJECT level parallelism and includes a code example.

    And article 3 of the code example shows this:

    3 run the following SELECT statement:

    SELECT / * + PARALLEL (4) * / hr_emp.last_name, d.department_name
    Hr_emp, departments d employees
    WHERE the hr_emp.department_id = d.department_id;
    Because there is no schema object specified in the PARALLEL indication, the scope of the indicator is education, not an object. This statement requires the request of employees and departments to run with a degree of parallelism to 4, tables substituting defined on tables parallelism setting.

    All this took less than 5 minutes and EXACTLY answer your question!

    The documentation is your friend.

    I suggest that a break of Oracle and research of tutorials on the internet about how to search the Internet. Until you learn how to search effectively on the internet, you will continue to have problems, find answers.

  • Insert / * + parallel * / performance index

    Insert / * + parallel * / performance index

    Hello

    I performed the procedure below

    CREATE OR REPLACE PROCEDURE bulk_collect

    IS

    SID TYPE TABLE IS NUMBER;

    Screated_date TYPE IS an ARRAY OF DATE;

    Slookup_id TYPE TABLE IS NUMBER;

    Surlabasedesdonneesdufabricantduballast ARRAY TYPE IS VARCHAR2 (50);

    l_sid sid;

    l_screated_date screated_date;

    l_slookup_id slookup_id;

    l_sdata surlabasedesdonneesdufabricantduballast;

    l_start NUMBER;

    BEGIN

    l_start: = DBMS_UTILITY.get_time;

    SELECT id, created_date, lookup_id, data

    BULK COLLECT INTO l_sid, l_screated_date, l_slookup_id, l_sdata

    FROM big_table;

    -dbms_output.put_line (' after collection in bulk: ' | systimestamp);

    FORALL indx IN l_sid. FIRST... l_sid. LAST

    INSERT / * + parallel (big_table2, 2) * / INTO big_table2 values (l_sid (indx), l_screated_date (indx), l_slookup_id (indx), l_sdata (indx));

    -dbms_output.put_line (' after FORALL: ' | systimestamp);

    COMMIT;

    Dbms_output.put_line ('Total elapsed:-' |) (DBMS_UTILITY.get_time - l_start) | "hsecs");

    END;

    /

    DISPLAY ERRORS;

    I want to confirm if the query is running in parallel. I checked the tables below to confirm if the insert statement is run in parallel, but none of them returns all the rows.

    Select * from V$ PX_SESSION where sid = 768

    Select * from V$ PX_SESSTAT

    Select * from V$ PX_PROCESS

    Select * from V$ PX_PROCESS_SYSSTAT

    Select * from V$ PQ_SESSTAT

    Please may I know how to find out the parallel execution of / * + parallel (table_name, 2) * / reference

    Thank you

    I'd go for the SQL insert/selection option as suggested.

    Bulk insert is the APPEND_VALUES of 11r2 trick that will lead to a direct path load. Parallel is to directly load path, but if you are bench marking may include this as an additional test.

  • RESTful service cannot insert data using PL/SQL.

    Hi all
    Spin: stand-alone 2.01 AL on OEL 4.8 in box a. VM
    Database Oracle 10.2.0.4 with Apex 4.2.0.00.27 on OEL4.8 in the VM B box.

    Measure of oracle.example.hr performed without problem Restful services.

    Cannot insert data using AL 2.0.1 but works on 1.1.4 AL.
    who uses the following table (under scheme: scott):
     
    create table json_demo ( title varchar2(20), description varchar2(1000) ); 
    grant all on json_demo to apex_public_user; 
    and procedure (scott diagram) below:
    CREATE OR REPLACE
    PROCEDURE post(
        p_url     IN VARCHAR2,
        p_message IN VARCHAR2,
        p_response OUT VARCHAR2)
    IS
      l_end_loop BOOLEAN := false;
      l_http_req utl_http.req;
      l_http_resp utl_http.resp;
      l_buffer CLOB;
      l_data       VARCHAR2(20000);  
      C_USER_AGENT CONSTANT VARCHAR2(4000) := 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
    BEGIN
      -- source: http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
      -- Ask UTL_HTTP not to raise an exception for 4xx and 5xx status codes,
      -- rather than just returning the text of the error page.
      utl_http.set_response_error_check(false);
      -- Begin the post request
      l_http_req := utl_http.begin_request (p_url, 'POST', utl_http.HTTP_VERSION_1_1);
      -- Set the HTTP request headers
      utl_http.set_header(l_http_req, 'User-Agent', C_USER_AGENT);
      utl_http.set_header(l_http_req, 'content-type', 'application/json;charset=UTF-8');
      utl_http.set_header(l_http_req, 'content-length', LENGTH(p_message));
      -- Write the data to the body of the HTTP request
      utl_http.write_text(l_http_req, p_message);
      -- Process the request and get the response.
      l_http_resp := utl_http.get_response (l_http_req);
      dbms_output.put_line ('status code: ' || l_http_resp.status_code);
      dbms_output.put_line ('reason phrase: ' || l_http_resp.reason_phrase);
      LOOP
        EXIT
      WHEN l_end_loop;
        BEGIN
          utl_http.read_line(l_http_resp, l_buffer, true);
          IF(l_buffer IS NOT NULL AND (LENGTH(l_buffer)>0)) THEN
            l_data    := l_data||l_buffer;
          END IF;
        EXCEPTION
        WHEN utl_http.end_of_body THEN
          l_end_loop := true;
        END;
      END LOOP;
      dbms_output.put_line(l_data);
      p_response:= l_data;
      -- Look for client-side error and report it.
      IF (l_http_resp.status_code >= 400) AND (l_http_resp.status_code <= 499) THEN
        dbms_output.put_line('Check the URL.');
        utl_http.end_response(l_http_resp);
        -- Look for server-side error and report it.
      elsif (l_http_resp.status_code >= 500) AND (l_http_resp.status_code <= 599) THEN
        dbms_output.put_line('Check if the Web site is up.');
        utl_http.end_response(l_http_resp);
        RETURN;
      END IF;
      utl_http.end_response (l_http_resp);
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line (sqlerrm);
      raise;
    END;
    and execution in sqldeveloper 3.2.20.09 when it connects directly to box B as scott:
     
    SET serveroutput ON
    DECLARE
      l_url      VARCHAR2(200)   :='http://MY_IP:8585/apex/demo';
      l_json     VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
      l_response VARCHAR2(30000);
    BEGIN
      post( p_url => l_url, p_message =>l_json, p_response => l_response);
    END;
    leading to:
     
    anonymous block completed 
    status code: 200
    reason phrase: OK 
    with data inserted. 
    Installation using 2.0.1
       Workspace : wsdemo
     RESTful Service Module:  demo/
              URI Template:      test
                    Method:  POST
               Source Type:  PL/SQL
    and execution in sqldeveloper 3.2.20.09 when it connects directly to box B as scott:
     
    SET serveroutput ON
    DECLARE
      l_url      VARCHAR2(200)   :='http://MY_IP:8585//apex/wsdemo/demo/test';
      l_json     VARCHAR2(20000) := '{"title":"thetitle","description":"thedescription"}';
      l_response VARCHAR2(30000);
    BEGIN
      post( p_url => l_url, p_message =>l_json, p_response => l_response);
    END;
    leading to:
     
    status code: 500 
    reason phrase: Internal Server Error 
    
    Listener's log: 
    Request Path passes syntax validation
    Mapping request to database pool: PoolMap [_poolName=apex, _regex=null, _workspaceIdentifier=WSDEMO, _failed=false, _lastUpdate=1364313600000, _template=/wsdemo/, _type=BASE_PATH]
    Applied database connection info
    Attempting to process with PL/SQL Gateway
    Not processed as PL/SQL Gateway request
    Attempting to process as a RESTful Service
    demo/test matches: demo/test score: 0
    Choosing: oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as current candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true]
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    Tenant Principal already established, cannot dispatch
    Chose oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher as the final candidate with score: Score [handle=JDBCURITemplate [scopeId=null, templateId=2648625079503782|2797815111031405, uriTemplate=demo/test], score=0, scope=SecurityConfig [constraint=none, realm=NONE, logonConfig=LogonConfig [logonForm=null, logonFailed=null]], originsAllowed=[], corsEnabled=true] for: POST demo/test
    demo/test is a public resource
    Using generator: oracle.dbtools.rt.plsql.AnonymousBlockGenerator
    Performing JDBC request as: SCOTT
    Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
    INFO: Error occurred during execution of: [CALL, begin
     insert into scott.json_demo values(/*in:title*/?,/*in:description*/?);
    end;, [title, in, class oracle.dbtools.common.stmt.UnknownParameterType], [description, in, class oracle.dbtools.common.stmt.UnknownParameterType]]with values: [thetitle, thedescription]
    Mar 28, 2013 1:29:28 PM oracle.dbtools.common.jdbc.JDBCCallImpl execute
    INFO: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    
    java.sql.SQLException: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
            at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
            at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
            at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
            at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
            at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
            at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
            at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
            at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
            at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:242)
            at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124)
            at oracle.ucp.jdbc.proxy.CallableStatementProxyFactory.invoke(CallableStatementProxyFactory.java:101)
            at $Proxy46.execute(Unknown Source)
            at oracle.dbtools.common.jdbc.JDBCCallImpl.execute(JDBCCallImpl.java:44)
            at oracle.dbtools.rt.plsql.AnonymousBlockGenerator.generate(AnonymousBlockGenerator.java:176)
            at oracle.dbtools.rt.resource.templates.v2.ResourceTemplatesDispatcher$HttpResourceGenerator.response(ResourceTemplatesDispatcher.java:309)
            at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:88)
            at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:412)
            at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:162)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.doFilter(ServletAdapter.java:1059)
            at com.sun.grizzly.http.servlet.ServletAdapter$FilterChainImpl.invokeFilterChain(ServletAdapter.java:999)
            at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:434)
            at oracle.dbtools.standalone.SecureServletAdapter.doService(SecureServletAdapter.java:65)
            at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:379)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:196)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
            at java.lang.Thread.run(Thread.java:662)
    Error during evaluation of resource template: ORA-06550: line 1, column 6:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare exit for goto if loop mod null pragma
       raise return select update while with <an identifier>
       <a double-quoted delimited-identifier> <a bind variable> <<
       close current delete fetch lock insert open rollback
       savepoint set sql execute commit forall merge pipe
    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
       begin case declare end exception exit for goto if loop mod
       null pragma raise return select update while with
       <an identifier> <a double-quoted delimited-id
    Please notify.
    Concerning
    Zack

    Zack.L wrote:
    Hi Andy,.

    Sorry, I forgot to post the Source that is used by the AL1.1.4 and the AL2.0.1.

    Source

    begin
    insert into scott.json_demo values(:title,:description);
    end;
    

    It is a failure during insertion?
    Yes, he failed in the insert using AL2.0.1.

    If the above statement produces the following error message:

    The symbol "" was ignored.
    ORA-06550: line 2, column 74:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
     
    

    That gives me to think that a character is not printable (notice how there is anything between the quotation marks - "") worked his way in your PL/SQL Manager. Note how the error is reported to correspond to a column 74 on line 2, line 2 of the block above has 58 characters, so a pure assumption somehow, there is extra space on line 2, which confuses the PL/SQL compiler, I suggest retype PL/SQL Manager manually and see if that solves the problem.

  • Generate the insert statement using columns in view all_tab_cols

    I am trying to generate a dynamic insert statement using the columns of a table in the all_tab_cols view. If I do a select, I get the result as lines. How to convert the row of the columns so that I get something like this:
     INSERT INTO TABLE_NAME (COL1, COL2, COL3,COL4.....) 
    .

    Any help will be appreciated!

    This can give you a tip.

    SQL> ed
    Wrote file afiedt.buf
    
      1  with tab_col
      2  as
      3  (
      4  select i.table_name,
      5         column_name,
      6         row_number() over(partition by i.table_name order by table_name) rno
      7    from user_tab_cols i
      8  )
      9  select 'INSERT INTO '||table_name||' ('||ltrim(sys_connect_by_path(column_name, ','), ',')||')
     10    from tab_col
     11   where connect_by_isleaf = 1
     12   start with rno = 1
     13  connect by rno = prior rno+1
     14     and table_name = prior table_name
     15* and rownum<4
    SQL> /
    
    SQL_STATEMENT
    --------------------------------------------------------------------------------
    INSERT INTO A (MAKER,TYPE)
    INSERT INTO ADAM_TEST (ACCT,CODE)
    INSERT INTO AREA_TBL (AREA_ID,ORG_ID,CLUSTER_ID)
    INSERT INTO B (MAKER)
    INSERT INTO BONUS (ENAME)
    INSERT INTO CLUSTER_TBL (CLUSTER_ID)
    INSERT INTO COMPANY (MANUFACTURER)
    INSERT INTO COUNTRIES (COUNTRY_ID)
    
  • Advance access insert data using ViewObjects

    Hello

    I'm trying to access the data before insertion (before execution of super.doCommit ()) using viewobjects, but I only get the validated data. Is it possible to get before inserting data using viewobjects?

    The following Java code:

    String amDef = "oracle.srdemo.model.AppModule";
    Config = "AppModuleLocal";
    Am = ApplicationModule
    Configuration.createRootApplicationModule (amDef, config);
    ViewObject vo = am.findViewObject("DatetestView1");
    System.out.println ("query will return" + vo.getEstimatedRowCount () + "lines...");
    vo.executeQuery ();
    While (vo.hasNext ()) {}
    Line curPerson = vo.next ();
    System.out.println (VO.getCurrentRowIndex () +'.) "+
    "curPerson.getAttribute ("Id") + ' ' + '.
    curPerson.getAttribute ("Dataini"));
    }
    Configuration.releaseRootApplicationModule (am, true);

    I use JDeveloper 11g, a Web of Fusion and ADF business components Application

    Thanks in advance.

    You can only get data uncommitted in the session where you inserted or changed.
    If you use createRoorApplicationModule(), you always get a new session (server side), therefore, you do not see the data not validated.

    Timo

  • find the most recent record inserted by using rowid

    Yes, I suspect that it is a bad idea!

    I work with an application that has been modelled incorrectly. a historical table of the status had been modeled with a primary key on a key of the company and the entry into force instead of the date of the end of the recording of the State. There is one status as possible at the same time.

    logic has been developed to insert new records of status with the dates of null terminator and then a trigger was provided that populated end dates except the one with the MAX (ROWID). so the hope is that ROWID will always get bigger.

    now, the database has been moved in environments of promotion using data pump. in our development environments, it always seems to work. but not in promotional customers environments.

    My question is: is there a setting associated with data pump that the client has used that does not respect the ROWID as it has in our development environment?

    I'm trying to determine if there is a way to continue to use the old code without immediately re-development.

    Thanks in advance for your comments.

    so the hope is that ROWID will always get bigger.

    It is an expectation that has no guarantee of being correct. He has a very good chance that a new line will have a lower value of the ROWID.

    My question is: is there a setting associated with data pump that the client has used that does not respect the ROWID as it has in our development environment?

    There is not this setting. Data pump just inserts rows into a table. Because we cannot guarantee that the next row will have a higher ROWID, then what you are looking for there is no.

    It is time to rethink this misguided approach.

    See you soon,.
    Brian

  • Insert pictures using the registers as a parameter

    Hello

    I need to insert data into the table that my procedure will be called via JAVA.

    No Java so wonder if it is possible to take a JAVA object (which is the records outside PLSQL) as input and then insert it into the tables.

    Here's the DDL for tables

    create table gnv_sol_attributes)

    so_id varchar2 (20).

    se_integration_id varchar2 (20).

    ParameterName varchar2 (100),

    action_code varchar2 (20).

    parameter_value VARCHAR2 (255)

    );

    create table

    () gnv_sol_serviceelement

    customer_ref varchar2 (20).

    billing_account_code varchar2 (20).

    so_id varchar2 (20).

    so_type varchar2 (5).

    se_integration_id varchar2 (20).

    se_root_integration_id varchar2 (20).

    se_parent_integration_id varchar2 (20).

    offer_id varchar2 (75).

    offer_id_old varchar2 (75).

    pricing_id varchar2 (75).

    promo_id varchar2 (20).

    action_code varchar2 (20).

    REASON_ID varchar2 (100),

    product_code varchar2 (40),

    date of product_subsc_date,

    date of product_start_date,

    date of product_modify_date,

    date of product_end_date,

    event_source varchar2 (40),

    sales_force_code varchar2 (20).

    line_number varchar2 (20).

    product_status varchar2 (2)

    );

    So there in the table of gnv_sol_attributes for different simple so_id and se_integration_id parameter_name.

    Here they explain as in a record we can and then insert it another folder (look like multidimensional collection).

    Sample data for the table of gnv_sol_serviceelemen

    CUSTOMER_REF,BILLING_ACCOUNT_CODE,SO_ID,SO_TYPE,SE_INTEGRATION_ID,SE_ROOT_INTEGRATION_ID,SE_PARENT_INTEGRATION_ID,OFFER_ID,OFFER_ID_OLD,PRICING_ID,PROMO_ID,ACTION_CODE,REASON_ID,PRODUCT_CODE,PRODUCT_SUBSC_DATE,PRODUCT_START_DATE,PRODUCT_MODIFY_DATE,PRODUCT_END_DATE,EVENT_SOURCE,SALES_FORCE_CODE,LINE_NUMBER,PRODUCT_STATUS

    C_1, BA_1, SO_1, OT_1, SE_1, SE_1, SE_1, STDE_A8, STDE_A8_FEE_AE, add, STDE_A8, 7/13/2015,7/13/2015, 1.

    C_1, BA_1, SO_1, OT_1, SE_2, SE_1, SE_1, STDE_A8, STDE_MA, add, STDE_MA, 7/14/2015,7/14/2015, 2,

    C_1, BA_1, SO_1, OT_1, SE_3, SE_1, SE_1, STDE_A8, STDE_WIFI, add, STDE_WIFI, 7/15/2015,7/15/2015, 3,.

    C_1, BA_1, SO_1, OT_1, SE_4, SE_1, SE_1, STDE_A8, STDE_BCK_M_FEE_AE, add, STDE_BCK_M, 7/16/2015,7/16/2015, 4,.

    C_1, BA_1, SO_1, OT_1, SE_5, SE_1, SE_1, STDE_A8, SBRI_1_FEE_AE, add, SBRI_1, 7/17/2015,7/17/2015, 5.

    C_1, BA_1, SO_1, OT_1, SE_6, SE_1, SE_1, STDE_A8, SBRI_6_FEE_AE, add, SBRI_4, 7/18/2015,7/18/2015, 6,.

    C_1, BA_1, SO_1, OT_1, SE_7, SE_1, SE_1, STDE_A8, SPUN_6_FEE_AE, add, SPUN_6, 7/19/2015,7/19/2015, 7,.

    C_1, BA_1, SO_1, OT_1, SE_8, SE_1, SE_7, STDE_A8, SPUN_AV_6, add, SPUN_AV_6, 7/20/2015,7/20/2015, 8.

    C_1, BA_1, SO_1, OT_1, SE_9, SE_1, SE_7, STDE_A8, SPUN_AF_6, add, SPUN_AF_6, 7/21/2015,7/21/2015, 9,.

    C_1, BA_1, SO_1, OT_1, SE_10, SE_1, SE_7, STDE_A8, SPUN_ARS_6, add, SPUN_ARS_6, 7/22/2015,7/22/2015, 10.

    C_1, BA_1, SO_1, OT_1, SE_11, SE_1, SE_1, STDE_A8, SCOE_VOIP_CEIP_3_FEE_AE, add, SCOE_VOIP_CEIP_3, 7/23/2015,7/23/2015, 11.

    sample data for gnv_sol_attributes

    PARAMETER_VALUE, PARAMETER_NAME, SO_ID, ACTION_CODE, SE_INTEGRATION_ID

    1, SO_1 SE_1, PCT? (Without), adding,?

    2, SO_1 SE_1, the PCT FEE, add, 110.

    3, SO_1 SE_1, AE PCT, add, 212.

    4, SO_1 SE_1, AE + TAX PCT, add, 218.

    5, SO_1 SE_1, STRONGHOLD of BOO, add, YES,

    6, SO_1 SE_1, AE BOO, add, YES,

    7, SO_1 SE_1, AE + TAX BOO, add, YES,

    8, SO_1 SE_1, hierarchy ID, Add,

    9, SO_1 SE_1, hierarchy Add subscription ID,

    10, SO_1, SE_1, ID Add parent hierarchy,

    11, SO_1, SE_1, date of the subscription, add-on, 31/07/2015,

    12, SO_1, SE_1, filling start date, Add, 31/07/2015.

    13, SO_1, SE_1, beginning of billing to update, add, 31/07/2015.

    14, SO_1, SE_1, (address), add,

    15, SO_1, SE_1, download Bandwidth, add, 20480.

    16, SO_1, SE_1, download bandwidth, add-on, 1024,

    I created this procedure and it's successfully insert one line in the table of bith.

    create or replace procedure ins_svc (p_svc IN SVC_REC, p_svc_att IN SVC_ATTR_REC)

    is

    Start

    insert into gnv_sol_serviceelement (p_svc.customer_ref, p_svc.billing_account_code, p_svc.so_id, p_svc.so_type values

    p_svc.se_integration_id, p_svc.se_root_integration_id, p_svc.se_parent_integration_id

    p_svc.offer_id, p_svc.offer_id_old, p_svc.pricing_id, p_svc.promo_id, p_svc.action_code

    p_svc.reason_id, p_svc.product_code, p_svc.product_subsc_date, p_svc.product_start_date

    p_svc.product_modify_date, p_svc.product_end_date, p_svc.event_source

    p_svc.sales_force_code, p_svc.line_number, p_svc.product_status);

    insert into GNV_SOL_ATTRIBUTES (p_svc_att.so_id, p_svc_att.se_integration_id, p_svc_att.parameter_name values

    (p_svc_att.action_code, p_svc_att.parameter_value);

    exception

    while others then

    dbms_output.put_line (' error code ' |') '|| SQLCODE. » '||' The error '. SQLERRM);

    end;

    Now that JAVA person asking me if there is a way in which I insert one line in the gnv_sol_serviceelemen table

    and several lines in the gnv_sol_attributes because there is in the table of attributes different parameter value for the same so_id and SE_INTEGRATION_ID.

    This is where I got stuck.

    If anyone has a wayout.

    DATABASE VERSION: -.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    You can create an API like this

    SQL> create or replace package gnv_sol_api
      2  as
      3    type gnv_sol_attributes_tbl is table of gnv_sol_attributes%rowtype index by pls_integer;
      4
      5    procedure gnv_sol_insert(par1 gnv_sol_serviceelement%rowtype, par2 gnv_sol_attributes_tbl);
      6  end;
      7  /
    
    Package created.
    
    SQL> create or replace package body gnv_sol_api
      2  as
      3    procedure gnv_sol_insert(par1 gnv_sol_serviceelement%rowtype, par2 gnv_sol_attributes_tbl)
      4    is
      5    begin
      6      insert into gnv_sol_serviceelement values par1;
      7      forall i in 1..par2.count
      8          insert into gnv_sol_attributes values par2(i);
      9    end;
     10  end;
     11  /
    
    Package body created.
    

    I used the anonymous PL/SQL block as a customer to call this API. For you, it would be Java.

    SQL> declare
      2    var1 gnv_sol_serviceelement%rowtype;
      3    var2 gnv_sol_api.gnv_sol_attributes_tbl;
      4  begin
      5    var1.customer_ref              := 'C_1';
      6    var1.billing_account_code      := 'BA_1';
      7    var1.so_id                     := 'SO_1';
      8    var1.so_type                   := 'OT_1';
      9    var1.se_integration_id         := 'SE_1';
     10    var1.se_root_integration_id    := 'SE_1';
     11    var1.se_parent_integration_id  := 'SE_1';
     12    var1.offer_id                  := 'STDE_A8';
     13    var1.offer_id_old              := null;
     14    var1.pricing_id                := 'STDE_A8_FEE_AE';
     15    var1.promo_id                  := null;
     16    var1.action_code               := 'Add';
     17    var1.reason_id                 := null;
     18    var1.product_code              := 'STDE_A8';
     19    var1.product_subsc_date        := to_date('7/13/2015','mm/dd/yyyy');
     20    var1.product_start_date        := to_date('7/13/2015', 'mm/dd/yyyy');
     21    var1.product_modify_date       := null;
     22    var1.product_end_date          := null;
     23    var1.event_source              := null;
     24    var1.sales_force_code          := '1';
     25    var1.line_number               := null;
     26
     27    var2(1).so_id                  := 1;
     28    var2(1).se_integration_id      := 'SO_1';
     29    var2(1).parameter_name         := 'SE_1';
     30    var2(1).action_code            := 'PCT? (Without)';
     31    var2(1).parameter_value        := 'Add';
     32
     33    var2(2).so_id                  := 2;
     34    var2(2).se_integration_id      := 'SO_1';
     35    var2(2).parameter_name         := 'SE_1';
     36    var2(2).action_code            := 'FEE PCT';
     37    var2(2).parameter_value        := 'Add';
     38
     39    var2(3).so_id                  := 3;
     40    var2(3).se_integration_id      := 'SO_1';
     41    var2(3).parameter_name         := 'SE_1';
     42    var2(3).action_code            := 'AE PCT';
     43    var2(3).parameter_value        := 'Add';
     44
     45    var2(4).so_id                  := 4;
     46    var2(4).se_integration_id      := 'SO_1';
     47    var2(4).parameter_name         := 'SE_1';
     48    var2(4).action_code            := 'AE+FEE PCT';
     49    var2(4).parameter_value        := 'Add';
     50
     51    gnv_sol_api.gnv_sol_insert(var1, var2);
     52  end;
     53  /
    
    PL/SQL procedure successfully completed.
    

    output

    SQL> select * from gnv_sol_serviceelement;
    
    CUSTOMER_REF    BILLING_ACCOUNT SO_ID           SO_TYPE         SE_INTEGRATION_ SE_ROOT_INTEGRA SE_PARENT_INTEG OFFER_ID        OFFER_ID_OLD    PRICING_ID      PROMO_ID        ACTION_CODE     REASON_ID       PRODUCT_CODE    PRODUCT_SUBSC_D PRODUCT_START_D PRODUCT_MODIFY_ PRODUCT_END_DAT EVENT_SOURCE    SALES_FORCE_COD LINE_NUMBER     PRODUCT_STATUS
    --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- --------------- ---------------
    C_1             BA_1            SO_1            OT_1            SE_1            SE_1            SE_1            STDE_A8                         STDE_A8_FEE_AE                  Add                             STDE_A8         13-JUL-15       13-JUL-15                                                       1                               
    
    SQL> select * from gnv_sol_attributes;
    
    SO_ID           SE_INTEGRATION_ PARAMETER_NAME       ACTION_CODE     PARAMETER_VALUE
    --------------- --------------- -------------------- --------------- --------------------
    1               SO_1            SE_1                 PCT? (Without)  Add
    2               SO_1            SE_1                 FEE PCT         Add
    3               SO_1            SE_1                 AE PCT          Add
    4               SO_1            SE_1                 AE+FEE PCT      Add
    
  • Updates instead of inserts by using getNavigatableRowIterator () .createRow (); Concurrent users?

    Hello

    Summary

    My application only occasionally an update on an existing line, rather than create a new line.  Seems to occur when several people create new lines.

    Details

    My application creates a new line by making a PopupFetchListener create a record.  The popup gets 3 user input fields.  By clicking on OK validates the data.  But sometimes the app by mistake updates an existing line with 3 field entries, rather than create a new line.

    We call cela error "crush."  We believe that this occurs when 2 or more users create lines at the same time (but we're not sure).  Behind the pop-up window, we see the ADF table with the lines.  He opens a line and creates a new record with the key field with the value "-1".  It is the default value that we give to the view object.  If three users create a new line, sometimes two of the user see the-1.  The other user does not see a new slot open.  Instead, the focus is always on a line that exists.  This poor third user gets error crush.  We can only reproduce this problem sometimes.  Any ideas?  Here are more details.

    Setting the primary key of the Entity object

    < attribute name = 'AiId' IsNotNull = "true" ColumnName = "AI_ID', SQLType = 'DIGITAL' Type ="java.lang.Integer"

    ColumnType = 'NUMBER', TableName = 'GA_AIM"PrimaryKey ="true", DefaultValue ="-1"RetrievedOnInsert ="true ".

    RetrievedOnUpdate = "true" IsUpdateable = "while_insert" >

    < DesignTime >

    < name Attr = "_diagramName" Value = "Id" / >

    < / DesignTime >

    Properties of <>

    < SchemaBasedProperties >

    < value DISPLAYWIDTH = "60" / >

    < ResId LABEL = 'model. Entity.GaAim.AiId_LABEL"/ >

    < / SchemaBasedProperties >

    < / properties >

    < / attribute >

    Database trigger

    The Insert Before, gets a sequence counter and replaces the value "-1".

    Code FetchPopupListener

    DCBindingContainer bindings1 = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding dcib = (DCIteratorBinding) bindings1.get (iteratorName);

    RowSetIterator iter = dcib.getRowSetIterator ();

    NewRow row = dcib.getNavigatableRowIterator () .createRow ();

    newRow.setNewRowState (Row.STATUS_INITIALIZED);

    Code of the button 'OK '.

    BindingContainer links = getBindings();

    operationBinding oracle.binding.OperationBinding = bindings.getOperationBinding ("Commit");

    Object result = operationBinding.execute ();

    Environment

    JDev Studio Edition Version 11.1.2.4.0

    WebLogic 10.3.5 on Linux

    ADF BC

    Also tried

    Unchecking 'Required' attribute AiId Pavilion in the E.O. and hide the - 1 as a default value.  It is under the theory that the middle tier strives to ensure the uniqueness of the primary key, and two concurrent users had '-1 '.  It has not solved the problem.

    Your assumption that you get this problem if multiple users create new tires is correct. The problem is that you have defined the pharmacokinetics of new line - 1 for each line. This will get you in trouble.

    You must either use the DBSequence as type for your pk (http://docs.oracle.com/middleware/1212/adf/ADFFD/bcentities.htm#ADFFD19777), or you must assign the pk directly when the line is created (for example using groovy https://tompeez.wordpress.com/2011/09/02/using-groovy-expression-to-set-a-primary-key-with-a-sequence-number/).

    Timo

  • inserting rows using pl sql

    Hi all

    I created a tabale to insert a number

    create the table loc_number (c1 number);

    now, I want to insert 10 lines in this table using pl sql.

    How can I do so using pl sql?

    Hello

    Yes it is possible.

    Why use loops here?

    (I guess, you need to practice this goal)

    begin
    
     for i in 1..10
     loop
    
       insert into loc_number
           values (i);
    
     end loop;
    
     commit;
    
    end;
    
  • Insert by using the loop

    Hi all
    Take into consideration the following:

    CREATE TABLE  XX_SEG
      (
        SEGMENT3 VARCHAR2(20),
        SEGMENT4 VARCHAR2(20 )
      )
    CREATE TABLE XX_SEG3
      (
        SEG3 VARCHAR2(20)
      )
    CREATE TABLE XX_SEG4
      (
        SEG4 VARCHAR2(20)
      )
    Insert into xx_seg3 (SEG3) values ('0000');
    Insert into xx_seg3 (SEG3) values ('0001');
    Insert into xx_seg3 (SEG3) values ('0002');
    Insert into xx_seg3 (SEG3) values ('0003');
    Insert into xx_seg3 (SEG3) values ('0004');
    Insert into xx_seg3 (SEG3) values ('0005');
    Insert into xx_seg3 (SEG3) values ('0008');
    Insert into xx_seg3 (SEG3) values ('0015');
    Insert into xx_seg3 (SEG3) values ('0017');
    Insert into xx_seg3 (SEG3) values ('0100');
    Insert into xx_seg3 (SEG3) values ('0101');
    Insert into xx_seg3 (SEG3) values ('0121');
    Insert into xx_seg3 (SEG3) values ('0141');
    Insert into xx_seg3 (SEG3) values ('0142');
    
    
    
    Insert into xx_seg4 (SEG4) values ('1000');
    Insert into xx_seg4 (SEG4) values ('1004');
    Insert into xx_seg4 (SEG4) values ('1306');
    Insert into xx_seg4 (SEG4) values ('1308');
    Insert into xx_seg4 (SEG4) values ('1309');
    Insert into xx_seg4 (SEG4) values ('1310');
    Insert into xx_seg4 (SEG4) values ('1312');
    Insert into xx_seg4 (SEG4) values ('1321');
    Insert into xx_seg4 (SEG4) values ('1400');
    Insert into xx_seg4 (SEG4) values ('1407');
    Insert into xx_seg4 (SEG4) values ('1500');
    Insert into xx_seg4 (SEG4) values ('1600');
    Insert into xx_seg4 (SEG4) values ('1801');
    Insert into xx_seg4 (SEG4) values ('1803');
    INSERT INTO XX_SEG4 (SEG4) VALUES ('1806');
    Insert into xx_seg4 (SEG4) values ('1807');
    The question is: for each seg3 I want to insert all the values for seg4 in the xx_seg table.

    I try the following:
    DECLARE 
    
    BEGIN 
      FOR I IN (SELECT SEG3 FROM XX_SEG3)LOOP
        FOR I2 IN (SELECT seg4 FROM X_SEG4)LOOP
          INSERT INTO XX_SEG  
            values (i.seg3,i2.seg4);  
        end loop;   
      end loop;
    end;
    but I got the error:
    ORA-06550: line 5, column 33:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 5, column 16:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 7, column 24:
    PLS-00364: loop index variable 'I2' use is invalid
    ORA-06550: line 7, column 27:
    PL/SQL: ORA-00984: column not allowed here
    ORA-06550: line 6, column 7:
    Any ideas?
    Version: 11g


    Thanks in advance,
    Bahchevanov.

    OF X_SEG4 => OF XX_SEG4

  • Insert by using question FORALL

    Hi all, I'm trying to insert many rows using batch - FORALL mode... But when I run the following:

    declare 
    cursor C1 is select
               GL_CODE_COMBINATIONS_S.NEXTVAL
              ,ACCOUNT_TYPE
              ,s1,s2,s3,s4,s5,s6,s7 from XX_CC_SEGMENTS;
    type T_C1 is table of C1%ROWTYPE;
    rec1 t_c1;
    
    begin
    open C1;
    LOOP
      FETCH C1 bulk collect into REC1;
        FORALL I in REC1.first..REC1.last
          insert into XX_GL_CC  values(REC1(I));
    exit when c1%notfound;
    end LOOP;
    close c1;
    end;
    I received the error message:
    ORA-06550: line 14, column 19:
    PL/SQL: ORA-00947: not enough values
    As I am new with BULK COLLECT & FORALL, I guess I can't refer to "REC1" like that. Any ideas what to change?

    Thanks in advance,
    Bahchevanov.

    1. you don't need the LOOP. COLLECTION in BULK retrieves all THE rows in one shot.
    2. because REC1 (I) is a record, you MUST NOT use parenthesis in the VALUES clause:

    SQL> declare
      2  cursor C1 is select
      3             * from emp;
      4  type T_C1 is table of C1%ROWTYPE;
      5  rec1 t_c1;
      6
      7  begin
      8  open C1;
      9    FETCH C1 bulk collect into REC1;
     10  close c1;
     11      FORALL I in REC1.first..REC1.last
     12        insert into emp1 values(REC1(I));
     13  end;
     14  /
          insert into emp1 values(REC1(I));
                      *
    ERROR at line 12:
    ORA-06550: line 12, column 19:
    PL/SQL: ORA-00947: not enough values
    ORA-06550: line 12, column 7:
    PL/SQL: SQL Statement ignored
    
    SQL> declare
      2  cursor C1 is select
      3             * from emp;
      4  type T_C1 is table of C1%ROWTYPE;
      5  rec1 t_c1;
      6
      7  begin
      8  open C1;
      9    FETCH C1 bulk collect into REC1;
     10  close c1;
     11      FORALL I in REC1.first..REC1.last
     12        insert into emp1 values REC1(I);
     13  end;
     14  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • Insert twice using unique sql

    Hello
    I want to reach
    1 insert into t1 select col1, 'a', col2 from t2;
    2. Insert in 'b', t1 select col1, col2 from t2;

    using a single sql.

    Thank you...

    One may wonder, "why?"

    insert into t1
    select col1, 'a', col2 from t2
    union
    select col1, 'b', col2 from t2;
    

    or even

    insert into t1
    select col1, foo, col2
    from t2, (select 'a' foo from dual union select 'b' foo from dual)
    

    or (insert other ways here)

  • Cross-Schema insert by using the stored procedure

    Hi all.

    I am currently migrating 11.2.0.1 to 11.2.0.3,
    and I have to deal with an unexpected privileges error "ORA-13199: insufficient privilege for the table in the application of the xxx model."

    While inserting triplets in the table in the application of the model
    using a stored procedure which is
    owned by the owner of model table and app,
    but called by another issued user.

    There has never been a problem 10.2.0.4 or 11.2.0.1.
    It seems that something has really changed, (perhaps an authid pragma or something like this in the code internal SDO_RDF_TRIPLE?)
    The two users are needed on my system for security policy reasons.



    Here's a simplified script to reproduce the success on 1.2.0.1 and error on 11.2.0.3.
    Users are: ADMWAT = model, USEWAT = calling application


    SQL > connect SYS/xxxxx@DB_*11201*.world as sysdba
    Connected.
    SQL > select value of MDSYS. RDF_PARAMETER where namespace = "MDSYS" and the attribute = "SEM_VERSION";

    VALUE
    --------------------------------------------------------------------------------
    * 112 *.

    SQL >
    SQL > connect ADMWAT/xxxxx@DB_11201.world
    Connected.
    SQL > CREATE TABLE family_rdf_data (id NUMBER, triple SDO_RDF_TRIPLE_S);

    Table created.

    SQL >
    SQL > exec SEM_APIS.create_rdf_model ('family', 'family_rdf_data', 'three');

    PL/SQL procedure successfully completed.

    SQL >
    SQL > GRANT INSERT ON family_rdf_data in MDSYS.

    Grant succeeded.

    SQL >
    SQL > create or replace PROCEDURE NEW_TRIPLE IS
    BEGIN 2
    3 INSERT INTO family_rdf_data VALUES (1,
    4 SDO_RDF_TRIPLE_S ('family',
    5 "http://www.example.org/family/John."
    6 "http://www.example.org/family/fatherOf."
    7 'http://www.example.org/family/Suzie'));
    8 END;
    9.

    Created procedure.

    SQL >
    SQL > GRANT EXECUTE ON NEW_TRIPLE to USEWAT;

    Grant succeeded.

    SQL >
    SQL > connect ADMWAT/xxxxx@DB_11201.world
    Connected.
    SQL > exec ADMWAT. NEW_TRIPLE();

    PL/SQL procedure successfully completed.

    SQL > rollback;

    Complete restoration.

    SQL >
    SQL > connect USEWAT/xxxxx@DB_11201.world
    Connected.
    SQL > exec ADMWAT. NEW_TRIPLE();

    PL/SQL procedure successfully complete.

    SQL >
    SQL >
    SQL >

    ************************************************************************************************************
    ************************************************************************************************************
    ************************************************************************************************************

    SQL > connect SYS/xxxxx@DB_*11203*.world as sysdba
    Connected.
    SQL > select value of MDSYS. RDF_PARAMETER where namespace = "MDSYS" and the attribute = "SEM_VERSION";

    VALUE
    --------------------------------------------------------------------------------
    * 11203 *.

    SQL >
    SQL > connect ADMWAT/xxxxx@DB_11203.world
    Connected.
    SQL >
    SQL > CREATE TABLE family_rdf_data (id NUMBER, triple SDO_RDF_TRIPLE_S);

    Table created.

    SQL >
    SQL > exec SEM_APIS.create_rdf_model ('family', 'family_rdf_data', 'three');

    PL/SQL procedure successfully completed.

    SQL >
    SQL > GRANT INSERT ON family_rdf_data in MDSYS.

    Grant succeeded.

    SQL >
    SQL > create or replace PROCEDURE NEW_TRIPLE IS
    BEGIN 2
    3 INSERT INTO family_rdf_data VALUES (1,
    4 SDO_RDF_TRIPLE_S ('family',
    5 "http://www.example.org/family/John."
    6 "http://www.example.org/family/fatherOf."
    7 'http://www.example.org/family/Suzie'));
    8 END;
    9.

    Created procedure.

    SQL >
    SQL > GRANT EXECUTE ON NEW_TRIPLE to USEWAT;
    Grant succeeded.

    SQL >
    SQL > connect ADMWAT/xxxxx@DB_11203.world
    Connected.
    SQL > exec ADMWAT. NEW_TRIPLE();

    PL/SQL procedure successfully completed.

    SQL > rollback;

    Complete restoration.

    SQL >
    SQL > connect USEWAT/xxxxx@DB_11203.world
    Connected.
    SQL > exec ADMWAT. NEW_TRIPLE();
    BEGIN ADMWAT. NEW_TRIPLE(); END;

    *
    ERROR on line 1:
    ORA-55303: SDO_RDF_TRIPLE_S constructor failed:

    SQLERRM = ORA-13199: insufficient privilege for the application of the model family table [
    ORA-06512: at the 'MDSYS. MD", line 1723
    ORA-06512: at the 'MDSYS. MDERR", line 17
    ORA-06512: at the 'MDSYS. SDO_RDF_TRIPLE_S', line 41
    ]
    ORA-06512: at the 'MDSYS. MD", line 1723
    ORA-06512: at the 'MDSYS. MDERR", line 17
    ORA-06512: at the 'MDSYS. SDO_RDF_TRIPLE_S', line 68
    ORA-06512: at "ADMWAT. NEW_TRIPLE', line 3
    ORA-06512: at line 1


    SQL >

    Published by: damien.claveau on March 26, 2012 02:02

    Damien,

    Please submit a Service request for this issue in Support of Oracle.

    Meanwhile, until a patch will be available, another possible solution, you could consider to use is to grant the DBA role to ADMWAT.

    If you want, please contact me directly by email: souripriya das at oracle dot com dot

    Thank you
    -Smiled.

  • Reg: inserting values using procedures in odi

    Hello

    Hello everyone, I have a requirement like values are inserted into the table of DBMS using the odi procedure very.

    I use this procedure in a package, this package including refresh variables so that it runs several times using County.

    I'm trying to insert values into the table, the table is empty. so when I am trying to run this package I get error like

    This

    ODI-1228: Dailyfileloads task (procedure) insertion fails on the target of ORACLE DSS_ORACLE connection.
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00917: Missing comma

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:338)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:263)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:822)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)

    I'm not able to solve this please help me.

    Code of procedure like this: insert into dailyload_apmstr (FILENAME) values (DSS. #sample);

    Kind regards
    Sri

    Can you please close the thread marking the answers that help complete or correct

Maybe you are looking for

  • Phone scam. Call claiming to be from Microsoft.

    Original title: phone scam Received a call from 23-456-7809 today, and he told me he worked for Microsoft and said that my computer has a lot of viruses from the internet. He was also an Indian man. Then he told me to go to run and type 'inf', from t

  • cleaning of the entire computer

    How to erase everything on my computer and start again.  Ive got overheated, slow computer, too many mistakes etc tired of him cutting.  I think I want to just start again. computer laptop inspiron 1525 Dell. Thank you

  • Save-location - Date object?

    HI -. I use an Officejet 6500 a Plus and the software suite that comes with it (especially the HP Scan v22.50.231.0) The operating system is windows XP, sp3 32-bit I always scan the computer, never of the controls on the device. In the advanced setti

  • How can I delete a message in the Outbox?

    I tried offline, are forwarded to a folder and then delete and can't get rid of it. I cannot send emails from outlook with that in the oubox. The content of the e-mail is replaced by the following message: Windows Mail has encountered a problem, unex

  • loss of the contents of the 'sent items' folder in windows mail

    Somehow all my emails sent in the 'sent items' folder of windows mail have been dumped. It's the second time that this has happened almost two years, I've been using vista. I checked to make sure that "show all messages" is accused in the "current vi