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: RE: (NEW) very interesting thing about migrate db from different OS(oracle 9.2.0.4,not 10G)

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

From: biti_rainy <biti_rainy_at_itpub.net>
Date: Sat, 22 Jan 2005 02:01:52 +0800
Message-Id: <20050121180205.79D4972C32D@turing.freelists.org>


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_at_hotmail.com
a dba from alibaba(china)

        


--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 21 2005 - 13:10:48 CST

Original text of this message

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