系統管理
1822395 會員
2963 線上
109642 解決方案
發表新文章

關於big-endian and little-endian一問

 
watermelonyu
教授

關於big-endian and little-endian一問

HPUX is big-endian

Tru64 UNIX is little-endian

example

Big Endian:

byte0 byte1 byte2 byte3

J O E Y



Little Endian:

byte3 byte2 byte1 byte0

Y E O J

如果我透過nfs or ftp方式將這個檔案從hpux傳到tru64 的話,為什麼這的檔案還是可以被開啟呢?而且資料內容不變

請問

為什麼檔案會從Big Endian轉成Little Endian
7則回覆 7
watermelonyu
教授

關於big-endian and little-endian一問

Hi :

Look at the protocol stack of NFS service, we can find which is build up as RPC/XDR/NFS. XDR is eXternal Data Representatiol which is keeping the portable across different machine.



For more detail please reference RFC1094.



Brief from RFC 1094 as :

The Sun Network Filesystem (NFS) protocol provides transparent remote

access to shared files across networks. The NFS protocol is designed

to be portable across different machines, operating systems, network

architectures, and transport protocols. This portability is achieved

through the use of Remote Procedure Call (RPC) primitives built on

top of an eXternal Data Representation (XDR).



.

..

watermelonyu
教授

關於big-endian and little-endian一問

那如果我將oracle datafile用nfs從hpux複製到tru64,理論上應該也是會轉成little endian囉

但實際上卻是不work的

請問有其它方式來轉嗎

這樣即使跨平台我的datafile一樣可以共用

watermelonyu
教授

關於big-endian and little-endian一問

if your oracle version is 10g, for cross

platform, you have to use RMAN CONVERT option

to convert tablespace datafile formats to be

transported across different platforms.



http://www.dba-oracle.com/art_dbazine_ault_cross_plat.htm
watermelonyu
教授

關於big-endian and little-endian一問

Joey,



即使跨平台我的datafile一樣可以共用

>>> 不太清楚你的目的???



可以說明一下你的實際做法, 和 Oracle 的版本嗎?



不同的 Oracle 版本方法都不同喔



Eric

watermelonyu
教授

關於big-endian and little-endian一問

我的目的就是直接將datafile複製到另外一個平台,直接open db

因為跨平台移植只能用export import

rman 又不能用,這樣downtime必須很久

oracle9i on 9000/800/S16K-A 要移到 oracle 9i IA64(HPUX or Liunx)



watermelonyu
教授

關於big-endian and little-endian一問

if HPUX <-> HPUX



On original node:

1. Add new disk or LUN into datafile vg

2. before disk/volume sync, let db enable

  online backup mode(archive mode)

3. start disk/volume sync

4. split datafile and archive log disk(new)

  from vg



On new node:

5. mount disk/volume from new node

6. start and recover db from archive logs
watermelonyu
教授

關於big-endian and little-endian一問

Hi :



Just learn from Oracle expert as follows,



Hi,



FYR..





When doing cross-platform transportable tablespaces, you can copy the datafiles directly if

their Endian formats are the same. If the Endian formats are different, you must use RMAN to

convert the datafiles before importing them to the target database. The V$TRANSPORATABLE_

PLATFORM view shows Endian format for each platform.





SQL> select platform_id, platform_name, endian_format

2 from v$transportable_platform

3 order by platform_name

SQL> /

PLATFORM_ID PLATFORM_NAME ENDIAN

----------- ----------------------------------- ----------

6 AIX-Based Systems (64-bit) Big

16 Apple Mac OS Big

15 HP Open VMS Little

5 HP Tru64 UNIX Little

3 HP-UX (64-bit) Big

4 HP-UX IA (64-bit) Big

9 IBM zSeries Based Linux Big

13 Linux 64-bit for AMD Little

10 Linux IA (32-bit) Little

11 Linux IA (64-bit) Little

12 Microsoft Windows 64-bit for AMD Little

7 Microsoft Windows IA (32-bit) Little

8 Microsoft Windows IA (64-bit) Little

1 Solaris OE (32-bit) Big

2 Solaris OE (64-bit) Big

15 rows selected.

SQL>

The V$DATABASE includes two new columns, PLATFORM_ID and PLATFORM_NAME.



--

Alex