oracle刪除表的某個表分割槽 無法刪除表分割槽

2021-10-17 23:17:53 字數 689 閱讀 2173

刪除分割槽語句

alter table dws_db.dws_ccrm_dim_attr_spec_*** drop partition(day_id='20200207');

丟擲如下異常:

failed: execution error, return code 1 from org.apache.hadoop.hive.ql.exec.ddltask. table partition not deleted since hdfs://nas2/domains/nas2/hxxt_yx/dws_db.db/dws_ccrm_dim_attr_spec_***is not writable by [email protected]
根據這個異常資訊查詢hive原始碼,丟擲異常**如下:

就是在刪除表分割槽時會去校驗分割槽的父目錄也就是表是否有寫的許可權,如果沒有許可權,那麼就會丟擲如上異常。

檢視這個表和分割槽的許可權,許可權如下

發現這個表的屬主和分割槽屬主不一樣,這個刪除使用者沒有這個表的寫許可權。

解決辦法:

oracle刪除某個使用者所有表

1 select drop table table name from all tables where owner 要刪除的使用者名稱 注意要大寫 2 刪除所有表 以使用者test為例 for example declare cursor cur1 is select table name fro...

oracle 表無法修改刪除 無法刪除表分割槽

刪除分割槽語句 alter table dws db.dws ccrm dim attr spec drop partition day id 20200207 丟擲如下異常 failed execution error,return code 1 from org.apache.hadoop.hi...

oracle表分割槽設計 ORACLE 分割槽表的設計

分割槽表的概念 分割槽致力於解決支援極大表和索引的關鍵問題。它採用他們分解成較小和易於管理的稱為分割槽的片 piece 的方法。一旦分割槽被定義,sql語句就可以訪問的操作某乙個分割槽而不是整個表,因而提高管理的效率。分割槽對於資料倉儲應用程式非常有效,因為他們常常儲存和分析巨量的歷史資料。分割槽表...