Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: move datafile from file system to raw device
Try these steps
1. shutdown the database 2. copy file to new location 3. startup mount 4. alter database rename datafile 'old_location' to 'new_location'; 5. alter database open
> >
> > Between steps two and three below, you should change the datafile
name in
> > the controlfile ( via SQL ) before trying to online the thing.
> > Alternatively, you could make the /oracle/u01/datafile/db01t1.dbf
file a
> > symbolic link to /dev/rdisk/xyz.
> >
> > -Kevin
> >
> > "Eric Lam" <eric.lam_at_datacraft-asia.com> wrote in message
> > news:3A815CED.4EED0167_at_datacraft-asia.com...
> > > Hi all,
> > >
> > > Currently we are trying to move a oracle database's datafile from
file
> > > system file to raw device..
> > > it's running oracle 8.1.5 over Digital Unix (v4.0f)
> > >
> > > we managed to do it by skipping the first 64k header of raw device
using
> > > dd.
> > >
> > > but after we dd the file system datafile .. when we try to online
the
> > > tablespace which offlined for dd using the file system datafile,
the
> > > below error occured:
> > >
> > >
> > > SVRMGR> alter tablespace test1 online;
> > > alter tablespace test1 online
> > > *
> > > ORA-01113: file 7 needs media recovery
> > > ORA-01110: data file 7: '/oracle/u01/datafile/db01t1.dbf'
> > >
> > > The overflow:
> > > (1) alter tablespace test1 offline; (test1 is rely only on one
datafile,
> > > db01t1.dbf, file system file)
> > > (2) dd oseek=128 if='/oracle/u01/datafile/db01t1.dbf'
> > > of='/dev/rdisk/xyz'
> > > (3) alter tablespace test1 online; (then the above error occured)
> > >
> > > my question is... why?????
> > >
> > > many thx!
> > >
> We run a database on raw partitions and we just use dd to copy the > partition to a backup file name. When we ran recovery we just > used 'dd' to copy the file back to the raw partition. We did not do > anything about the first 64K of the raw partition. Since recovery > worked I do not understand why you are skipping the first 64k. > -- > Mark D. Powell -- The only advice that counts is the advice that > you follow so follow your own advice -- > > Sent via Deja.com > http://www.deja.com/ >
-- Best regards, Roman Muzykin Sent via Deja.com http://www.deja.com/Received on Wed Feb 07 2001 - 21:27:03 CST