Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: copying datafile nt4-w2k

Re: copying datafile nt4-w2k

From: Jared Still <jkstill_at_cybcon.com>
Date: Sun, 30 Mar 2003 23:58:35 -0800
Message-ID: <F001.00576048.20030330235835@fatcity.com>

This only works if you don't want to rename the database.

Jared

On Sunday 30 March 2003 22:48, GKor_at_rdw.nl wrote:
> i saw this document on Metalink, it is possible to copy everything even
> without creating the controlfiles!!
>
> * goal: How to copy an Oracle database to another machine
> * fact: Oracle Server - Enterprise Edition
> fix: Pre-requisites: The copy is between 2 machines, both have to be on the
> same OS and have to have exactly the same database version installed. 1.
> Make sure the database you want to copy was closed with a SHUTDOWN
> IMMEDIATE, SHUTDOWN NORMAL or SHUTDOWN TRANSACTIONAL. 2. Copy init.ora and
> control files to create instance and be able to go in mount mode. Check the
> init.ora for the locations where the controlfiles have to be, if those
> locations are not valid on the machine put the control files on different
> places and adjust the init.ora accordingly. 3.a. Copy the datafiles (all of
> them). b. Copy the redo-logfiles (all of them). 4.a. (Unix only) Set the
> environment variables: ORACLE_SID - set to the database name you wish to
> create ORACLE_HOME - set to full pathname of the Oracle system home
> directory PATH - needs to include $ORACLE_HOME/bin b. (NT/2000 only) Do
> 'set ORACLE_SID=<SID>' Use oradim to create the service for the instance.
> For more information on oradim please refer to (the part that refers to
> creating a new instance): Note:68720.1 Creating a new 7.3, 8.0, 8.1
> Instance/Database
> <http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=68720.1>5. Use
> servermanager (check the name to use for your version of oracle) or sqlplus
> (version 9i and above) to startup the database in mount mode. Do CONNECT
> INTERNAL/<PASSWORD> then STARTUP MOUNT Then do a rename of the copied
> datafiles if they are not in the same path as on the other machine. For all
> the files that are in the result of the query: SELECT NAME FROM V$DATAFILE;
> do ALTER DATABASE RENAME FILE '<oldfullpath>\<filename>' to <
> newfullpath>\<filename>'; 6. Query the datadictionary for the old location
> of the redolog files using: SELECT MEMBER FROM V$LOGFILE; If the new place
> is not the same as the old do: ALTER DATABASE RENAME FILE
> '<oldfullpath>\<redologfilename>' to & lt;newfullpath>\<redologfilename>';
> 7. Now open the database: ALTER DATBASE OPEN;
>
>
> <<Re: copying datafile nt4-w2k>>


Content-Type: message/rfc822; name="Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description: Re: copying datafile nt4-w2k
----------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Mar 31 2003 - 01:58:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US