Re: RE: (NEW) very interesting thing about migrate db from different OS(oracle 9.2.0.4,not 10G)

  • From: "biti_rainy" <biti_rainy@xxxxxxxxx>
  • To: "CMarquez@xxxxxxxx" <CMarquez@xxxxxxxx>, "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 22 Jan 2005 02:02:20 +0800

hi,Marquez, Chris

  
the  first  os  block of the  datafile  include   platform and db version 
(magical number)/ file blocks / block size/ chkval
when  the  file  size  changed,the  chkval  changed,and , the  same  file size 
datafiles has the  same  chkval.

there are  magic  numbers  for  paltform and  db  version, 

oracle  920:
 windows:  6C6D 6A6B
 
linux :5c5d 5a5b            ------  little  endian

oracle  8.0.4  for  solaris 5.6 :  5a5b 5c5d     -------  big endian





i  did  a  test,it  looks that  with same  db version and  os and same  file 
size,the  first block are the  same *block* :


D:\oracle\ora92\rainy>dd if=users01.dbf bs=8192 count=1|od -x
0000000000 0000 0000 2000 0000 FA00 0000 6C6D 6A6B
0000000020 DC06 0000 0000 0000 0000 0000 0000 0000
0000000040 0000 0000 0000 0000 0000 0000 0000 0000
1+0 records in
1+0 records out
*
0000020000

D:\oracle\ora92\rainy>ls -l
total 2559363
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:01 CONTROL01.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:01 CONTROL02.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:01 CONTROL03.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 26222592 Jan 21 21:01 INDX01.DBF
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 20:58 REDO01.LOG
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 21:01 REDO02.LOG
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 20:58 REDO03.LOG
-rwxrwxrwa 1 Administrators SYSTEM 262152192 Jan 21 21:01 SYSTEM01.D
BF
-rwxrwxrwa 1 Administrators SYSTEM 41951232 Jun 8 2004 TEMP01.DBF
-rwxrwxrwa 1 Administrators SYSTEM 209723392 Jan 21 21:01 TOOLS01.DB
F
-rwxrwxrwa 1 Administrators SYSTEM 209723392 Jan 21 21:01 UNDOTBS01.
DBF
-rwxrwxrwa 1 Administrators SYSTEM 524296192 Jan 21 21:01 USERS01.DB
F
-rwxrwxrwa 1 hz None 8192 Jan 20 14:16 tmp
-rwxrwxrwa 1 hz None 8192 Jan 20 14:17 tmp1
-rwxrwxrwa 1 hz None 8192 Jan 20 14:19 tmp2

D:\oracle\ora92\rainy>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Fri Jan 21 20:14:22 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 101784276 bytes
Fixed Size 453332 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> select 524296192/1024/1024 from dual;

524296192/1024/1024
-------------------
500.007813

SQL> select (524296192 - 8192)/1024/1024 from dual;

(524296192-8192)/1024/1024
--------------------------
500

SQL> !pwd
SP2-0042: unknown command "!pwd" - rest of line ignored.
SQL> host pwd
D:/oracle/ora92/rainy

SQL> alter database datafile 'D:/oracle/ora92/rainy/tools01.dbf' resize 500m;

Database altered.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

D:\oracle\ora92\rainy>ls -l
total 3173763
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:16 CONTROL01.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:16 CONTROL02.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 1613824 Jan 21 21:16 CONTROL03.CT
L
-rwxrwxrwa 1 Administrators SYSTEM 26222592 Jan 21 21:01 INDX01.DBF
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 21:14 REDO01.LOG
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 21:14 REDO02.LOG
-rwxrwxrwa 1 Administrators SYSTEM 10486272 Jan 21 21:14 REDO03.LOG
-rwxrwxrwa 1 Administrators SYSTEM 262152192 Jan 21 21:01 SYSTEM01.D
BF
-rwxrwxrwa 1 Administrators SYSTEM 41951232 Jun 8 2004 TEMP01.DBF
-rwxrwxrwa 1 Administrators SYSTEM 524296192 Jan 21 21:16 TOOLS01.DB
F
-rwxrwxrwa 1 Administrators SYSTEM 209723392 Jan 21 21:01 UNDOTBS01.
DBF
-rwxrwxrwa 1 Administrators SYSTEM 524296192 Jan 21 21:01 USERS01.DB
F
-rwxrwxrwa 1 hz None 8192 Jan 20 14:16 tmp
-rwxrwxrwa 1 hz None 8192 Jan 20 14:17 tmp1
-rwxrwxrwa 1 hz None 8192 Jan 20 14:19 tmp2

