查看INV用戶的對象的存儲情況
select * from dba_segments ds where ds.owner='INV';
--default tablespace users
創建表空間INV
create tablespace inv datafile '/oradata/ocm/inv01.dbf ' size 200M autoextend on next 10m maxsize 2048M extent management local segment space management auto;
設置默認表空間爲INV
alter user inv default tablespace inv;
set linesize 200
set pagesize 2000
set term off verify off head off feedback off echo off
spool mtiddl.sql
select 'alter ' ||ds.segment_type || ' '|| ds.owner||'.' || ds.segment_name || ' ' ||
decode(segment_type, 'TABLE', 'MOVE', 'INDEX', 'REBUILD') ||
' tablespace INV;'
from dba_segments ds
where ds.owner = 'INV'
AND (segment_type = 'INDEX' OR segment_type = 'TABLE');
spool off
將用戶當前表空間中的表和索引遷移到另一個表空間
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
Oracle Database 監控:zabbix(一)
AMGYM
2019-02-24 13:05:14
Oracle Database 監控(check_oracle_health)
AMGYM
2019-02-24 13:05:14
Oracle11g 基於linux 6.3下安裝
love壁虎
2019-02-24 12:55:06
Oracle導入導出數據的幾種方式
linzhongyilisha
2019-02-24 12:43:05
oracle em啓動
huchazsu
2019-02-23 14:01:49
oracle 啓動歸檔模式
huchazsu
2019-02-23 14:01:14
oracle 11G 靜默安裝
anshenwang
2019-02-23 13:56:41
ORA-32001: 已請求寫入 SPFILE 但是在啓動時未
xuts5
2019-02-23 13:48:29
RMAN-20207
xuts5
2019-02-23 13:48:29
oracle表分區詳解
xuts5
2019-02-23 13:48:29
oracle刪除及導入數據庫
曉竹
2019-02-23 13:35:55
記一次從oracle到hive的歷史數據遷移(一)
綠箭俠1
2019-02-23 13:33:37
Oracle 索引組織表(IOT)
落花飄雪IT
2019-02-23 13:29:59
刷新Oracle緩存
itserver_live
2019-02-23 13:29:47