Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1646
  • Last Modified:

Can I use copy command in PL/SQL?

Can I use copy(SQL Plus command, not the OS copy command) command in PL/SQL?
If I can't why?
0
srikumar_p
Asked:
srikumar_p
  • 2
1 Solution
 
Mark GeerlingsDatabase AdministratorCommented:
What are you trying to copy? Data from one Oracle table to another?  An operating system file? Something else?
0
 
srikumar_pAuthor Commented:
Data from one table to another.
Another question is
Will copy command create redo while copying?
0
 
avicoCommented:
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
 
srikumar_pAuthor Commented:
Looks perfect. How can I check whether it generates redo or not?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now