您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

Oracle可移动表空间方法

2024/3/28 23:40:42发布4次查看
源数据库环境: os:windows 7 db version:oracle 10.2.0.4.0 注:10.1.0.1.0版本不能使用此次迁移方案 db user:scott 需要dba权
源数据库环境:
os:windows 7
db version:oracle 10.2.0.4.0 注:10.1.0.1.0版本不能使用此次迁移方案
db user:scott
需要dba权限、用户
目标数据库环境:
os: windows 7
db version:11.2.0.1.0 注:11g低版本不能使用此次迁移方案
需要dba权限、用户
实施步骤:
1、检查迁移的表空间是否符合迁移条件,属于自含式表空间
sql> exec sys.dbms_tts.transport_set_check ('sdh_data_test01',true);
pl/sql procedure successfully completed
sql> select * from transport_set_violations;--查出必须为空才是自含式
violations
2、表空间为只读模式
sql> alter tablespace sdh_data_test01 read only;
tablespace altered
sql> select status from dba_tablespaces where tablespace_name = 'sdh_data_test01';
status
---------
read only
3、传输sdh_data_test01表空间对应的数据文件至远程服务器,,d:\backup
4、目标数据库 create directory ftp_test as ‘d:\backup’;
5、目标数据库创建dblink连接源数据库
create public database link dblink_133
connect to scott identified by tiger
using '(description =
(address_list =
(address = (protocol = tcp)(host = 10.6.246.133)(port = 1521))
)
(connect_data =
(service_name = demo)
)
  )';
6、目标数据库执行数据棒导入工具将该表空间导入到目标数据库
d:\app\yanan\product\11.2.0\dbhome_2>impdp test/oracle  transport_datafiles= 'd:\backup\sdh_data_test01_01.dbf' network_link='dblink_133'  transport_tablespaces=(sdh_data_test01)  nologfile=y
import: release 11.2.0.1.0 - production on 星期四 10月 25 14:51:28 2012
copyright (c) 1982, 2009, oracle and/or its affiliates.  all rights reserved.
连接到: oracle database 11g enterprise edition release 11.2.0.1.0 - production
with the partitioning, olap, data mining and real application testing options
启动 test.sys_import_transportable_01:  test/******** transport_datafiles= '
d:\backup\sdh_data_test01_01.dbf' network_link='dblink_133' transport_tablespace
s=(sdh_data_test01) nologfile=y
处理对象类型 transportable_export/plugts_blk
处理对象类型 transportable_export/table
处理对象类型 transportable_export/index
处理对象类型 transportable_export/index_statistics
处理对象类型 transportable_export/table_statistics
处理对象类型 transportable_export/post_instance/plugts_blk
作业 test.sys_import_transportable_01 已于 14:51:51 成功完成
7、修改源数据库表空间状态为可读写:
sql> alter tablespace sdh_data_test01 read write;
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录