分享
 
 
 

关于Oracle10g跨平台传输表空间

王朝oracle·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

1.准备工作:

查询源数据库平台信息

SQL col platform_name for a40

SQL SELECT d.PLATFORM_NAME, ENDIAN_FORMAT

2 FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d

3 WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;

PLATFORM_NAME ENDIAN_FORMAT

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

Solaris[tm] OE (64-bit) Big

查询目标数据库平台信息

SQL col platform_name for a40

SQL SELECT d.PLATFORM_NAME, ENDIAN_FORMAT

2 FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d

3 WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;

PLATFORM_NAME ENDIAN_FORMAT

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

Microsoft Windows IA (32-bit) Little

查询Oracle10g支持的平台转换

代码:--------------------------------------------------------------------------------

SQL select * from

v$transportable_platform;

PLATFORM_ID PLATFORM_NAME

ENDIAN_FORMAT

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

1 Solaris[tm] OE (32-bit)

Big

2 Solaris[tm] OE (64-bit)

Big

7 Microsoft Windows IA (32-bit)

Little

10 Linux IA (32-bit)

Little

6 AIX-Based Systems (64-bit)

Big

3 HP-UX (64-bit)

Big

5 HP Tru64 UNIX

Little

4 HP-UX IA (64-bit)

Big

11 Linux IA (64-bit)

Little

15 HP Open VMS

Little

8 Microsoft Windows IA (64-bit)

Little

PLATFORM_ID PLATFORM_NAME

ENDIAN_FORMAT

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

9 IBM zSeries Based Linux

Big

13 Linux 64-bit for AMD

Little

16 Apple Mac OS

Big

12 Microsoft Windows 64-bit for AMD

Little

2.创建一个独立的自包含表空间

用于测试.

代码:--------------------------------------------------------------------------------

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Tue Apr 27 14:04:08 2004

Copyright (c) 1982, 2004, Oracle.

All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL select name from v$datafile;

NAME

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

/opt/oracle/oradata/eygle/system01.dbf

/opt/oracle/oradata/eygle/undotbs01.dbf

/opt/oracle/oradata/eygle/sysaux01.dbf

/opt/oracle/oradata/eygle/users01.dbf

/data1/oradata/systemfile/eygle01.dbf

/opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_test_03xv34ny_.dbf

/opt/oracle/oradata/eygle/EYGLE/datafile/o1_mf_itpub_03xv5g66_.dbf

7 rows selected.

SQL create tablespace trans

2

datafile '/data1/oradata/systemfile/trans01.dbf'

3

size 10M;

Tablespace created.

SQL create user trans identified by trans

2

default tablespace trans;

User created.

SQL grant connect,resource to trans;

Grant succeeded.

SQL connect trans/trans

Connected.

SQL create table test as select * from user_objects;

Table created.

SQL select

count(*) from test;

COUNT(*)

----------

1

SQL select * from test;

OBJECT_NAME

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

SUBOBJECT_NAME

OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE

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

CREATED

LAST_DDL_TIM TIMESTAMP

STATUS

T G S

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

TEST

15604

15604 TABLE

27-APR-04

27-APR-04

2004-04-27:14:05:42 VALID

N N N

SQL exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Dat

3.导出要传输的表空间

$ pwd

/opt/oracle

$ cd dpdata

$ ls

$ expdp eygle/eygle dumpfile=trans.dmp directory=dpdata transport_tablespace=trans

LRM-00101: unknown parameter name 'transport_tablespace'

$ expdp eygle/eygle dumpfile=trans.dmp directory=dpdata TRANSPORT_TABLESPACES=trans

Export: Release 10.1.0.2.0 - 64bit Production on Tuesday, 27 April, 2004 14:07

Copyright (c) 2003, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

Starting "EYGLE"."SYS_EXPORT_TRANSPORTABLE_01": eygle/******** dumpfile=trans.dmp directory=dpdata TRANSPORT_TABLESPACES=trans

ORA-39123: Data Pump transportable tablespace job aborted

ORA-29335: tablespace 'TRANS' is not read only

Job "EYGLE"."SYS_EXPORT_TRANSPORTABLE_01" stopped due to fatal error at 14:08

注意:传输表空间必须置为只读状态

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Tue Apr 27 14:08:13 2004

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL alter tablespace trans read only;

Tablespace altered.

SQL exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

$ expdp eygle/eygle dumpfile=trans.dmp directory=dpdata TRANSPORT_TABLESPACES=trans

Export: Release 10.1.0.2.0 - 64bit Production on Tuesday, 27 April, 2004 14:08

Copyright (c) 2003, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

Starting "EYGLE"."SYS_EXPORT_TRANSPORTABLE_01": eygle/******** dumpfile=trans.dmp directory=dpdata TRANSPORT_TABLESPACES=trans

Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK

Processing object type TRANSPORTABLE_EXPORT/TABLE

Processing object type TRANSPORTABLE_EXPORT/TTE_POSTINST/PLUGTS_BLK

Master table "EYGLE"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for EYGLE.SYS_EXPORT_TRANSPORTABLE_01 is:

/opt/oracle/dpdata/trans.dmp

Job "EYGLE"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 14:09

4.使用rman转换文件格式

$ rman target /

Recovery Manager: Release 10.1.0.2.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle. All rights reserved.

connected to target database: EYGLE (DBID=1337390772)

RMAN convert tablespace trans

2 to platform 'Microsoft Windows IA (32-bit)'

3

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有