Insert via DB-LINK

Hi, i'm trying to insert via dblink data selected from local table. Here is the code:
create or replace type T_DATA_IDS as table of number(19);
export_process_ids t_data_ids;And here is the query:
    insert into process@archive
      (select * from process where process_id in
        (select * from table(export_process_ids)));And it throws
ORA-22804: remote operations not permitted on object tables or user-defined type columns
When i change '(select * from table(export_process_ids))' to some id's from that table data is inserted without errors.
How can i work around that error?
Edited by: 843706 on 2011-03-11 05:58

843706 wrote:
I tried
create table temp2 as (select * from table(export_process_ids));But now i have error:
Error(90,3): PLS-00103: Encountered the symbol "CREATE" 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-identifier>    <a bind variable> << close current
delete fetch lock insert    open rollback savepoint set sql execute commit forall merge    pipe So is it possible to use DDL in PL/SQL?You'r doing this within a plsql block, right?
You need the following:
begin
  execute immediate 'create table temp2 as (select * from table(export_process_ids))';
end>
[...] but with every iteration it executes one select query ((select * from process where process_id in my_rows.NOT_SURE_WHAT_THIS_NAME_IS) )) which i'd like to avoid.No. For inserts FORALL creates a bulk statement. Only for updates FORALL creates individual statements:
CREATE OR REPLACE TYPE my_collection IS VARRAY (256) OF NUMBER;
CREATE TABLE test_bulk (   test_id    NUMBER , id_test_1  NUMBER , id_test_2  NUMBER );
CREATE OR REPLACE TRIGGER test_asi AFTER INSERT ON TEST_BULK  REFERENCING NEW AS NEW OLD AS Old DECLARE BEGIN  DBMS_OUTPUT.PUT_LINE('expensive action'); END;
DECLARE
  my_collection_test  my_collection;
BEGIN
      SELECT LEVEL
        BULK COLLECT INTO my_collection_test
        FROM DUAL
  CONNECT BY LEVEL < 15;
  DBMS_OUTPUT.PUT_LINE('forall');
FORALL i IN 1..my_collection_test.COUNT
           INSERT INTO test_bulk(id_test_1,id_test_2) VALUES (1,my_collection_test(i));
  DBMS_OUTPUT.PUT_LINE('simple loop');
   FOR i IN 1..my_collection_test.COUNT LOOP
           INSERT INTO test_bulk(id_test_1,id_test_2) VALUES (1,my_collection_test(i));
   END LOOP;
END;
DROP TABLE test_bulk;
DROP TYPE my_collection;returns:forall
expensive action
simple loop
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action
expensive action

