Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
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)
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.DBF
-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
SQL> select (524296192 - 8192)/1024/1024 from dual;
(524296192-8192)/1024/1024
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.DBF
-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-lReceived on Fri Jan 21 2005 - 13:11:19 CST
![]() |
![]() |