Home » RDBMS Server » Server Administration » Cloning tablespace
Cloning tablespace [message #302547] Tue, 26 February 2008 02:17 Go to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Hi,
How can I clone a tablespace?
I have serached forum and search engines but I don't find the reuqired information Sad

Thanks.
Re: Cloning tablespace [message #302555 is a reply to message #302547] Tue, 26 February 2008 02:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you mean duplicate a tablespace into another database, have a look at transportable tablespace.

Database Administrator's Guide
Chapter 8 Managing Tablespaces
Section Transporting Tablespaces Between Databases

Regards
Michel
Re: Cloning tablespace [message #302559 is a reply to message #302555] Tue, 26 February 2008 02:49 Go to previous messageGo to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Hi Michel,

I am having a tablespace ts1 in a database db1 and I am creating another tablespace ts2 in the same database. Now I need to store objects which is existing in tablespace ts1 to ts2.

Thanks.
Re: Cloning tablespace [message #302565 is a reply to message #302559] Tue, 26 February 2008 02:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ALTER TABLE MOVE
ALTER INDEX REBUILD

Regards
Michel
Re: Cloning tablespace [message #302566 is a reply to message #302565] Tue, 26 February 2008 03:02 Go to previous messageGo to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Thanks Michel.

If there is 100 tables in that tabelspace then do we need to execute
alter table 100 times?

Thanks.
Re: Cloning tablespace [message #302567 is a reply to message #302566] Tue, 26 February 2008 03:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes but this is Oracle that does the job not you. Wink

Regards
Michel
Re: Cloning tablespace [message #302569 is a reply to message #302559] Tue, 26 February 2008 03:07 Go to previous messageGo to next message
NandKumar
Messages: 92
Registered: June 2007
Location: v$hyderabad
Member
First identify the segments that are in the tablespace, then you can use:

alter table <table_name> move tablespace <new_tablespace>

and

alter index <index_name> rebuild tablespace <new_tablespace>


You can write a script to simplify the task.

[Updated on: Tue, 26 February 2008 03:09]

Report message to a moderator

Re: Cloning tablespace [message #302573 is a reply to message #302569] Tue, 26 February 2008 03:28 Go to previous messageGo to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Thanks all for your informations.
I think this is the only way to move objects from one tablespace to another tablespace.

Thanks.


Re: Cloning tablespace [message #302578 is a reply to message #302573] Tue, 26 February 2008 03:41 Go to previous messageGo to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Please clarify my doubt.

If I go for transport tablespace then I have to have datapump utily installed along with oracle s/w.
Hope data pump is one part of oracle s/w

Thanks.
Re: Cloning tablespace [message #302584 is a reply to message #302578] Tue, 26 February 2008 04:22 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is.

Regards
Michel
Previous Topic: user block - blocking session count
Next Topic: translator.zip
Goto Forum:
  


Current Time: Sat Dec 10 09:25:23 CST 2016

Total time taken to generate the page: 0.05302 seconds