[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

what is 'SQL Plus Copy' command

Posted on 2009-04-25
2
Medium Priority
?
1,911 Views
Last Modified: 2013-12-18
Hi,

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.
0
Comment
Question by:gudii9
2 Comments
 
LVL 25

Accepted Solution

by:
lwadwell earned 2000 total points
ID: 24233919
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;
or
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;
or
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."

http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm
http://www.praetoriate.com/oracle_tips_dm_sqlplus_copy.htm


lwadwell
0
 
LVL 7

Author Closing Comment

by:gudii9
ID: 31574573
thank you
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by 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…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 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