This is a discussion on How to copy a tablespace? within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi! I want to move a tablespace from one instance to another, they have different names. Ex: user test_user ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi! I want to move a tablespace from one instance to another, they have different names. Ex: user test_user with tablespace test_user_data, want to move this to user prod_user with tablespace prod_user_data. Is it possible with exp - imp ? Have in mind that I'm a newbie, maybe this is a stupid question ;-) Thanks for all help! Einar |
| |||
| You cannot move tablespaces, as a tablespace is a logical unit. It comprises of datafiles - the physical implementation of tablespace. And users do not own tablespaces, so moving a tablespace from user to user is nonsense. You Grant users the prvilege to access objects, possibly stored in that tablespace. Look at transportable tablespaces - yet you cannot rename them. Transportable ts uses exp/imp for the metadata only; you physically copy the datafile(s), belonging to the tablespace. As you indicate you are new in this field, I'd like to advise you call in your DBA to archieve this. Using exp/imp without transportable tablespaces reuires to find out what objects are stored in that tablespace, and name them all in the tables=(...) section of your export command. Then use imp fromuser=a touser=b Next time, just (have 'em) name the ts user_data on both instances... |
| |||
| frank.van.bortel@gmail.com wrote: > Look at transportable tablespaces - yet you cannot rename them. Perhaps I have misunderstood your intent in saying this but: ALTER TABLESPACE users RENAME TO user_data; Works just fine in 10gR2. -- Daniel A. Morgan http://www.psoug.org damorgan@x.washington.edu (replace x with u to respond) |
| ||||
| DA Morgan wrote: > frank.van.bortel@gmail.com wrote: > >> Look at transportable tablespaces - yet you cannot rename them. > > Perhaps I have misunderstood your intent in saying this but: > > ALTER TABLESPACE users RENAME TO user_data; > > Works just fine in 10gR2. For starters, I assumed things. I apologize for that. I assumed the OP had a user_test_data TS on one instance, and user_prod_data on another, and wanted to copy user_test_data over to user_prod_data. That is not going to work; for starters, you already have user_prod_data! Also, there is the issue of grants on objects within the TS - these won't be the same! Bad choice of words, and too hasty. -- Regards, Frank van Bortel Top-posting is one way to shut me up... |