I have a question for you'll.
I wanted to copy tables from one tablespace to antoher.
Is this possible by simple oracle commands or does this need extensive
coding?
Please let me know if you have faced this problem earlier.
Thanks
Shashi
create table new_table_name tablespace new_space as select * from old_table;
Then
drop old_table;
rename new_table_name to old_table_name;
This takes time and space and will not preserve and constraints, links, etc...,
but it will work...
The Sql COPY command ( see help or manual) can do this if you wish to specify
another schema as well.....
Sashi <shas...@yahoo.com> wrote:
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
>Hi,
>
>I have a question for you'll.
>I wanted to copy tables from one tablespace to antoher.
>Is this possible by simple oracle commands or does this need extensive
>coding?
>
>Please let me know if you have faced this problem earlier.
>
>Thanks
>Shashi
If you are using Oracle8i (aka 8.1.*) you can use the new option of
the ALTER TABLE command:
"ALTER TABLE table_name MOVE <destination_tablespace> ......"
This will preserve any indexes, constraints, grants, etc...
HTH,
Jurij Modic <jmo...@src.si>
Certified Oracle DBA (7.3 & 8.0 OCP)
================================================
The above opinions are mine and do not represent
any official standpoints of my employer
Thanks,
Shashi