D:\oracle\ora92\rainy>dd if=users01.dbf bs=8192 count=1|od -x
0000000000 0000 0000 2000 0000 FA00 0000 6C6D 6A6B
0000000020 DC06 0000 0000 0000 0000 0000 0000 0000
0000000040 0000 0000 0000 0000 0000 0000 0000 0000
1+0 records in
1+0 records out
*
0000020000

D:\oracle\ora92\rainy>dd if=tools01.dbf bs=8192 count=1|od -x
0000000000 0000 0000 2000 0000 FA00 0000 6C6D 6A6B
0000000020 DC06 0000 0000 0000 0000 0000 0000 0000
0000000040 0000 0000 0000 0000 0000 0000 0000 0000
1+0 records in
1+0 records out
*
0000020000

D:\oracle\ora92\rainy>









Best regards

msn: biti_rainy@xxxxxxxxxxx
a dba from alibaba(china)

---- from the  mail-----
>
>I personal don't have  first hand experience wih this but...
>a while back on another list there was a long thread on the very
>subject.
>
>Seems it all has mostly to do with  "Little Endian" vs. "Big Endian".
>http://www.webopedia.com/TERM/b/big_endian.html
>
>Once of the dba's on the list promised that he regularly moved (copied)=20
>his Oracle database on windows x86 (NTFS?) to Red Hat Linux x86 (EXT3?).
>
>I never got the time to try it.
>
>I do remember that several people on the list (smarter than I) explained
>clearly that=20
>it was NOT the file system type that makes the difference but "Little
>Endian" vs. "Big Endian" issue.
>
>hth
>
>Chris Marquez
>Oracle DBA
>HEYMONitor(tm) - heymonitor.com
>"Oracle Monitoring & Alerting Solution"
>
>
>
>-----Original Message-----
>From: oracle-l-bounce@xxxxxxxxxxxxx
>[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of biti_rainy
>Sent: Thursday, January 20, 2005 1:24 AM
>To: oracle-l
>Subject: (NEW) very interesting thing about migrate db from different
>OS(oracle 9.2.0.4,not 10G)
>
>
>hi,all
>
>we  find a  very  interesting thing:
>
>we  copy the  WINDOWS2000  datafile  to linux (they  have  the  same
>byte  order)
>
>and , dd a  linux  datafile header to  cover the  windows datafile
>header(the  header  block  is not  include in  dba_data_files),the
>block  is  not  seem in  database ,it  is  for  OS. ls -l  can  see
>,the  datafile  size  is  bigger than  dba_data_files for  one  oracle
>block.
>
>
>when  we  change  the  OS  file  header,we  can  create  controlfile and
>open  the  database ,and  we  can  query /create table ... etc.
>
>
>the  db  version  is  oracle9204,not  10g.  and  someone  told  me that
>he  can copy  the datafile from windows and solaris for  x86 pc   to
>linux , and  not  change  the  header  with  oracle8i.
>
>is  there someone  can  discuss it?
> =20
>
>Best regards
>msn: biti_rainy@xxxxxxxxxxx
>a dba from alibaba(china)
>
>
>--
>//www.freelists.org/webpage/oracle-l
>--
>//www.freelists.org/webpage/oracle-l
>
>.


        


--
//www.freelists.org/webpage/oracle-l

Other related posts: