Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: moving datafiles
muller.brenda_at_primestar.tci.com wrote:
>
> Hi,
>
> Can anyone tell me if there is a way to update the Oracle fixed tables
> to change the name of a datafile? I can't find the real underlying table
> where these names are kept, and even if I knew where it was, I
> wouldn't know how to update it directly.
>
> To clarify, let's say I want to move /oradata1/name01.dbf
> to /oradata01/name01.dbf
>
> I know I need to recreate the control files, but how can I update the
> system DDL?
>
> TIA,
>
> Brenda
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Hi Brenda,
You can change the name of the file with the alter database or alter
tablespace command. The newfile_name has to be present when the rename
is done and the database has to be in mount status not open status.
ex.
start svrmgr or sqldba in line mode.
connect internal
startup mount
alter database rename '/oradata1/name01.dbf' to '/oradata01/name01.dbf';
alter database open
alter database backup controlfile to trace;
The last statement gives you an ascii text file you can edit that shows all the files in your database. You should have this as part of your backup script when you do a cold backup. It insures that you can rebuild the control files incase they are lost.
The above example doesn't require you to rebuild the control files. The alter database rename statement does that for you before you open the database.
You must be sure the new file name is available when this is done.
Hope this helps.
Dick Allie - dallie_at_ionet.net Received on Wed Jun 11 1997 - 00:00:00 CDT
![]() |
![]() |