Chinaunix首页 | 论坛 | 博客
  • 博客访问: 537035
  • 博文数量: 154
  • 博客积分: 4055
  • 博客等级: 上校
  • 技术积分: 1381
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-01 14:26
文章分类

全部博文(154)

文章存档

2014年(2)

2013年(2)

2011年(2)

2010年(11)

2009年(9)

2008年(35)

2007年(22)

2006年(71)

我的朋友

分类: Oracle

2007-06-26 18:10:01

好不容易找回来了,感觉还不如从新做一次,不过回来了,呵呵
最近实在是很忙,已经俩月没有写blog了,很惭愧哦,今天测试了一下aix  64位系统表空间传输到window 32位的测试(中间涉及到了字符集的问题)
SQL> select PLATFORM_ID,PLATFORM_NAME from v$database;
PLATFORM_ID PLATFORM_NAME
----------- --------------------------------------------------
          6 AIX-Based Systems (64-bit)
 
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
          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
         17 Solaris Operating System (x86)                     Little
         18 IBM Power Based Linux                              Big
 
17 rows selected.
$ expdp dsg/dsg dumpfile=zl_space.dmp logfile=zl_space.log transport_full_check=y transport_tablespaces=zl_spac>
 
Export: Release 10.2.0.1.0 - 64bit Production on Wednesday, 30 May, 2007 9:15:37
 
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning and Data Mining options
Starting "DSG"."SYS_EXPORT_TRANSPORTABLE_01":  dsg/******** dumpfile=zl_space.dmp logfile=zl_space.log transport_full_check=y transport_tablespaces=zl_space
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "DSG"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for DSG.SYS_EXPORT_TRANSPORTABLE_01 is:
  /templv/fjun/10g/zl_space.dmp
Job "DSG"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 09:16:09
$ rman target /
 
Recovery Manager: Release 10.2.0.1.0 - Production on Wed May 30 09:18:00 2007
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
connected to target database: DB01 (DBID=1206909612)
RMAN> convert tablespace zl_space
2>  to platform 'Microsoft Windows IA (32-bit)'
3> format '/oracle10/%U';
 
Starting backup at 30-MAY-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00010 name=/templv/test10g/t.dbf
converted datafile=/oracle10/data_D-DB01_I-1206909612_TS-ZL_SPACE_FNO-10_05ij0p4f
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:02:08
Finished backup at 30-MAY-07
把数据ftp过来
D:\oracle>rman target /
恢复管理器: Release 10.2.0.1.0 - Production on 星期三 5月 30 09:48:04 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
连接到目标数据库: DB10 (DBID=1194334551)
RMAN>  CONVERT DATAFILE 'd:\oracle\data_D-DB01_I-1206909612_TS-ZL_SPACE_FNO-10_05ij0p4f'
2> DB_FILE_NAME_CONVERT
3> 'd:\oracle\data_D-DB01_I-1206909612_TS-ZL_SPACE_FNO-10_05ij0p4f','D:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10\zl_space.dbf'
;
启动 backup 于 30-5月 -07
使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: sid=147 devtype=DISK
通道 ORA_DISK_1: 启动数据文件转换
输出文件名=D:\ORACLE\DATA_D-DB01_I-1206909612_TS-ZL_SPACE_FNO-10_05IJ0P4F
已转换的数据文件 = D:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10\ZL_SPACE.DBF
通道 ORA_DISK_1: 数据文件转换完毕, 经过时间: 00:01:37
完成 backup 于 30-5月 -07
RMAN>
开始导入,晕
D:\oracle>impdp sa/sa dumpfile=zl_space.dmp directory=zl_space_dir transport_datafiles='D:\ORACLE\PRODUCT\10.2.0\ORADATA
\DB10\ZL_SPACE.DBF'
Import: Release 10.2.0.1.0 - Production on 星期三, 30 5月, 2007 9:56:19
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已成功加载/卸载了主表 "SA"."SYS_IMPORT_TRANSPORTABLE_01"
启动 "SA"."SYS_IMPORT_TRANSPORTABLE_01":  sa/******** dumpfile=zl_space.dmp directory=zl_space_dir transport_datafiles='
D:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10\ZL_SPACE.DBF'
处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
ORA-39123: 数据泵可传输的表空间作业中止
ORA-29345: 无法使用不兼容的字符集将表空间插入到数据库中
作业 "SA"."SYS_IMPORT_TRANSPORTABLE_01" 因致命错误于 09:56:23 停止
SQL> select * from nls_database_parameters;
 
PARAMETER                      VALUE
------------------------------ ------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               AL32UTF8
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              10.2.0.1.0
NLS_CSMIG_SCHEMA_VERSION       5
 
21 rows selected.
我晕,我的电脑是zhs168的
稍等修改
D:\oracle>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 5月 30 10:02:15 2007
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
请输入用户名:  / as sysdba
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area  289406976 bytes
Fixed Size                  1248576 bytes
Variable Size             104858304 bytes
Database Buffers          176160768 bytes
Redo Buffers                7139328 bytes
数据库装载完毕。
SQL>  ALTER SYSTEM ENABLE RESTRICTED SESSION;
系统已更改。
SQL>  ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
系统已更改。
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
系统已更改。
SQL> alter database open;
数据库已更改。
SQL> alter session set events '10046 trace name context forever,level 12';
会话已更改。
SQL>  alter database character set INTERNAL_USE AL32UTF8;
数据库已更改。
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area  289406976 bytes
Fixed Size                  1248576 bytes
Variable Size             104858304 bytes
Database Buffers          176160768 bytes
Redo Buffers                7139328 bytes
数据库装载完毕。
数据库已经打开。
SQL>
ok  字符集修改了
重新试一下
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
D:\oracle>impdp sa/sa dumpfile=zl_space.dmp directory=zl_space_dir transport_datafiles='D:\ORACLE\PRODUCT\10.2.0\ORADATA
\DB10\ZL_SPACE.DBF'
Import: Release 10.2.0.1.0 - Production on 星期三, 30 5月, 2007 10:06:29
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已成功加载/卸载了主表 "SA"."SYS_IMPORT_TRANSPORTABLE_01"
启动 "SA"."SYS_IMPORT_TRANSPORTABLE_01":  sa/******** dumpfile=zl_space.dmp directory=zl_space_dir transport_datafiles='
D:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10\ZL_SPACE.DBF'
处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
作业 "SA"."SYS_IMPORT_TRANSPORTABLE_01" 已于 10:06:40 成功完成
D:\oracle>
ok表空间传输完成
阅读(1093) | 评论(2) | 转发(0) |
0

上一篇:oracle10G闪回操作

下一篇:11G新功能的增强

给主人留下些什么吧!~~