oracle 通過exp導出表結構及數據包含空表

  1. 先在PL/SQL中執行下面語句
    select 'alter table '|| a.table_name ||' allocate extent;' from user_tables a where a.table_name not in (select segment_name from user_segments where segment_type = 'TABLE');

     

  2. 複製出所有查詢結果,粘貼到SQL窗口執行
  3. 在cmd命令行中執行導出語句
    exp 賬號/密碼@庫名 owner=賬號 file=E:\TNDB\20191128.dmp

    成功導出

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章