1:進行plsql後選怎Tools
-->> Exports User Ojbects
-->> 選中需要匯出的table,squence,view,type,function,procedure,trigger。
-->> 選擇User
-->>勾選Include storege或者去掉勾選(include storege表示表空間的意思
-->>選擇匯出檔案存放目錄
-->>Export按鈕匯出
2:下面具體解釋一下Include Storage勾選和不勾選的區別
1)不勾選匯出的sql如下:
create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL ( product VARCHAR2(32 CHAR) not null, environment VARCHAR2(32 CHAR) not null, server VARCHAR2(32 CHAR) not null, resource_path VARCHAR2(256 CHAR) not null, action VARCHAR2(4 CHAR) not null, username VARCHAR2(32 CHAR) not null, usergroup VARCHAR2(32 CHAR) not null, address VARCHAR2(32 CHAR) not null, timestamp DATE default TO_DATE('00-01-01 00:00:00','YY-MM-DD HH24:MI:SS') not null, status VARCHAR2(16 CHAR), data NCLOB ) ;
2)勾選後匯出的sql如下,加上了table所屬的表空間,以及可用的表空間限制
create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL ( product VARCHAR2(32 CHAR) not null, environment VARCHAR2(32 CHAR) not null, server VARCHAR2(32 CHAR) not null, resource_path VARCHAR2(256 CHAR) not null, action VARCHAR2(4 CHAR) not null, username VARCHAR2(32 CHAR) not null, usergroup VARCHAR2(32 CHAR) not null, address VARCHAR2(32 CHAR) not null, timestamp DATE default TO_DATE('00-01-01 00:00:00','YY-MM-DD HH24:MI:SS') not null, status VARCHAR2(16 CHAR), data NCLOB ) tablespace OPENJAW_DATA pctfree 10 initrans 1 maxtrans 255;
3:下面解釋一下Include User勾選和不勾選的區別。
1)不勾選Include User
create table AUDIT_TRAIL ( product VARCHAR2(32 CHAR) not null, environment VARCHAR2(32 CHAR) not null, server VARCHAR2(32 CHAR) not null, resource_path VARCHAR2(256 CHAR) not null, action VARCHAR2(4 CHAR) not null, username VARCHAR2(32 CHAR) not null, usergroup VARCHAR2(32 CHAR) not null, address VARCHAR2(32 CHAR) not null, timestamp DATE default TO_DATE('00-01-01 00:00:00','YY-MM-DD HH24:MI:SS') not null, status VARCHAR2(16 CHAR), data NCLOB ) ;
2)勾選上Include User,會在create table tablename的tablename前面加上User的名字,如下多了一個TRAVELSKY_XREZAGENT
create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL ( product VARCHAR2(32 CHAR) not null, environment VARCHAR2(32 CHAR) not null, server VARCHAR2(32 CHAR) not null, resource_path VARCHAR2(256 CHAR) not null, action VARCHAR2(4 CHAR) not null, username VARCHAR2(32 CHAR) not null, usergroup VARCHAR2(32 CHAR) not null, address VARCHAR2(32 CHAR) not null, timestamp DATE default TO_DATE('00-01-01 00:00:00','YY-MM-DD HH24:MI:SS') not null, status VARCHAR2(16 CHAR), data NCLOB ) ;