--將資料庫為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.建立表空間newtablespace
create tablespace newtablespace
logging
datafile 'e:\oracle\product\10.2.0\oradata\oa\newtablespace.dbf'
size 100m
autoextend on
next 200m maxsize 2048m
extent management local;
--3.將testuser的表空間修改為newtablespace
alter user testuser default tablespace newtablespace;
--4.將testuser使用者下面的表、序列等刪除
--5.匯入資料
impdp system/aaaaaa@testdb directory=testdir dumpfile=testdb.dmp remap_tablespace=users:newtablespace
oracle不同表空間的匯入
1,用imp匯出資料 cmd進入orcle安裝目錄bin下,輸入以下命令 exp u p bmnae file c hysjb.dmp owner magazine hy rows y 2,用imp產生index.sql檔案 imp xe file indexfile index.sql full ...
Oracle表空間 使用者 表之間的關係
oracle中建立表空間 使用者 表 下面通過乙個在oracle中建立方案的例子來說明oracle中表空間 使用者 表之間的關係,一般在oracle中建立方案的步驟為 建立表空間 建立使用者並設定其表空間和許可權 建立資料庫物件 表 檢視 索引等 1 先用sys使用者登入oracle 2 新建表空間...
Oracle 把錶和索引放在不同的表空間裡
oracle 把錶和索引放在不同的表空間裡 oracle中並沒有區分表空間裡放的是表還是索引,所有當資料量比較小時,完全可以把錶和索引放在同乙個表空間裡,但隨著資料量的增大,最好還是把錶和索引分開儲存在不同的表空間裡,因為 1 提高效能 盡量把錶和索引的表空間儲存在不同在磁碟上,把兩類不同io性質的...