如何轉移表空間儲存位置

2021-06-06 03:04:44 字數 717 閱讀 4954

oracle安裝到了c盤,表空間也建立到了c盤,目前發現c盤的空間不夠用了,現在將表空間的檔案轉移到乙個容量大的盤下邊,操作方法:

1. 先登入sqlplus:

sqlplus /nolog

conn user1/passwd@test

2.修改表空間為offline

alter tablespace users offline;

3.拷貝表空間檔案

拷貝c:oracleproduct10.2.0oradataorcladousers01.dbf 到 d:oracledata

4.修改oracle表空間指向位址

sql> alter database rename file 'c:oracleproduct10.2.0oradataorcladousers01.dbf' to 'd:oracledatausers01.dbf';

5.修改表空間為online

sql> alter tablespace users online;

檢視資料庫的表空間檔案存放位置:

select file_name from sys.dba_data_files;

檢視空閒表空間:

sql>select tablespace_name ,sum(bytes)/1024/1024||'m' as freespaces from dba_data_files group by tablespace_name;

轉移表空間步驟

轉移表空間步驟 一 轉移表空間 alter table tab name move tablespace tabspace name 分割槽表alter table table name move partition para name tablespace tablespace name 批量生成...

轉移LOB欄位的表空間

部署時若要匯入的表空間名稱和開發機上的不一致,而你的表中有lob欄位,那頭就大了。能治好這種頭大症的 如下 create or replace procedure volumechangetableandindex tablespacename in varchar2 as cursor table...

oracle的表如何跨表空間儲存

oracle的乙個表所在表空間,空間已經佔滿,其他表空間有剩餘空間.實現表存在另外的表空間 方案一 利用原表重建分割槽表 1 原表temp,存在欄位id,time 2 temp存在紀錄 3 根據原表temp建立新的分割槽表temp new create table temp new id,time ...