Making database clone (without data)

Posted on 2007-10-17
Last Modified: 2013-12-19
Hi experts,

I am newbie in Oracle administration. I am using Oracle 10g database. I would like to clone database i.e. make an exact copy of tablespaces, tables, indexes, triggers, functions etc but without data.
What is the most efficient way to do it.?

Currently I am doing it in the way that taking sql scripts from 1st database and I am creating users, roles, tablespaces on the second database an than I am importing using dump files schema by schema (taken from 1st database). It takes a lot of time, and there are many errors that appears, so sometimes I need to perform import few times to be sure that I have everything in the new database.

Is there any other faster and more automatic way to have the same result?

Thanks for any advice

Question by:adamgasior
    LVL 47

    Expert Comment

    Use Export/Import or DataPump with

    Author Comment

    I know this, but to use export import, tables and users need to be in the destination database.
    LVL 9

    Expert Comment

    you can create database using Database Configuration Assistant
    it allows you to Manage Templates ... you can create template for creating DB with all you need, you've described
    LVL 47

    Expert Comment

    ----> but to use export import, tables and users need to be in the destination database.


    If you use DATA PUMP (Oracle 10g R2) you have to create only the NONSYSTEM tablespaces.
    Users will be created from DATA PUMP.

    Neither in Export/Import nor in Data Pump you have to create tables!

    Author Comment

    what about trigger, stored fucntions, roles, synonyms,  packages,indexes will they also be created by importing using import dump? (i have oracle 10g2)
    LVL 17

    Expert Comment

    Hi adamgasior,

    Yes, all those database objects will be imported. I've provided a slightly more detailed instruction in one of my previous answer

    The instruction is import and export. The steps for doing the data pump is similar.

    LVL 47

    Accepted Solution

    Of course all DB objects will be created by Export/Import.
    Problems will arise if you change the schema names FROM_USER/TO_USER
    but this is not thge case.
    All will strongly recommend to use DATA PUMP if this is Oracle 10g R2.
    Precreate only the nonsuystem tables.
    Users will be created by Data Pump.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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.

    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…
    From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
    This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

    794 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

    16 Experts available now in Live!

    Get 1:1 Help Now