Solved

to clone schema

Posted on 2014-04-03
5
460 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 36

Accepted Solution

by:
Geert Gruwez earned 500 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 34

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now