what is 'SQL Plus Copy' command

Posted on 2009-04-25
Last Modified: 2013-12-18

I would like to know more about

'SQL Plus Copy'
command in terms of its use, where we use etc. Any links, resources, ideas, sample code highly appreciated. Thanks in advance.
Question by:gudii9
    LVL 25

    Accepted Solution

    Hi gudii9,

    Used to copy data from one (or more) table(s) in one database into another database.

    Within a database you can copy data from one table to another table by using either an INSERT or a CREATE SQL, for example:
    INSERT INTO target_table SELECT * FROM source_table;
    CREATE TABLE target_table AS SELECT * FROM source_table;

    Between two databases, you can copy data from one table to another in a similar way with DBLINKs, for example:
    INSERT INTO target_table SELECT * FROM source_table@source_dblink;
    CREATE TABLE target_table AS SELECT * FROM source_table@source_dblink;

    The SQL*Plus COPY command gives similar functionality to the dblink copy methods - but without needing a defined dblink.  It does supply a few extra features with it's APPEND|CREATE|INSERT|REPLACE options.

    It does the copy over SQL*Net and hence requires to be able to connect to both databases from the server on which the command is run.

    Also, by Oracle's documentation: "The COPY command will be obsoleted in future releases of SQL*Plus."

    LVL 7

    Author Closing Comment

    thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Suggested Solutions

    Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
    This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now