因为建用户的时候没有指定表空间,现在都跑了一段时间数据了。想把System表空间下的用户切换到users下面,包含该用户下的所有表、索引和数据等。烦请各位大虾指点,谢谢了先。
解决方案 »
- oracle提示找不到被锁定用户怎么办?
- 不解为何下载了oracle客户端安装后却不能创建数据库
- oracle中在配置listener和tnsname时一般情况下使用计算机名和IP不会出来问题,使用localhost和127.0.0.1有时会出现问题
- 配置监听服务时出错,急!
- 好烦!物化视图是不是不支持子查询啊,在线等
- 关于 Oracle Sql 优化
- 怎样把现有的一个表拆分成两个单独的表?
- 在Oracle中怎么样定义一个字段自动加1(在线等待......)
- 我有9G的数据库要迁移的别人的oracle上,如何迁移
- full join问题
- maximum open cursors exceeded错误,在线等解决方案
- 求时间间隔的日期
alter index index1 rebuild tablepsace users;
alter user user1 default tablespace users;例如 :
select 'alter table ' || table_name || ' move tablespace users;' from user_tables where tablespace_name='SYSTEM';
例如将数据库中system用户的表导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
注:如果用exp system/manager@TEST file=d:\daochu.dmp owner=(system),会将所有是system用户的表都导出,所以还是一个表一个表的写吧!
接着导入到user用户表
imp user/test@TEST fromuser=system touser=user file=d:\daochu.dmp,就可以了
alter table table1 move tablespace users;转移表空间是可以,但要看实际情况,如果表的数据量很小的话可以考虑,如果数据量大的话重建索引会耗时比较长