Copy Command across dblink

Hi, i am wanting to copy a few columns from a table in db1 into a new table in db2. I can get this to work using the copy command in sql, but would like to recreate this in pl/sql.
can the execute immediate create over the dblink?

it all depends on the amount of data you're trying move across two differen servers.
when you say data, what's it? is it a table or schema?
COPY - works fine.But, the data being transferred over network. If you have very good band width, you will be fine.
SQLLDR - To do this, You have to unload the first and load it into different servers.
You can even try export(exp) and Import(imp) or datapump export(expdp) and datapump import(impdp)

Similar Messages

  • Copy command looses default values

    Hi,
    I have got a problem with the COPY command. I just want to copy the data in a very fast way to copy from one remote database to another one. I suggested that it would be the fastest way to use the copy command.
    insert into (select * from dblink) has been to slow
    The problem is that the copy command with REPLACE replaces the table, drops the indexes, trigger AND the default values!!!!!!
    Is there a possibility to solve this problem? Or is there another way to load the data in a very, very fast way?
    Thank you very much
    Henrik Rünger
    Consultant | OCP
    ckc ag | www.ckc.de

    It sounds like the destination table already exists. What about doing
    a DELETE to clean up the destination table and then using COPY INSERT?
    COPY may or may not be fast depending on a range of things. With
    COPY, all the data gets moved across the network from the source DB to
    SQL*Plus and then across the network again to the destination DB.
    What about export/import or the new 10g "datapump"? See
    http://otn.oracle.com/obe/obe10gdb/integrate/datapump/datapump.htm
    -- CJ

  • COPY command not working SQL Commands editor

    Hi All,
    I want to have a simple 'one-button-solution' for copying few tables from an external DB into the database where my Apex application is running.
    When I issue the following from the sqlplus command line I get the following output:
    SQL> COPY FROM schema/password@tnsnames_sid TO schema/password@tnsnames_sid REPLACE TABLE_TEST USING select * from TABLE_FOREIGN;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    Table TABLE_TEST dropped.
    Table TABLE_TEST created.
    2 rows selected from schema@tnsnames_sid.
    2 rows inserted into TABLE_TEST.
    2 rows committed into TABLE_TEST at schema@tnsnames_sid.
    SQL>
    However, if I try exactly the same command from within the Apex 'SQL Commands' editor, I get the following error message:
    ORA-00900: invalid SQL statement
    NOTE that the reason I use COPY command is to overcome problems with LONG datatype which arise when doing simply CREATE TABLE AS.... with dblink.
    In anycase, how can I make this work from within the 'SQL Commands' editor (and therefore in a button process).
    Regards,
    Pawel.

    Hi Harman,
    yes, this is a known issue.
    It's fixed with NW04 SPS 13.
    Regards Matthias Röbig-Landau

  • COPY command replacement

    Given that the COPY command is now deprecated (and clearly documented in 10gR2 - sqlplus user's guide that it will be obsoleted in future releases of SQL*Plus, will there be any replacement command in sqlplus?
    We were planning to use it to implement for our simulation model - but given it is deprecated and does not support new data types, we are forced to look for alternatives. What are the alternatives for a local area network or copying data between two oracle accounts using different tablespaces on the same db server?
    Pro*C/Direct Path Load,
    expdp/impdp,
    copy over dblink and then recreate the constraints and indexes,
    which one will be faster, should be used based on the following?
    What we want to do is to checkpoint (save) historical game data, and if required/necessary, be able to bring back the data from a saved game checkpoint X, where X can be any number (checkpoint 4 or 20, etc). We also want to hold onto the saved game checkpoint files so that we can take it to another place for after action review purposes.
    Any input is appreciated.
    regards.

    copying data between two oracle accounts using different tablespaces on the same db server?For this I would grant SELECT on the table to be copied to the target Oracle account and use CREATE TABLE ... AS SELECT ... and recreate constraints and indexes.

  • Dabase link while using copy command in Oracle 9i

    Hi,
    Is it must to have a database link while copying data between two databases in Oracle 9i using COPY command?
    I am using the copy command like following:
    SQL> copy from xxx/xxx@xyz to abc/abc@stu insert Table using select * from Table
    Database link is always required in Oracle 9i to copy data ?
    rgds,
    Karna

    When you use the copy command, all you need is that both databases are in the tnsnames.ora file and you can commect using the username/password#sid string. The copy command doesn't use the DBlink.

  • Copy Command in ABAP report

    HI Gurus,
    I have a ABAP report - basic list, with lot of batch data on it. based on the report they will copy the batch numbers and paste in standard transactions.
    Users complaining to do a Ctrl + Y and then Ctrl + C then Ctrl + V to paste the batch numbers.
    Is there anything we can do programatically using hot sopt on batch numbers so we get the selected BATCH and execute copy command programatically when they click on BATCH number on basic list.
    All they need to do is Ctrl + V on standard transactions.
    Is there anyway to achieve this?
    Thanks Giri

    Giri - you would probably get more results if you mark this as a question. That way you can assign po1nts to helpful answers.
    In any event why don't you just do a CALL TRANSACTION when the user double clicks on a line?
    Rob

  • Copy command not working for Search Results

    Hello,
    We have a Search Form that triggers a  TREX URL search.  We also add a custom Layout Set on the search URL.  (see URL below)
    <b>URL Search:</b>
    http:
    <server name> &ConfigFileName=Navigation.xml&layoutSetMode=exclusive&ResourceListType=com.sapportals.wcm.SearchResultList&SearchType=ctrlpers&QueryString=*&rndLayoutSet=CustomLayoutSet&SelectedMatchesPerPage=15&SearchVisible=false
    In the custom Layout Set, we've made our own UI command group to include the following commands:  Search_from_here, details, copy, move etc…
    The problem is that whenever we click on the 'Copy'  or 'Move' command of a resource, we get the following error message:
    =====================================
    Item not found       
    The item you are attempting to access is not available. Check that the name or link is correct. You might also check whether the associated repository is currently accessible.     
    ======================================
    The error message in the KM log files simply states "ERROR: RID not found".
    Would anyone know how to fix this issue!  I've tried many layout sets, but the copy command always gives me the same error message!
    Any help or suggestions on this would be much appreciated...
    Thanks,
    Harman

    Hi Harman,
    yes, this is a known issue.
    It's fixed with NW04 SPS 13.
    Regards Matthias Röbig-Landau

  • Copy Command in Pl/Sql block

    Can I use Copy command in Pl/Sql.For example :-
    Declare
    cursor c1 is select table_name from all_tables
    where owner = 'LSP' and rownum = 1;
    v1 varchar2(2000);
    Begin
    for c2 in c1 loop
    v1:='copy from lsp/lsp123479@dvlaq to scott/[email protected] create '|| c2.table_name ||' using select * from '||c2.table_name;
    execute immediate v1;
    end loop;
    end;
    Its not running properly giving an error as invalid Sql statement .
    Is it bcoz Copy command cannot be used in a Pl/Sql Block.

    Is there any other way to move the Table & data to another Data Base .Database link is the obvious one. And the SQL statement would look something like this (on the target database):
    SQL> create table FOO nologging as select * from FOO@sourcedb;
    However, the first question I always ask if why? What one may think is the solution to a problem is not always the best solution. So one need to identify the problem first, and then see what solutions there are and which one is the best fit.
    Other options are replication (using materialised views for example), Data Pump (available with 10G) - even could be Data Guard, a standby database, or a Real Application Cluster... depending on just what the problem and actual requirements are.
    Also important to note that SQL*Plus has its own set of commands. Do not confuse these commands (like EXEC, COPY, CONNECT, HOST etc) with the SQL and PL/SQL Languages. Not only are they executed by different software products, SQL*Plus commands are executed on the client and SQL (and PL/SQL) runs inside the Oracle database instance.

  • Copy command in Sqlplus

    I am using 8.1.6 and 8.1.7, but the copy command does not seem to work on either cases, the sqlplus just crash, did you guys have the similar problem? Is it a bug in oracle or there is some parameter I need to set up correctly?
    Your help is highly appreciated.

    it works i tried
    null

  • Copy command in oracle

    hi how i can do this following in copy command-------------
    t1 t2
    id1 val1 id1 val1
    copy from user1/pass1@db1 to user2/pass2@db2 insert t2 using select *from t1
    now in my case i have some data in t2 in such a way that id1(tab2) and id1(tab1) are same but their value(here val1(tab2) and val1(tab1)) are different.
    as id1 is primary key in tab2 i cannot insert this matched values.
    now i want to do this checking in the copy command where tab1.id1<>tab2.id1

    hi
    Create DB link like
    CREATE DATABASE LINK local
    CONNECT TO hr IDENTIFIED BY hr
    USING 'local';
    Try to access or insert the rows in the remote table by using the following command
    insert into tab1 SELECT * FROM tab1@local where pkid not in ( select pkid from tab1);
    Regards
    Singh

  • Copy command in OEM

    Hi all,
    I have a "copy" command in batch file, I scheduled this batch file from OEM, it gave me an error that "Access Denied", I know that "copy" command won't work in this way after I did some research.
    Anyone have this problem before? if so how you make it work?
    or anyone know how to fix this?
    Thanks for your help!
    Floyd.

    You may have run into bug 1504702. As a workaround you will need to use command line, as you've already figured out. I don't think a patch is available for Windows yet, although there is for Solaris (in the 8.1.7.4 patch set).
    Alison

  • Copy command in SQL

    What is the Copy Command in SQL ?

    COPY Command is used to COPY database table from one Schema to another Schema.

  • COPY command in SQL*Plus 8.1.6 returns ORA-65535

    The COPY command in the windows version of SqlPlus (SQLPLUSW) does not work any more. I get the following error
    << Array fetch/bind size is 5. (arraysize is 5)
    Will commit after every array bind. (copycommit is 1)
    Maximum long size is 80. (long is 80)
    ERROR:
    ORA-65535: Message 65535 not found; product=RDBMS; facility=ORA >>
    Interestingly, I can run the same COPY command successfully if I use SQLPLUS.exe ( the command line version ). No error & it completes the copy.
    I recently changed my Oracle client from 7.3 to v8.1.6.
    I had not encountered this problem with the same command in v7.3.

    You may have run into bug 1504702. As a workaround you will need to use command line, as you've already figured out. I don't think a patch is available for Windows yet, although there is for Solaris (in the 8.1.7.4 patch set).
    Alison

  • How to configure host copy command inside EM Console

    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AM

    mithun wrote:
    hi,
    I want to copy a file from one server to my production server. i found that through host copy command its is possiable in command prompt.but when i configure host copy command inside em console it is not working. i am getting following error
    ORA-06550: line ORA-06550: line 3, column 6: PLS-00103: Encountered the symbol "COPY" when expecting one of the following: := . ( @ % ; , column :
    Any solution for this
    Edited by: mithun on Jun 16, 2011 2:36 AMThis makes no sense whatsoever.
    Now, as for your original question, there is not "host copy" command. Not in sqlpus, not in em.
    What you are doing in sqlplus is the sqlplus command "host". That is a sqlplus command, documented in the SQLPlus Reference. The sqlplus command "host" takes an argument of an os command (in your case, the OS command is "copy") and creates a sub-process to ask the os to execute that command.
    I can't even imagine what you are referring to when you say "when i configure host copy command inside em console". Can you explain in more detail?

  • Preview displays PDF with "COPY" written across each page

    Canon's saving money by no longer including the User Guide with some of their camera's such as the Canon A1100 IS:
    If I go to the canon site:
    http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&fcategoryid=183&mo delid=18138#DownloadDetailAct
    ... I can download the User Guide as a PDF from here:
    http://gdlp01.c-wss.com/gds/6/0300001856/01/PSA1100ISCUGEN.pdf
    In Preview 5.0.1 (503), every page of the manual has the word "COPY" written across every page, which interferes with legibility.
    If I open the same PSA1100ISCUGEN.pdf file in Acrobat Pro 9, then the word "COPY" is no longer displayed.
    However if I go to print the manual from Acrobat Pro 9, then the preview in the Print Dialog shows the word "COPY" across each page to be printed.
    So whether I use OS X's Preview.app, or Acrobat Pro 9, they both share the same printing subsystem which wants to print "COPY" across every page.
    BTW Preview.app's "Show Inspector" identifies the Canon User Guide as protected, but with Printing privileges.
    Any guidance on how to print the Canon User Guide without the word "COPY" across every page? Any thoughts on why Preview.app displays the word "COPY" onscreen, while Adobe Acrobat 9 does not? Any thoughts on whether there's a way around the common OS X printing subsystem that both sit on, wanting to print "COPY" across every page?
    PS. I'm using an Canon IP5000 ink jet, but the behavior seems the same if I'm pointing to my office's Kyocera Postscript printer.

    Search for the manual on the european site http://canon-europe.com/ - the versions there (at least for the A1100 IS) do not have the annoying COPY watermark.
    The direct link for the A1100 IS manual is http://files.canon-europe.com/files/soft32765/manual/PSA1100isCUGEN.pdf
    Thanks to a post on dpreview for the hint - http://forums.dpreview.com/forums/read.asp?forum=1010&message=34633050
    -dh

Maybe you are looking for

  • Idvd does not launch

    iDVD will not launch for some reason. I'm just getting the bouncing icon in the dock. It was working fine and it allowed me to burn a few dvds but not it won't start up at all. I click on the application icon and all i get is the top idvd menu and th

  • Problems after  migrating application from 10.1.2 to 10.1.3

    Hi, I am encountering the following error while executing the application after migrating it from Jdeveloper10.1.2 to JDeveloper10.1.3. Could you please help me in this regard.. NOTIFICATION J2EE JSP0008 Unable to dispatch JSP Page : java.lang.NullPo

  • How do i set a rescue e-mail

    i have forgotten my security question, when i try to re-set them it tell me I have to have them sent to the rescue e-mail address i set up!!!!!! however in order to send a link to my resue e-mail address I need to answer security questions...........

  • Been having problem downloading iPad software update error occurs 2/3 way

    Error keeps occuring need help

  • Any other apps with read-only Keynote?

    I have several Keynote presenations that I'm trying to memorize.  I have them all stored on my iPad, but the tempatation is too great to edit them as I go along. Does anybody make an app that can present Keynote files (including the builds) in a read