oracle 空表處理

來源:互聯網
上載者:User

標籤:

oracle空表處理:
1.動態產生給空表分配segment的命令:
SQL>Select ‘alter table ‘||table_name||‘ allocate extent;‘ from user_tables where num_rows=0;
2.在命令視窗右鍵‘標記’,複製產生的命令並執行,斷行符號。
3.匯出資料:
exp tfgps/[email protected] file=D:\ORACLETEMP\TFGPS.DMP log=D:\ORACLETEMP\TFGPS.LOG
4.建立資料表空間和使用者並設定密碼不到期:
select name from v$datafile;
create tablespace NKGPS datafile ‘D:\APP\K2\ORADATA\TFPARAMETER\NKGPS.DBF‘ size 100m autoextend on next 50m maxsize unlimited;
create user tfgps identified by tf default tablespace NKGPS temporary tablespace temp;
grant connect,resource,dba,create table,create view,create trigger,create session,create sequence,create index type,create procedure to tfgps;

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
//修改發生鎖定的登入錯誤次數:
alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited;

切換登入後:ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
5.匯入資料:
imp tfgps/[email protected] ignore=y rows=y full=y commit=y buffer=4096000 file=D:\ORACLETEMP\TFGPS.DMP log=D:\ORACLETEMP\TFGPSIMP.LOG
若只匯出空表:
exp tfgps/[email protected] file=D:\ORACLETEMP\TFGPS.DMP log=D:\ORACLETEMP\TFGPS.LOG rows=n;
//create user tablespace, sde,grant and enablegeodatabase

oracle 空表處理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.