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 -> error creating database from template ( NT/9.0.1 to linux/9.2.0.1 .0)

error creating database from template ( NT/9.0.1 to linux/9.2.0.1 .0)

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Fri, 4 Apr 2003 16:22:54 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA70383CA47@lnewton.leeds.lfs.co.uk>


Hi Hemal,

Oops !

You cannot edit the filenames in the dump file, but you can pre-create the tablespaces using different named files - as I mentioned in my last post.

On the other hand, if the database is up and running with all these
'funny' named files, then you can 'do the dba thing' and rename them.
There are a number of ways to do this but I prefer to take the system off line first and do it that way. However, for a play system (!) you can just leave then as is and not worry about them. But, if you must rename them :

first backup your control file - just in case.

login as system and
alter database backup controlfile to trace;

That will create a *.trc file in the USER_DUMP_DEST location. Find it, rename it to controlfile.sql and put it somewhere safe for now !

Next shutdown the database. Do a clean shutdown, not an abort - just in case.

Now go to where the files live and rename them using the 'mv' command

mv "ORA_HOME/dbs/d:whatever.dbf" whatever.dbf ...

That takes care of renaming the datafiles and possibly redolog files as well.
If you have to rename the controlfiles, do so and read on.

Edit the initSID.ora file and change the controlfile names parameter to reflect the new names of the controlfiles - if you did actually rename them.

'startup mount' the database. If you do startup, it won't work and might
well bollox the whole thing up - I've done this once, so I know :o)

now, for each and every file you renamed, run the following command :

alter database rename file 'ORA_HOME/dbs/d:whatever.dbf' to
'full_path_to_oracle_home/dbs/whatever.dbf';

repeat until all are done.

Now 'alter database open' and it should 'just work'.

If it doesn't, get back to me :o)

Cheers,
Norman.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------
Received on Fri Apr 04 2003 - 09:22:54 CST

Original text of this message

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