Home > Ask the Oracle Database / Applications Experts > Oracle database design and architecture Questions & Answers > Steps for copying a database or schema
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Steps for copying a database or schema

Brian Peasland1 EXPERT RESPONSE FROM: Brian Peasland1

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 21 April 2004
We have a Windows XP PC with Oracle8i running on it. I want to install the same database or schema on our Unix Server. I have taken a cold backup and an export dump. How do I do this?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
The export utility
Copying database structure without data
Clone database with exp/imp on Linux
Creating a backup of a table that contains a LONG type field
Performing incremental exports
Using 'consistent=y' in exports
Backing up tablespace without exp80 and imp80
Code to back up a tablespace

Oracle database backup and recovery
Can I perform an Oracle server backup through a client machine?
How to execute DML in an Oracle trigger with EXECUTE IMMEDIATE
How to restore a dump file with the Oracle SHOW=Y option
Why do I get an Oracle not available error with Oracle 8i on Windows?
How to perform Oracle database recovery with a corrupt online redo log
Can I create an Oracle Catalog Database with the Enterprise Console?
Do I need to recreate views after an Oracle table reorg?
Client-based apps vs. web-based apps in Developer 2000
How to perform an Oracle 8i to 10g migration
Can I move the tablespace online with missing datafiles in Oracle?

Oracle database design and architecture
Why am I receiving Oracle memory allocation errors?
How to join two tables with unique keys in Oracle
How does the Oracle LGWR write to online redo log files?
Can I check an Oracle instance without logging into the Oracle server?
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


Your cold backup of an Oracle database running on a Windows platform cannot be used to create a copy on the Unix platform. You will have to resort to Oracle's export and import utilities. (Note: Oracle10g does add cross platform Transportable Tablespaces and the Data Pump utilities, but you are running 8i so I won't discuss those here.) Oracle's export/import utilities are the tools of choice to move your data to a different platform.

Copying a database

If you want to copy the entire database, the basic steps are as follows:

1. Perform a full export:

    exp userid=system/manager file=my_db.dmp log=my_db.log full=y
The FULL=Y parameter forces a full database export. I also make sure to log the output of my export utility to a log file. It becomes a handy reference.

2. FTP the dump file (and log file) to the destination server. Make sure that you FTP in binary mode!

3. Precreate a new database on the destination server.

4. Precreate the tablespaces on the new database to match the same tablespace names of your source database.

5. Import the full database:

    imp userid=system/manager file=my_db.dmp log=imp.log full=y
Again, log the output to a file in case there are errors.

Copying a schema

If you only want to copy a schema to the new server, things are basically the same.

1. Perform a schema export:

    exp userid=system/manager file=my_db.dmp log=my_db.log owner=SCOTT
The OWNER parameter exports a schema. In my example, that would be the SCOTT schema. Again, I also make sure to log the output of my export utility to a log file.

2. FTP the dump file (and log file) to the destination server. Make sure that you FTP in binary mode!

3. Precreate a new database on the destination server.

4. Precreate the tablespaces on the new database to match the same tablespace names of your source database.

5. Precreate the user in that database.

6. Import the dump file:

    imp userid=system/manager file=my_db.dmp log=imp.log fromuser=SCOTT
Again, log the output to a file in case there are errors. The FROMUSER clause tells imp which schema to import. If you wish to change the objects to a new owner, use the TOUSER clause as well.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts