Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

to clone schema

Posted on 2014-04-03
5
Medium Priority
?
471 Views
Last Modified: 2014-04-06
What are the steps to clone a schema..
that means we want to create a clone schema in database in another server.

What are the steps for that?
0
Comment
Question by:tonydba
5 Comments
 
LVL 38

Accepted Solution

by:
Geert Gruwez earned 2000 total points
ID: 39974983
create a directory on the server to contain a dump file (for example d:\dumps)
create the directory in the db
  create directory dumps as 'd:\dumps';

export the schema with expdp using a user with sufficient privs to export a full schema

set oracle_sid=orclsid
expdp dbauser/dbapass schemas=yourschema dumpfile=schema.dmp directory=dumps

copy the file to the other server
create the directory in the dest db

import the dumpfile
impdp dbauser/dbapass schemas=yourschema dumpfile=schema.dmp directory=dumps

see the utilites doc
export schema
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL864

import schema
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#SUTIL895
0
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 39974998
As you used the term "clone" , giving you the link which would give  you cloning steps

For Unix

http://www.dba-oracle.com/oracle_tips_db_copy.htm

For Linux

http://www.oracle-base.com/articles/misc/manually-cloning-an-existing-oracle-db-installation-on-linux.php
0
 
LVL 35

Expert Comment

by:johnsone
ID: 39975006
wasimibm,

Original post is to clone a schema, not a database.  The 2 links that you posted are for cloning an entire database.  By the way, either method would work on both Unix and Linux.
0
 
LVL 15

Expert Comment

by:Devinder Singh Virdi
ID: 39979076
You can use expdp/impdp to take backup of particular schema and import in same/different database as needed. Lets say you want Prod data in Dev environment and schema names are different accross databases. I mean Prod schema name is ProdAppUser and Dev has DevAppUser etc,
When using data pump, you can remap tablespace name, schema names etc, therefore basically you are preparing copy of schema for some use.
0
 

Author Closing Comment

by:tonydba
ID: 39981599
Good solution..
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question