Solved

Can I use copy command in PL/SQL?

Posted on 1999-01-29
4
1,633 Views
Last Modified: 2008-02-26
Can I use copy(SQL Plus command, not the OS copy command) command in PL/SQL?
If I can't why?
0
Comment
Question by:srikumar_p
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 1083907
What are you trying to copy? Data from one Oracle table to another?  An operating system file? Something else?
0
 

Author Comment

by:srikumar_p
ID: 1083908
Data from one table to another.
Another question is
Will copy command create redo while copying?
0
 
LVL 2

Accepted Solution

by:
avico earned 50 total points
ID: 1083909
Absolutely No !

The copy command is a part of the product SQL*Plus, and it's neither an SQL command nor a Pl/Sql command.
You can find enforcements in Oracle's documentation, in the SQL*Plus book.

Regarding your second question, SQL*Plus copy command does generate redo data. In fact, everything you do in Oracle generates a redo data, except whenever you (can) use the 'UNRECOVERABLE' predict. For instance, the following command will not generate redeo data :
Alter index idx rebuild tablespace indexes unrecoverable;Create table a as select * from b;

The copy command simply does smart inserts.
0
 

Author Comment

by:srikumar_p
ID: 1083910
Looks perfect. How can I check whether it generates redo or not?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

752 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