---
title: "oracle 10g 表空间 迁移"
author: "eeeeeeee"
date: "2010-05-05T11:25:48Z"
tags: []
categories: ["数据库"]
slug: "oracle-10g"
draft: false
lastmod: "2010-05-07T22:41:28Z"
id: 659358
url: "https://eeeeeeee.iteye.com/blog/659358"
---

数据库10g，源操作系统ubuntu9.04，目标操作系统AS 4，表空间hbdxdw，用户名hbdxdw，密码hbdxdw1q2w3e

 

1&gt;确保表空间为只读空间

alter tablespace hbdxdw read only

 

2&gt;从目标数据库中导出所需要的表空间

exp hbdxdw/hbdxdw1q2w3e@hbdxdw transport\_tablespace=y tablespaces=hbdxdw file=/home/oracle/hbdxdw\_back.dmp

 

3&gt;用ftp将hbdxdw对应的dbf文件和dmp文件传输到目标操作系统

 

4&gt;在目标机上创建用户名为hbdxdw的用户，同时拥有相同的表空间名称，及表空间

 

5&gt;导入数据

imp hbdxdw/hbdxdw1q2w3e（密码可以为其他）@hbdxdw transport\_tablespace=y tablespaces=hbdxdw file=/home/bonc/hbdxdw\_back.dmp datafiles='/home/bonc/data\_file\_01.dbf’ full=y

 

这样就可以了(至少我是这样把数据弄进去的，希望大家指出错误)