Hi csar,
What do you suggest:
1. Create new tablespace or just new schema/database is enough?
What i want is to create a new database with same structures as production database.
Main Topics
Browse All TopicsHi,
I have a production database schema (called it Live) which currently running live on the server.
Question 1:
My question is how to duplicate this production database schema into another schema (called it Test) with same table structures, view, procedure, users, etc.
The purpose is to have another schema for user to do the testing instead of testing the production database schema.
Question 2:
Can i have this Test schema reside in the same server as production database?
Question 3:
Where can I get the Command/Guide/Solution to get this job done.
Please advice and help.
Thanks.
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.
Create a new test database. Export data from Prod database and import into Test. You wouldn't be able to have the same table names w/in the same database, even if it is in a different schema. Plus, it's always best practice to keep Test and Production Data separated.
Take a look at the Utilities Section in the Oracle Documentation for the command options for Export/Import. Or type Exp Help=y or Imp Help=y at the command prompt.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between csar & cdion
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jpkemp
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: csarPosted on 2002-11-18 at 03:46:12ID: 7463417
1. You can export the whole user (if this is what you referenced by schema) with the export utility.
Create your testdata base and the user and import the dmp as the new user (See keywords FROMUSER and TOUSER in the docs if the names do not match).
2. Yes and no. The roles (if you use them) are shared over all schemas. You cannot create a role more than once in a server. I have heard about 9i that there is a virtual server option, but I wouldn't use it to create a test-DB within a production environment. If performance is not too critical I would go for creation of a new DB on the same machine.
3. The manual contain most of the commands with an example about their invocation. The complete sequence of statements you need depends very much on your actual enviroment.