Solved

to clone schema

Posted on 2014-04-03
5
465 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 37

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

832 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