Solved

to clone schema

Posted on 2014-04-03
5
469 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 38

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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

623 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