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: copy a datafile to a raw device

RE: copy a datafile to a raw device

From: Hemant K Chitale <hkchital_at_singnet.com.sg>
Date: Sun, 22 Jun 2003 03:22:48 -0700
Message-ID: <F001.005B735B.20030622020942@fatcity.com>


Stephen / Gene,

Actually there is no difference between Raw Devices and File Systems when Oracle reads/writes Oracle Blocks. It is the OS interface that is different -- Character-device or Block-device. Most OSs include a header portion in a Raw Device which must be skipped because when Oracle makes read/write calls to the file [ie, the Raw Device] the OS automatically ignores the header. See these Notes on MetaLink

1.  Note 23037.1 on Raw Partitions as Oracle Data Files
2.  Note 45351.1  for Digital Unix  [skip block of 64K]
3.  Note 146384.1 for HP-UX  [skip block of 8K]
4.  Note 153892.1  on how to use RMAN to copy the data
Hemant

At 01:19 PM 19-06-03 -0800, you wrote:

I might expand on this some. If you think about it, any time you store bytes on something, the storing process has to make a note of where it put the bytes; maybe how many bytes it put there; if the bytes are not contiguous, then info about where one set leaves off and where the next set picks up. And on and on ...
I've never worked with Oracle raw devices and am just guessing here, but applying some knowledge about how other forms of storage work, I seems logical that Oracle would have to "format" the raw device and essentially create a sort of proprietary "file system" there. If you just toss some bytes on a raw device and tell Oracle to go get 'em, then I'm guessing Oracle will just say something like: "This might be a raw device, but it ain't no stinkin' ORACLE raw device."
Or, to put it another way: "What's this merde?" (Pardon my French.)

(You have to wonder if there is an error message *something* like this buried down in the Oracle kernel by some irreverent programmer.)
> -----Original Message-----
> From: Stephen Lee
> Sent: Thursday, June 19, 2003 3:27 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: copy a datafile to a raw device
>
>
>
> Well heck. Nobody else has replied, so I might take a stab
> at it here. I
> suspect that the format of the data (bits and bytes) required on a raw
> device is different than the format of the data in a file in
> a file system.
> I'm stretching a bit here, but I think an analogy would be
> what would happen
> if you dd a file from UFS to NTFS. The data on the NTFS
> might be a digital
> copy of what was on UFS, but it's format is totally useless
> in the context
> of NTFS.
>
> > -----Original Message-----
> > From: Gurelei [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 19, 2003 1:55 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: copy a datafile to a raw device
> >
> >
> > hi all:
> >
> > I need to move a SYSTEM datafile from a filesystem
> > to a raw device. I have shutdown the database,
> > copied the file via
> >
> > dd if=system of=/dev/raw
> >
> > renamed the file in the database, but couldn't open
> > the database because of the error: Unknown File Header
> > Version read for file number 1.
> >
> > I tried another dd:
> >
> > dd if=system of=/dev/raw obs=32768 (32K is the db
> > block size), but I got the same error. Can anyone
> > see what else could be wrong with my dd command
> >
> > thanks
> >
> > Gene
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Gurelei
> > INET: [EMAIL PROTECTED]
> >
> > 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: [EMAIL PROTECTED] (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).
> >
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Stephen Lee
> INET: [EMAIL PROTECTED]
>
> 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: [EMAIL PROTECTED] (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).
>

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Stephen Lee
  INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).
Hemant K Chitale
Oracle 9i Database Administrator Certified Professional
My personal web site is :  http://hkchital.tripod.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Hemant K Chitale
 INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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 Sun Jun 22 2003 - 05:22:48 CDT

Original text of this message

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