首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle不同表空间其间的数据迁移

2013-02-03 
oracle不同表空间之间的数据迁移--将数据库为testdb,用户名为testuser中默认(users)表空间里的数据迁移至

oracle不同表空间之间的数据迁移

--将数据库为testdb,用户名为testuser中默认(users)表空间里的数据迁移至表空间(newtablespace)--1.用system用户登陆testdb数据库,创建directory(testdir)并将读、写权限授予testuser用户create or replace directory testdir as 'e:\temp';grant read, write on directory testdir to testuser;--使用expdp命令导出testuser用户的数据expdp system/aaaaaa@testdb directory=testdir dumpfile=testdb.dmp schemas=testuser;--2.创建表空间newtablespacecreate tablespace newtablespace loggingdatafile 'E:\oracle\product\10.2.0\oradata\oa\newtablespace.dbf' size 100mautoextend onnext 200m maxsize 2048mextent management local;--3.将testuser的表空间修改为newtablespacealter user testuser default tablespace newtablespace;--4.将testuser用户下面的表、序列等删除--5.导入数据impdp system/aaaaaa@testdb directory=testdir dumpfile=testdb.dmp remap_tablespace=users:newtablespace

热点排行