Operating System - HP-UX
1751943 Members
4906 Online
108783 Solutions
New Discussion юеВ

Re: How to copy oracle instance from one hp-ux server to another?

 
Mark Steffes
New Member

How to copy oracle instance from one hp-ux server to another?

We are decommissioning a hp 9000 server at another location. The oracle data and instance has to be moved from this server to another. What is the easiest way to copy/move the oracle instance and data from this old server to our other server. Both servers are hp 9000 k class series. They both are running hp-ux 10.20. And they both have oracle 7.3.4 already installed on them. The target server already has a different oracle instance defined on it which will need to co-exist with the copied instance. Also, how do I determine if I have enough space for the new oracle instance? I really appreciate any help that anyone can give me.
13 REPLIES 13
twang
Honored Contributor

Re: How to copy oracle instance from one hp-ux server to another?

Hi,
Does the instance on the target server has same instance name as the one you want to move?
Does the version of the RDBMS on the target is same as the RDBMS on the source server?
If they have diff instance name and same version, you can simply prepare space for the source instance and then copy the the control files, datafiles and parameter file to the target server.
If you need to change the instance name, you need to recreate the controlfile, if this is the case, you need to issue "alter database backup controfile to trace" to create trace for recreate controlfile.

Good luck!
twang
Steven E. Protter
Exalted Contributor

Re: How to copy oracle instance from one hp-ux server to another?

Bring the database down.

Take a cold backup with the operating systenm.

Copy those files to the new server.

Set up init.ora tnsnames.ora listener.ora and all other control files to the correct location and new instance name.

Bring up the instance.

Its called database cloning.

It does not work 32 bit to 64 bit.

It does now work necessarily between different verions of the database.

It will not work on an oracle designer repository file.

See attachment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: How to copy oracle instance from one hp-ux server to another?

Hi,

since you want to run two instances of your database on the same server, you need to review your parameters (Kernel and Oracle database initialisation - configuration files, control files, archive log files, etc) and startup procedures (listener and database).

Have you considered running only one instance and "moving" the data to that single instance?

In terms of disk space, you can only consider the space taken by the datafiles (since the Oracle installation already exists) and the archived log files that will be generated for by "new" database.

hope this helps!

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

Re: How to copy oracle instance from one hp-ux server to another?

To clone your instance you can copy all the database and initlialization files to the new machine and startup the database.

1.query database for the controlfiles,logfiles,datafiles


SQL>select name from v$datafile;
SQL>select * from controlfile;
SQL>select * from logfile;

Do a consistent shutdown of the database
using "shutdown immediate"

After this move the above datafiles,logfile,controlfile to the new server.Make sure you are moving the files to the //same path// as the old server.

Copy the init.ora to the new server.
copy listener.ora and tnsnames.ora to the new server.
Then you can startup the database.

MAKE SURE THAT YOU BACKUP THE CURRENT SERVER AND DATABASE before any operation.


Thanks
T G Manikandan
Honored Contributor

Re: How to copy oracle instance from one hp-ux server to another?

To determine the space.

check the file size of the datafiles,controlfiles,logfiles using "ls -l"which you had queried.

Then check whether the new server will be able to accomodate.

Thanks




T G Manikandan
Honored Contributor

Re: How to copy oracle instance from one hp-ux server to another?

Also,if u are moving the files to different path on the new machine then

After copying the init.ora to the new server,
1.modify the parameter CONTROL_FILES to reflect any change in path for the controlfile copied database.

2.If you have copied files to the new server to different path that are different from the original server, you must rename the files/logs inside of Oracle.


svrmgrl>startup mount pfile=init.ora

svrmgrl>alter database rename file 'filename' to 'filename'; svrmgrl>alter database open

If you have copied files to the new server that are identical to the original server, you may simply start the database normally
Alexander M. Ermes
Honored Contributor

Re: How to copy oracle instance from one hp-ux server to another?

Hi there.
Question ( a little bit off your point ) :

Why not upgrade to HP-UX 11.00 64-bit ?
K-class should be capable.
That should also include a database upgrade to 8.1.7.4

A different approach to your problem is to export the data from the old server,
create a new database on the econd server
and import the data to this. This way all extents can be compressed and you can spread
the database files just the way you want for better performance.

Rgds
Alexander M. Ermes
.. 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: How to copy oracle instance from one hp-ux server to another?

hi again,

just in case you chose to upgrade to 8.1.7.4, and convert to Locally managed tablespaces, you will benefit from the following advantages:

o no fragmentation
o faster (no recursive sql to UET$ and FET$ to update the data dictionary)
o faster (try creating a dictionary managed table with 1000 extents, then do it with a LMT)
o faster (try dropping that table with 1000 extents now)
o faster (try a temporary tablespace in a DMT vs LMT -- benchmark it, its amazing)

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

Re: How to copy oracle instance from one hp-ux server to another?

> We are decommissioning a hp 9000 server at another location.
> The oracle data and instance has to be moved from this server to another.

Physically move the storage and reconnect?
"Never underestimate the bandwith of a truck full of disks"

> What is the easiest way to copy/move the oracle instance and data from this old server to our other server.

Books have been written on this subject. Read one or two!. I'm suprprised noone mentioned this before, but the PROPER way, the one ture method, is to EXPORT and re-IMPORT the database. As a side benefit you can readily move oracle versions and even OS platforms that way.

The easiest way move a DB is admittedly, as others pointed out, to move all physical files.
To find all files, check out the SQLplus command: ALTER DATABASE BACKUP CONTROLFILE TO (filename|TRACE), or try the script below.
TO re-integrate the files once moved, notably when they changed mounpoint/directory names, check out the "CREATE CONTROLFILE" command in that backup, and modify to match new environment, keeping the order in place.

> And they both have oracle 7.3.4 already installed on them.

Way old stuff. You are missing out on a lot of goodies, and notably support. Consider upgrading while the DB is down for moving

> how do I determine if I have enough space for the new oracle instance?

On disk? List size for file mentioned in control file backup or from procedure below.
In memory? SHOW SGA (select * from v$sga).

Good luck,

column Tablespace format a15
column file format a45
column id format 99

set pages 9999
set feedback off
select 'redo_'||l.group# "Tablespace", l.group# "Id", l.bytes/(1024*1024) "MB",
MEMBER "File" from v$logfile f, v$log l where l.group# = f.group#
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_data_files
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_temp_files
union
select 'Control file' "Tablespace", rownum "Id", 0 "MB",
name "File" from v$controlfile
order by 1
/