ORA-01536: space quota exceeded for tablespace 錯誤的深入分析
今天在使用者kf下面刪除一條資料時:
delete from kf_gongnengtx where texingid=2736;
報錯:
ORA-01536: space quota exceeded for tablespace 'TS_HIS3'
根據網上資料,該問題是由於使用者在使用表空間時候受到了許可權的限制.
解決方案很簡單,修改這個使用者的使用這個表空間的空間的許可權就可以了
oracle提供二種方法:
1. Increase the tablespace quota allocated to that user or role by using the following command(即增加具體的大小限額):
ALTER USER
2. suggest QUOTA UNLIMITED(即去掉配額限制,unlimited,推薦使用這種,否則當第一個方法用後,如果再不夠,那豈不是要再進行分配限額!):
ALTER USER
方法2的另外一種寫法:
grant unlimited tablespace to
於是在sqlplus下面以sysdba許可權登陸操作:
SQL> grant unlimited tablespace to kf;
Grant succeeded.
SQL> delete from kf_gongnengtx where texingid=2736;
1 row deleted
操作成功,問題解決!
本來到這裡也告一段落,結果在一篇文章上面()發現產生這個問題可能與role是DBA和RESOURCE被revoke有關,
裡面有一段關鍵的話:
UNLIMITED TABLESPACE is kind of "wierd" system privilege. It is not granted to any role (and in fact it CAN NOT BE GRANTED to any role!), yet when you grant some powerfull roles (like DBA and I think RESOURCE too - it might even be version dependand AFAIK) to user, Oracle "silently" adds that UNLIMITED TABLESPACE privilege to that user directly. And when you revoke such role from user, Oracle silently revokes UNLIMITED TABLESPACE privilege from user too!
Now, when someone gets UNLIMITED TABLESPACE granted, it doesn't meen taht quotas on all tablespaces are set to unlimited to him. His quotas on tablespaces remain exactly the same - if he had quota 0 on tablespace USERS before, he still has quota 0 on that tablespace now. But when he has UNLIMITED TABLESPACE privilege, this takes priority over any quota settings and therefore he will be able to use space in that tablespace for new extents. However, if you later revoke UNLIMITED TABLESPACE from that user, his quota 0 will be put in effect and he will no longer be able to use any additional available space from tablespace USERS.
繼續深入:
在metalink上面找到ORA-01536 After Revoking DBA Role [ID 465737.1]的文件,原來grant 或者revoke role DBA 或者 RESOURCE會導致該問題,然後我做了metalink上面的實驗,果然如此,當你revoke DBA from
下面是相關描述:
ORA-01536: space quota exceeded for tablespace '
After revoking DBA or Resource Role from a user
Example:
Connected.
SQL> create user testrights identified by testos;
User created.
SQL> grant connect, resource to testrights;
Grant succeeded.
SQL> connect testrights/testos;
Connected.
SQL> CREATE TABLE "TESTRIGHTS"."TESTTAB" ( "TESTFIELD" VARCHAR2(200) NOT NULL
, CONSTRAINT "TESTPK" PRIMARY KEY ("TESTFIELD") VALIDATE ) TABLESPACE "USERS" STORAGE ( INITIAL 64M) ;
Table created.
SQL> conn /as sysdba
Connected.
SQL> grant dba to testrights;
Grant succeeded.
SQL> revoke dba from testrights;
Revoke succeeded.
SQL> show user
USER is "SYS"
SQL> drop table testrights.testtab;
Table dropped.
SQL> conn testrights/testos;
Connected.
SQL> CREATE TABLE "TESTRIGHTS"."TESTTAB" ( "TESTFIELD" VARCHAR2(200) NOT NULL
, CONSTRAINT "TESTPK" PRIMARY KEY ("TESTFIELD") VALIDATE ) TABLESPACE "USERS" STORAGE ( INITIAL 64M) ;
CREATE TABLE "TESTRIGHTS"."TESTTAB" ( "TESTFIELD" VARCHAR2(200) NOT NULL ,
CONSTRAINT "TESTPK" PRIMARY KEY ("TESTFIELD") VALIDATE ) TABLESPACE "USERS"
STORAGE ( INITIAL 64M)
*
ERROR at line 1:
ORA-1536: space quota exceeded for tablespace 'USERS'
SQL> conn /as sysdba
Connected.
SQL> grant connect, resource to testrights;
Grant succeeded.
SQL> conn testrights/testos;
Connected.
SQL>
SQL> CREATE TABLE "TESTRIGHTS"."TESTTAB" ( "TESTFIELD" VARCHAR2(200) NOT NULL , CONSTRAINT "TESTPK" PRIMARY KEY ("TESTFIELD") VALIDATE ) TABLESPACE "USERS"
STORAGE ( INITIAL 64M) ;
Table created.
Cause
This issue has been discussed in Bug 6494010.
The behavior seen in the above example is expected and not a bug
When roles were first introduced into Oracle in 7.0, the old Oracle V6 privileges of RESOURCE and DBA were migrated to use the new role functionality. But because the RESOURCE and DBA roles are not allowed to be granted UNLIMITED TABLESPACE, in order to preserve the backwards compatibility with V6, the parser automatically transforms statements such that "grant resource to abc" automatically becomes "grant resource, unlimited tablespace to abc" and "revoke resource from abc" automatically becomes "revoke resource, unlimited tablespace from abc". The same is true when granting and revoking the DBA role. This behaviour used to be well documented in the SQL reference guide which read:
Note: If you grant or revoke the RESOURCE or DBA role to or from a user, Oracle implicitly grants or revokes the UNLIMITED TABLESPACE system privilege to or from the user.
Solution
To Resolve this issue you need to :
1] Grant DBA or Resource Role back to the user from whom it was revoked.
http://blog.csdn.net/rudyMatrix/article/details/4823445
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-1063763/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Sybase IQ 錯誤 : Temporary space limit exceededMIT
- Tablespace Space Script
- unlimited tablespace許可權和quota 配額MIT
- rac例項報SVR4 Error: 49: Disc quota exceededVRError
- requests.exceptions.SSLError……Max retries exceeded with url錯誤求助!!!ExceptionError
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- ORA-00018: maximum number of sessions exceeded錯誤解決Session
- Yii2 之錯誤處理深入分析
- SAP雲平臺CloudFoundry環境裡route 超過quota的錯誤處理Cloud
- MYSQL Space id in fsp header,but in the page header錯誤MySqlHeader
- Run Out Of Space On UNDO Tablespace Using DataPump Import/ExportImportExport
- 深入分析ora-600 2662錯誤系列一
- 如何處理SAP雲平臺錯誤訊息 there is no compute unit quota for subaccount
- 關於錯誤訊息 RangeError - Maximum call stack size exceeded at XXXError
- ORA-00020:maximum number of processes (500) exceeded 錯誤解決方法
- 關於ORA-01536 報錯的幾種場景:
- opatch java.lang.OutOfMemoryError:Java heap space錯誤一例JavaError
- android錯誤unable to execute dex java heap space解決方案AndroidJava
- 解決Eclipse和MyEclipsejava.lang.OutOfMemoryError Java heap space的錯誤EclipseJavaError
- ORA-1652: unable to extend temp segment by 128 in tablespace錯誤的解決方法
- ERROR L107: ADDRESS SPACE OVERFLOW keil錯誤的解決方法Error
- 禁止客戶端誤刪除tablespace客戶端
- influxdb報錯:cache-max-memory-size exceededUX
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- quota 筆記筆記
- 故障分析 | 從一則錯誤日誌到 MySQL 認證機制與 bug 的深入分析MySql
- ora-01536的解決過程
- python requests.post Max retries exceeded with url 報錯Python
- ORA-01552: cannot use system rollback segment for non-system tablespace 'USERS'錯誤解決
- Linux Quota的配置實戰Linux
- 記錄一次根據錯誤資訊無法定位錯誤的錯誤
- 【Oracle】-【show_space和show_space_asm】-執行儲存過程報錯OracleASM儲存過程
- oracle 11gR2,取消使用者unlimited tablespace 許可權,那麼表空間上的quota也會相應取消OracleMIT
- Oracle的表空間quota詳解Oracle
- Linux下的磁碟配額quotaLinux
- oracle的表空間quota詳講Oracle
- recover database delete archivelogs skip tablespace temp;報錯DatabasedeleteHive
- mysql 報錯:java.lang.OutOfMemoryError: Java heap spaceMySqlJavaError