Similar Messages

  • Multi-Row insert/update/delete not working via db-link

    App. Version: 2.0.0.00.49
    DB: Oracle 9i, not sure about the build
    Problem: Multirow Update/Insert/Delete doesn't work via db-link.
    Error received: ....ORA-1460: unimplemented or unreasonable conversion requested....
    Where: Tabular Form generated via Wizard
    Side note: It's working properly when local table(s) is/are used, it's not working via db-link or view.
    I've encountered this error with single update/insert/delete operations before, but was able to fix it via using temp-variables (v_xyz := :Px_xyz; as the proposed v('Px_xyz') was really slow with my scripts)...but with the automated DML-action I don't see a way to edit it accordingly.
    Workaround found:
    1a) Use local* collection on HTML-DB-Server, then write single row updates/deletes/inserts to the remote DB via DB-Link
    1b) Use local* table on HTML-DB-Server, then write single row updates/deletes/inserts to the remote DB via DB-Link
    * Local = on the same server that HTML-DB is running on...
    So,...to my questions:
    1. Can someone confirm that this is a "known feature" (aka bug)?
    2. Can someone tell me if this "known feature" has been eliminated in the newer version of HTML-DB/APEX (> 2.0.0.00.49)?
    Thanks.
    Ingo

    Hi,
    Do you have a small test case program that demonstrates this? A JDeveloper project showing what exactly is the problem when trying to use the BDB SQL JDBC driver to insert data into the BDB SQL database? What do you mean by "not working", do you get any errors, you do not get errors but you do not see the data in the database etc?
    What are the versions of Java, JDeveloper, ADF and BDB SQL you are using, and on what OS?
    Regards,
    Andrei

  • Insert via dblink

    Hi i m trying to insert in a remote database via database link but after commit i m getting
    ORA-00603: ORACLE server session terminated by fatal error
    on remote server i have checked alert log it is giving below error
    Mon May 4 12:25:40 2009
    DISTRIB TRAN SCHEMAC.REGRESS.RDBMS.DEV.US.ORACLE.COM.be2d0dd5.2.19.2187
    is local tran 115.36.8643 (hex=73.24.21c3))
    delete pending committed tran, scn=595570572 (hex=0.237faf8c)
    Below is the senario
    remoter db(tstr) on unix has one schema 'schemaa' that contains thousands of tables
    created another schema on same db by name 'schemab' that contains synonyms of 4 table from 'schemaa' and i have given grant select insert update delete on four tables to 'schemab'
    now in local db(windows) there is one schema 'schemac'
    i have created a dblink in this schema that will access objects of 'schemab' (actually accessing objects of 'schemaa'),also edited tnsnames. ora on local database for connect string of remote db.
    and created synonym 'tablename' for string 'schemab.table@dblink'
    i am able to select and describe the synonyms in 'schemac'
    but when i m doing insert after committing the record i m getting ORA-00603
    subsequently alertlog on remote database giving error
    Mon May 4 12:25:40 2009
    DISTRIB TRAN SCHEMAC.REGRESS.RDBMS.DEV.US.ORACLE.COM.be2d0dd5.2.19.2187
    is local tran 115.36.8643 (hex=73.24.21c3))
    delete pending committed tran, scn=595570572 (hex=0.237faf8c)
    BOTH side oracle version is 10.2.0.1.0
    help required..!!!!
    Edited by: user511621 on May 4, 2009 2:27 AM

    subsequently alertlog on remote database giving error You need to resolve these errors.
    Check out metalink note 126069.1 for this.

  • JDBC Thin driver doesn't support writing data into remote database via database link

    Dear Oracle Guru:
    Please confirm: Oracle JDBC thin driver does not support writing data to remote database via database link.
    The following errors occur when trying to write data into a remote database via database link through jdbc thin driver:
    ORA-03106: fatal two-task communication protocol error
    ORA-02063: preceding line from FDBE.PAPDSRAS1
    ORA-02063: preceding 2 lines from PA
    SQL statement is a prepared statement using a SQL like: insert into mytable@pa (col1,col2) values (?,?).
    Thanks.
    null

    Thanks, Dan.
    I still think it is a driver problem, because I can do similar things in a stored procedure or in PL/SQL Developer to copy records from a local database table to a remote database table via database link (insert into mytable@pa select * from mytable). The value for distributed_transactions of our database is 10.

  • ORA-01461 error inserting over DB Link

    We receive an ORA-01461 error (can bind a LONG value only for insert into a LONG column) when using HTMLDB to insert into a remote table over a database link. The remote table has two VARCHAR2 and one NUMBER columns - it does not contain a LONG column. Inserting via SQL*Plus is OK.
    Any ideas anyone?
    Barry

    Anyone found a solution to this. I'm getting the same error. HTMLDB 1.6
    I have TableA and TableB in remote db1. TableA=Master, TableB=Detail. Both tables have single column PK generated by a trigger.
    In db2 I created a schema with viewA on TableA@db1 and viewB etc.
    HTMLDB app accesses views.
    I've tried to create a tabular form page to insert update delete into viewB but can only delete. Insert & update produces error:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01461: can bind a LONG value only for insert into a LONG column ORA-02063: preceding line from ORIXREPORTS.ORIXNZ.CO.NZ, update "IT_HTMLDB"."SCHEDULED_REPORT_PARAMETERS" set "SCHEDULED_REPORT_PARAMETER_ID" = :b1, "SCHEDULED_REPORT_ID" = :b2, "NAME" = :b3, "VALUE" = :b4, "VALUE_TYPE" = :b5 where "SCHEDULED_REPORT_PARAMETER_ID" = :p_pk_col
    Have also tried a Master Detail page with similar problems.
    I have only managed to get this to work by using the "Form on a Table with Report, 2 Pages" page creation option and then specifiying that Detail is editied in separate page. However this means deletes & updates are slow for the user as cannot do multi updates and deletes etc.
    Any help appreciated.
    Cheers
    Ian

  • Connecting to a cube via a linked server

    Hi
    I want to connect to a SSAS cube via a linked server. When I ran a query against the SSAS cube from directly from the SQL server it runs fine.
    If however I run the query in SSMS from my PC I get
    OLE DB provider "MSOLAP" for linked server "SSASServer01" returned message "The following system error occurred: .".
    Msg 7373, Level 16, State 2, Line 1
    Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "SSASServer01".
    In the properties on the linked server I've defined an account to use for the connection to get round the double hop issue
    Any Ideas why I'm still getting the error?
    Alex

    Hi Mr P,
    According to your description, you get the error 7373 with message "Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "SSASServer01"." when connecting a SSAS cube via linked server.
    Right?
    In this scenario, based on the error code 7373, it points to the issue of MSOLAP provider, please firstly check the properties setting for MSOLAP. Make sure the "Allow Inprocess" is selected. You may also have other options selected depends on
    your query.
    Also check if ports for your server (1434 and 2383) are listening proper locally and externally. Please refer to a similar thread below:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9d5bd9e0-c380-4a0f-bdab-857751c71fba/ole-db-msolap-provider-issues?forum=sqlanalysisservices
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Error not getting while executing procedure via db link

    Hi,
    I am executing a database procedure remotely via database link from SQL prompt (SQL > EXECUTE REPLICATE_DATA@DBLK_SALE), and while getting any connectivity issue system is not giving any error (it is just showing as not responding)..
    if I am executing the same procedure directly in the remote database then it is giving error as
    ORA-02055: distributed update operation failed; rollback required
    ORA-02068: following severe error from DBLK_SALE
    ORA-03135: connection lost contact
    Can someone can help me on this
    Regards

    Dear 823755,
    You can think the Database link as a new sqlplus session to the distributed database. You should have defined a user to connect to that remote database and the user has to have the necessary privileges to revoke the relevant object. Does it have that privilege? Can you even connect to the remote database instance?
    SQL> SELECT * FROM DUAL@DBLK_SALE;Regards.
    Ogan

  • Connecting HP Laserjet 1010HB with Macbook Pro via D-Link Network!?

    Good evening,
    I have a MacBook Pro and I want to be able to print via WiFi.
    The Printer is hosted by a Windows Computer via D-Link Router Network
    My sister who has a Windows Laptop is able to print.
    I read about Bonjour but this seems to be a software for windows computers
    to print with a Networkprinter hosted by an Apple-PC.
    I need exactly the opposite.
    Host: Windows 7 (D-Link Router DIR-655)
    Me: OS X 10.6.7
    I tried to use Shareport Utility but without success.
    Shareport doesn't show the Printer.
     > system settings > print and fax > + > doesn't work. What settings should I use? LPD, IPP, HP Jet direct socket.
    And the driver: We got a HP Laserjet 1010HB -> HP Laserjet 1010, HP Laserjet 1010 v2 Gutenprint, HP Laserjet 1012, v2  1012 gutenprint.
    How ever I don't know what to do.
    And I will certainly NOT buy any additional Airport thing of Apple or they can **** ***** ****** ** ***** **** and I will **** ***** **** ****
    Hope you can help me.
    cheers

    Thanks for the feedback LilyLC. I too have gone through all of your steps and a host of others. Still with no luck. No problems at all with my Airport Express, but still no way to keep up a connection with my DIR-655 via WIFI N. I tried all of the steps with each firmware version too. I've given up at this point. I want the 2 months of my life back that I spent troubleshooting this mess. At least Apple could acknowledge this and say we are on it, and that it isn't only "in our heads."
    /begin rant/
    I think that Apple needs to do some re-evaluating of their software release schedule/quality control. At this point I would rather wait and have them get it right then put out subpar updates and fall into the downward spiral pattern of "the rest of them". My confidence has been shaken and I've been a mac fan since the beginning. I just want Apple to split off the iPod/Phone/TV etc. into its own division and to get back on track with the Mac line starting now. We need this stuff to work to make a living and this takes a higher priority in my mind than new twiddle apps on the iPhone.
    I do own two iPods and an iPhone but would chuck them in a river to get Leopard working solidly with the majors like Adobe, Extensis, Epson, as well as stable networking, syncing and backups. Apple really has their hands full at this point with a large list of bugs. I really wish them well but can't say I'm in the least bit happy as a consumer at this point. For the first time in a long time I feel sheepish when answering whether or not I'd recommend a Mac, and that hurts me deeply for some reason.
    /end rant/

  • Hello, I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    Can you describe what “the operation is failing” means?  What is happening and how is it different than what you expect?
    Also, what product are you trying to update manually, and do you have a link to the page of instructions, so we know what your attempting to do?

  • Adobe PDF files will not display when called via a link in page (FF 4.01)

    adobe PDF files will not display when called via a link in page.
    This happens when testing new web page from DWeaver CS5 - all other browser tests are OK (IE9, Safari5.05, Chrome etc.)

    [moved to the Adobe Reader (desktop) forum]

  • Changing fields in form opened in query mode via a link from a report

    I have a summary report which allows me to access a form via a link: The form opens up with its fields populated with the corresponding record from the report.
    Can additional code be added to the after displaying page section of the form such that some of the fields can be assigned with different values from those in the original record? If so, can anyone offer some sample code for this?

    Hi,
    You can access and set the values of the columns in forms by using certain apis. All the columns in the form are available in the session which can be accessed and set.
    Sample Code
    declare
    flightno number;
    ticketno varchar2(30);
    tdate date;
    persons number;
    blk varchar2(10) := 'DEFAULT';
    begin
    flightno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    ticketno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    tdate := p_session.get_value_as_date(
    p_block_name => blk,
    p_attribute_name => 'A_TRAVEL_DATE');
    persons := p_session.get_value_as_number(
    p_block_name => blk,
    p_attribute_name => 'A_NOF_PERSONS');
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHTNO',
    p_value => to_char(NULL)
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_TICKETNO',
    p_value => to_char(NULL)
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_TRAVEL_DATE',
    p_value => to_char(NULL)
    end;
    The above code sets and gets value of the form fields. The form field is accessed by prefixing "A" to the form column name. For example if the column name is "DEPTNO" then to access or set value to it you should refer to the session variable "A_DEPTNO".
    Thanks,
    Sharmila

  • Sharing an imported PDF via a link

    I uploaded/imported an AcroForm to my FormCentral (FC) account, added the submit button in FC and now I'd like to share a link to the file for users to access the form, vs me having to send them a the Submission-Enabled PDF version that I downloaded.
    I thought there was a way to share the PDF via a link, however, the "copy fillable form link" button is greyed out. My understanding is that the form that I uploaded to my FC account is hosted on the Adobe server, so why can't I generate a link that I can have others point to - to access the form?  Or is the option to share direct links to the form ONLY for Web/HTML forms created within FC?
    Please advise.

    Hi; 
    The Import AcroForm feature allows you to use a form you have already authored, not requiring you to re-author in FormsCentral, to collect your data in FormsCentral and access features like Submission Reciepts, Notifications and the reporting available allowing you to share access to the responses etc.  The Imported PDF does not create an HTML fillable form and does not provide any URL to the form.
    You can host your form on a website and create a link to download the PDF from there rather than attaching the PDF to email, but there is no URL provided by FormsCentral.  How complex is your form?  Could you re-create it using our authoring?
    Thanks,
    Josh

  • Flash inserted via Javascript not working in IE.

    I am having issues viewing flash that has been inserted via
    javascript in Internet Explorer. I had to uninstall my flash about
    a week ago. I've since reinstalled flash and reinstalled flash
    player for all my browsers. All flash shows where it hasn't been
    inserted via javascript (ie. youtube.com) but javascript flash is
    not showing at all in IE. Firefox is working fine. Any help in
    resolving this issue for IE would be greatly appreciated.
    Duncan

    I'm having the same exact problem. I've uninstalled,
    reinstalled, the works. Flash works great in my alternate browser,
    Opera, but not with IE.

  • When opening FF via a link, the window doesn't open maximized

    If I start Firefox with a shortcut I have no problems, but if the browser isn't already opened, and I click a link in IRC, email etc. the browser starts in a window instead.
    Simply maximizing the window and then closing the browser doesn't fix it, since it only seem to remember the window position and size as long as it's not maximized.
    Going into properties of the shortcut and setting it to start maximized (it already is) doesn't change anything, since as I said, the problem is only when opening the browser via a link and not a shortcut.

    That's normal behavior for Windows, I think.
    It's possible there is an add-on to address this specific issue. If not, I wonder whether someone could craft a GreaseMonkey userscript that would be able to ''intelligently'' address this situation (i.e., it has to work on any site, but only if it's the only page open).

  • I am developing a book via email with a collaborator. iBooks Files are sent to me via a link to preview on iPad. This worked fine for a while but now getting download errors and the unhappy mac face saying download failed. Any ideas?

    I am developing a book via email with a collaborator. iBooks Files are sent to me via a link to preview on iPad. This worked fine for a while but now getting download errors and the unhappy mac face saying download failed. Any help appreciated. Very frustrating!

        I can see that this issue has been quite extensive, and frustrating, and I am so sorry for all that has happened societygirl! I would like to help you work this issue out. Please follow & send me a Direct Message, so I can get your account specifics and help finally bring this to a resolution.
    Thank you,
    MichelleH_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • Problem  in Creation of  Remittance Challan

    Hi sap Gurus, I have problem whne i am Creating a Remittace challan For With holding Tax its giving a error message no.8I705, No.key not found. Can any one Please Help me. Thanks in advance. Regards bharath

  • How to create business partner

    Hi All, I am working on a requirement where I need to create Business partners for employees that have a role as an AP vendor as this will allow personal data (address/bank info) to be shared across applications. So can you please tell me how can I d

  • Report Painter - Ordering the way variables appear on the input screen

    On the user input screen for a report, the variables for things such as Year, Period, Company Code, Profit Center......they do not always show up on the user input screen in the order that they are placed in the report.  Is there a way to change the

  • Payment terms diffrence

    Hi Experts I ahve  question where the payment terms at the header and the in the invoice had been diffrent in the document flow pleasec can u advise what could be the reasons in diffrering I have ine at the order and diffrent in Invoice. Thanks

  • OneDrive Javascript api access to powerpoint

    I'v been using the new javascript API for OneDrive and was wandering how/if the api extends to cover calling powerpoint files into an webpage or even hopefully specific slides into an iframe e.g regards Mark