Q

Creating a test copy of a production database

Can you let me know the steps to copy an Oracle 9i database from Sun Solaris 8 to Windows 2003? We'd like to make an exact copy of our production database for testing. Before I go ahead and create a database, I'd like to know how I can create all the tablespaces exactly the same.

Please, can you let me know the steps to copy an Oracle 9i database from Sun Solaris 8 to Windows 2003? We'd like to make an exact copy of our production database for testing on a Windows 2003 box.

I already installed the software. Before I go ahead and create a database, I'd like to know how I can create all the tablespaces exactly the same. Then I can do the full export/import of data. Thanks.

You have already installed your Oracle software. Now use the Database Configuration Assistant to create the new database. In your old database, query the tablespaces you will need to create:
SELECT t.tablespace_name,SUM(f.bytes) as BYTES FROM dba_tablespaces t, 
dba_data_files f WHERE t.tablespace_name=f.tablespace_name
GROUP BY t.tablespace_name ORDER BY 1;
After you have created your tablespaces, you are ready to move your data. Perform a full export of your source database as follows:
exp userid=system/manager file=my_full_db.dmp full=y
FTP the dump file in binary mode to your destination server, then import the entire dump file as follows:
imp userid=system/manager file=my_full_db.dmp full=y
This was first published in October 2005

Dig deeper on Oracle database backup and recovery

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close