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

Home -> Community -> Usenet -> c.d.o.server -> Re: Attach a database in Oracle 10g

Re: Attach a database in Oracle 10g

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Fri, 10 Dec 2004 13:07:45 +1100
Message-ID: <41b904ef$0$1078$afc38c87@news.optusnet.com.au>


In case it helps, I've just "transferred" a 9i database from deep within an E: drive to the root of the E: drive. Here's how:

SQL> shutdown immediate
SQL> exit

C:\> copy e:\orant\oradata\orcl\* e:\
C:\> copy e:\orant\oradata\database\initorcl.ora e:\initneworcl.ora

[edit the new init.ora so it points to control files in the E:\ directory, the DB_NAME parameter is also changed)

C:\> oradim -NEW -SID NEWORCL -PFILE e:\initneworcl.ora -INTPWD newdiz -STARTMODE auto

C:\> set ORACLE_SID=NEWORCL

C:\> sqlplus "sys/newdiz as sysdba"

SQL> startup mount force pfile=e:\initneworcl.ora

And at this point, I got an error about the control file's stored database name not being 'NEWORCL' -quite right too. I couldn't continue my example at this point, because I'm doing it on a single laptop, but you hopefully get the idea. Provided you're not changing the database name, the steps here should get you sorted.

Regards
HJR Received on Thu Dec 09 2004 - 20:07:45 CST

Original text of this message

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