Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up a duplicate Oracle 7 database

kenny chia
Regular Advisor

Setting up a duplicate Oracle 7 database

Hi
I need to setup a duplicate oracle instance/database on another server. I'm currently using Oracle7 and HPUX10.20

A physical file copy of the database from the source to the destination server is impossible as the source server runs 24 hours a day. A database export is done daily.

The same version of Oracle7 is already installed on the destination server

This is my rough plan so far..
1) Copied the initSID.ora, tnsnames.ora and listener.ora to the destination server
2) edit /etc/oratab
3) Copied the dump files into a temporary directory in the destination server

My next step will be to recreate the database again using SQL. Is this correct? Or will my dump files automatically recreate the database?

After recreating the database, my next step will be to import the dump files?

Thanks
All Your Bases Are Belong To Us!
7 REPLIES
Jean-Luc Oudart
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

You can clone your database.

see this thread :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2a7eef70e827d711abdc0090277a778c,00.html

Rgds,
Jean-Luc
fiat lux
Alexander M. Ermes
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

 
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Yogeeraj_1
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

hi,

A full imp should be imported into a "clean" database. It imports everything -- SYSTEM owned objects and all. It cannot be used to overwrite an existing database with its data.

You should only simply create a minimal database to import fully into.

hope this helps too!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Brian Crabtree
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

Provided that your database is in archivelog mode, you can do a file copy over from one system to another. Depending on the size and the speed of your network, you can either put the full database into backup mode and copy all of datafiles over from one to another, copy them to a staging location, or put each tablespace/datafile in and out of backup mode one at a time, and copy it over.

When you are complete, make sure your source database is completely out of backup mode (check v$backup) and copy all logfiles from the start to the end of the backup period to the secondary server, and roll the database forward. Dont forget to get a backup copy of the controlfile (alter database backup controlfile to 'file' or trace).

If you have questions, please post them back.

Thanks,

brian
malay boy
Trusted Contributor

Re: Setting up a duplicate Oracle 7 database

wow!!!! 7 database thats something.

The best way is cold backup.

My suggestion is a hotbackup not export/import.

During the import,you need to recreate the datafile and tablespace at least a big as the original database.(I think I done this long-long time ago)

But I still think cold backup is the best way.

anyway this how do I duplicate using coldbackup:

1) copy the data to the new location - without control file.
2) create a file to recreate the control file.see the attachment :
3) everything in place
do svrmgrl> startup nomount
svrmgrl> @rcfDWH6
svrmgrl> alter database open resetlogs;

Now you have the new database with different SID.
Make sure you changes the file rcfDWH6.sql

regards
mB


There are three person in my team-Me ,myself and I.
Indira Aramandla
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

Hi,

From the steps that you have planned, this is what you need to do next.

1. You have already installed Oracle7 on the target server.

2. You have copied the init.ora file on to the target server.
Check that the control file parameter specified in the init.ora file has the same path on the target system and oracle account should have privilage to write to.
Check the udump and bdump paramenets in the init.ora file and see the path on the target server and oracle account should have privilage to write to.

2. You need to create a base database as oracle before you can import into from the export dump files.
Use the attached script as the base DB creation script, Chnage the sid name, system dbf file path and name and redo logs names and path according to your system.
Then execute the following script to create the base tablespaces (ROLLBACK SEGMENT, TEMP, USERS, TOOLS)

3. Then run the following scripts as oracle. This will build you data dictionary
$ORACLE_HOME//rdbms/admin/catalog.sql
$ORACLE_HOME/rdbms/admin/catdbsyn.sql
$ORACLE_HOME/rdbms/admin/catproc.sql
$ORACLE_HOME/sqlplus/admin/pupbld.sql

4. Check the schema (table_owner)and other users in your source database and the default tablespace of these users. Then you have to create these users and assign the default tablespace to them.

5. Now you can import the tables and data from the exprot dump files.

6. You have copied the tnsnames.ora and listener.ora to the destination server. Make sure the host name in the files is reflecting to the target host name.

I hope this helps. I had tested this many times on oracle 7.
Never give up, Keep Trying
Indira Aramandla
Honored Contributor

Re: Setting up a duplicate Oracle 7 database

Forgot the other script attachment.
Never give up, Keep Trying