- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI have an Oracle 9.2.0.7 tablespace called ABC that contains tables, triggers, and stored procedures. I need to make a copy of ABC called XYZ that contains all the same objects as ABC. What is the best way to accomplish that?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sjwalesPosted on 2007-03-06 at 12:33:04ID: 18665099
If you are looking to do the copy in a separate tablespace, then export/import with transportable tablespaces is the best option, I would think:
e.com/docs /cd/B10501 _01/server .920/ a9652 1/tspaces. htm#5697
http://download-west.oracl
However, I get the opinion that this isn't what you want to do.
I created an empty schema called "FRED" and exported it, just to see what Oracle told me it was going to export (output below)
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user FRED
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user FRED
About to export FRED's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export FRED's tables via Conventional Path ...
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
Looks like it will export everything you want.
If you know what objects are in your tablespace (dba_objects) and all objects for those schemas exist only in that tablespace, you could export just the affected schemas, create a new user with default tablespace XYZ and import.
Something like this:
-- Get the schemas affected
select owner from dba_objects where tablespace_name = 'ABC'
-- Make sure the objects are all in that tablespace only, using the output from the query above, or just make it a subquery)
select distinct tablespace_name from dba_objects where owner in ('xxxx','xxxx');
Export:
exp userid=system owner=user1,user2,user3 file=myexport.dmp log=myexport.log
Create new users with default tablespaces being XYZ
imp user=system fromuser=user1 touser=newuser1 file=myexport.dmp log=myimport.log
Something like that might work for you. (I haven't tested it, but it seems like it should work).